Back to Home
Inside an LLM
Token Cost Estimator
AI services often count text using tokens. More tokens usually means more cost.
This is a simple learning estimator, not exact pricing for any real AI provider.
Interactive Playground
Statistics
0
Input Tokens
0
Output Tokens
0
Total Tokens
$0.00000
Input Cost
$0.00000
Output Cost
$0.00000
Total Cost
Cost Formula
Cost = (input tokens × input rate)
+ (output tokens × output rate)
+ (output tokens × output rate)
Example (GPT-4o mini)
📥 100 input tokens
× $0.15 / 1M = $0.000015
📤 50 output tokens
× $0.60 / 1M = $0.000030
💰 Total
$0.000045
💡 Output tokens are always more expensive than input tokens, AI generating text costs more than reading it.
Token Breakdown & Cost
Input Tokens
0 tokens
Prompt tokens appear here…
Output Tokens
0 tokens
Response tokens appear here…
Total Estimated Cost
$0.00000
for this prompt + response pair
🎓
Beginner Tips
2 tips
Output tokens are always more expensive, generating text takes more compute than reading it.
Shorten your system prompt, it's sent with every request. A 500-token system prompt × 1000 calls = 500,000 extra tokens billed.
💡
Key Takeaway
Longer prompts and longer responses use more tokens, which can increase the cost of using AI services.