AI Token Cost Calculator
Paste a prompt to instantly see token counts and cost estimates across all major AI providers — OpenAI, Anthropic, Google Gemini, Perplexity, DeepSeek, and Grok.
● Live Preview
Cheapest option
$0.000
OpenAI · GPT-5 nano
1 call(s)
525 tokens / call
Priciest: $0.038 (Claude Opus 4)
Chars
100
Words
14
In tokens
25
Out tokens
500
Input
100 chars14 words≈ 25 in-tokens≈ 500 out-tokens
~3-4 paragraphs
Results
OpenAI(6)
OpenAI
(6)GPT-5
$1.25/1M in · $10/1M out
$0.005
GPT-5 mini
$0.25/1M in · $2/1M out
$0.001
GPT-5 nano
$0.05/1M in · $0.4/1M out
$0.000
GPT-4o
$2.5/1M in · $10/1M out
$0.005
GPT-4o mini
$0.15/1M in · $0.6/1M out
$0.000
o3
$2/1M in · $8/1M out
$0.004
Anthropic(3)
Anthropic
(3)Claude Opus 4
$15/1M in · $75/1M out
$0.038
Claude Sonnet 4
$3/1M in · $15/1M out
$0.008
Claude Haiku 3.5
$0.8/1M in · $4/1M out
$0.002
Google Gemini(3)
Google Gemini
(3)Gemini 2.5 Pro
$1.25/1M in · $10/1M out
$0.005
Gemini 2.5 Flash
$0.3/1M in · $2.5/1M out
$0.001
Gemini 2.5 Flash Lite
$0.1/1M in · $0.4/1M out
$0.000
Perplexity(3)
Perplexity
(3)Sonar
$1/1M in · $1/1M out
$0.001
Sonar Pro
$3/1M in · $15/1M out
$0.008
Sonar Reasoning
$1/1M in · $5/1M out
$0.003
DeepSeek(2)
DeepSeek
(2)DeepSeek V3
$0.27/1M in · $1.1/1M out
$0.001
DeepSeek R1
$0.55/1M in · $2.19/1M out
$0.001
Grok (xAI)(3)
Grok (xAI)
(3)Grok 4
$3/1M in · $15/1M out
$0.008
Grok 3
$3/1M in · $15/1M out
$0.008
Grok 3 mini
$0.3/1M in · $0.5/1M out
$0.000
</> Formula
calculation
input_tokens ≈ max(chars / 4, words × 1.3)
output_tokens = preset size (or ‘match input’)
cost = (input_tokens/1M × input_$) + (output_tokens/1M × output_$)
total = cost × number of callsExplanation
Click Explain for a plain English summary of how this works.
FAQ
How accurate is the token estimate?▾
We use ~4 characters per token, which matches OpenAI's tokenizer to within a few percent for English. Code, non-Latin scripts, and very short prompts can vary more.
Why is output more expensive than input?▾
Generation requires the model to do new work for every token, while input is just read once. Output is typically 4–8× the input price.
Are these prices live?▾
They reflect each provider's most recent published pricing. Always confirm on the official page before budgeting at scale.