LLM token counter & API cost calculator

Paste a prompt, set your volume, and see what it costs on every major AI model — side by side, with prompt caching and batch discounts.

0 characters0 words0 tokens (GPT o200k)

ModelInput tokensPrice / 1M (in → out)Per requestPer month
Claude Fable 5.1$10 → $50
Claude Opus 5.5$4 → $20
Claude Opus 5$5 → $25
Claude Sonnet 5.5$2 → $10
Claude Sonnet 5$2 → $10
Claude Haiku 5.5$0.1 → $0.5
Claude Sonnet 4.6$3 → $15
Claude Haiku 4.5$1 → $5
GPT-6 Astra$10 → $50
GPT-6.1 Sol$2 → $10
GPT-6.1 Terra$1 → $5
GPT-6 Sol$2 → $10
GPT-6 Luna$0.1 → $0.5
GPT-5.6 Sol$4 → $20
GPT-5.6 Terra$2 → $12
GPT-5.6 Luna$0.2 → $1.2
GPT-5.5$5 → $30
GPT-5.4$2.5 → $15
GPT-5.4 mini$0.75 → $4.5
GPT-5.4 nano$0.2 → $1.25
GPT-5 mini$0.25 → $2
GPT-4.1$2 → $8
GPT-4o mini$0.15 → $0.6
o3$2 → $8
o4-mini$1.1 → $4.4
Gemini 4 Argon$2 → $10
Gemini 3.8 Flash$0.75 → $3.75
Gemini 3.6 Flash$0.75 → $3.75
Gemini 3.5 Flash-Lite$0.3 → $2.5
Gemini 3.1 Pro (preview)$2 → $12
Gemini 3.1 Flash-Lite$0.25 → $1.5
Gemini 2.5 Pro$1.25 → $10
Gemini 2.5 Flash$0.3 → $2.5
Gemini 2.5 Flash-Lite$0.1 → $0.4
Grok 4.7$2 → $6
Grok 4.6$2 → $6
Grok 4.5$2 → $6
Grok 4.3$1.25 → $2.5
Grok 4.20$1.25 → $2.5
Grok Build 0.1$1 → $2
DeepSeek V4 Pro$1.32 → $3.96
DeepSeek Flash$0.3 → $1.2
Mistral Large 3$0.5 → $1.5

≈ = estimated token count: only OpenAI publishes its tokenizer. Claude counts use Anthropic’s published ratios; use the count_tokens API for an exact number.

Price per million tokens

Prices checked on October 28, 2026. USD, standard tier.

Anthropic (Claude)

ModelInputCached inputOutputBatch
Claude Fable 5.1 claude-fable-5-1$10$0.25$50−50%
Claude Opus 5.5 claude-opus-5-5$4$0.2$20−50%
Claude Opus 5 claude-opus-5$5$0.5$25−50%
Claude Sonnet 5.5 claude-sonnet-5-5$2$0.1$10−50%
Claude Sonnet 5 claude-sonnet-5$2$0.2$10−50%
Claude Haiku 5.5 claude-haiku-5-5
Above 100K tokens: $0.5 / $2.5
$0.1$0.01$0.5−50%
Claude Sonnet 4.6 claude-sonnet-4-6$3$0.3$15−50%
Claude Haiku 4.5 claude-haiku-4-5$1$0.1$5−50%

Sources: platform.claude.com

OpenAI (GPT)

ModelInputCached inputOutputBatch
GPT-6 Astra gpt-6-astra
Above 272K tokens: $20 / $75
$10$1$50−50%
GPT-6.1 Sol gpt-6.1-sol
Above 272K tokens: $4 / $15
$2$0.1$10−50%
GPT-6.1 Terra gpt-6.1-terra
Above 272K tokens: $2 / $7.5
$1$0.05$5−50%
GPT-6 Sol gpt-6-sol
Above 272K tokens: $4 / $15
$2$0.2$10−50%
GPT-6 Luna gpt-6-luna
Above 272K tokens: $0.2 / $0.75
$0.1$0.01$0.5−50%
GPT-5.6 Sol gpt-5.6-sol
Above 272K tokens: $8 / $30
Promotional price, available at least through November 21, 2026.
$4$0.4$20−50%
GPT-5.6 Terra gpt-5.6-terra$2$0.2$12−50%
GPT-5.6 Luna gpt-5.6-luna$0.2$0.02$1.2−50%
GPT-5.5 gpt-5.5
Price for prompts up to 272K tokens; longer prompts cost more.
$5$0.5$30−50%
GPT-5.4 gpt-5.4
Price for prompts up to 272K tokens; longer prompts cost more.
$2.5$0.25$15−50%
GPT-5.4 mini gpt-5.4-mini$0.75$0.075$4.5−50%
GPT-5.4 nano gpt-5.4-nano$0.2$0.02$1.25−50%
GPT-5 mini gpt-5-mini$0.25$0.025$2−50%
GPT-4.1 gpt-4.1$2$0.5$8−50%
GPT-4o mini gpt-4o-mini$0.15$0.075$0.6−50%
o3 o3$2$0.5$8−50%
o4-mini o4-mini$1.1$0.275$4.4−50%

Sources: developers.openai.com

Google (Gemini)

ModelInputCached inputOutputBatch
Gemini 4 Argon gemini-4-argon
Launch price through November 30, 2026; $4 / $20 from December 1, 2026.
$2$0.1$10−50%
Gemini 3.8 Flash gemini-3.8-flash
Price doubles in January 2027 ($1.50 / $7.50).
$0.75$0.075$3.75−50%
Gemini 3.6 Flash gemini-3.6-flash
Price doubles in January 2027 ($1.50 / $7.50).
$0.75$0.075$3.75−50%
Gemini 3.5 Flash-Lite gemini-3.5-flash-lite$0.3$0.03$2.5−50%
Gemini 3.1 Pro (preview) gemini-3.1-pro-preview
Above 200K tokens: $4 / $18
$2$0.2$12−50%
Gemini 3.1 Flash-Lite gemini-3.1-flash-lite$0.25$0.025$1.5−50%
Gemini 2.5 Pro gemini-2.5-pro
Above 200K tokens: $2.5 / $15
$1.25$0.125$10−50%
Gemini 2.5 Flash gemini-2.5-flash$0.3$0.03$2.5−50%
Gemini 2.5 Flash-Lite gemini-2.5-flash-lite$0.1$0.01$0.4−50%

Sources: ai.google.dev

xAI (Grok)

ModelInputCached inputOutputBatch
Grok 4.7 grok-4.7
Above 200K tokens: $4 / $12
$2$0.5$6−20%
Grok 4.6 grok-4.6
Above 200K tokens: $4 / $12
$2$0.5$6−20%
Grok 4.5 grok-4.5
Above 200K tokens: $4 / $12
$2$0.3$6−20%
Grok 4.3 grok-4.3
Above 200K tokens: $2.5 / $5
$1.25$0.2$2.5−20%
Grok 4.20 grok-4.20
Above 200K tokens: $2.5 / $5
$1.25$0.2$2.5−20%
Grok Build 0.1 grok-build-0.1
Above 200K tokens: $2 / $4
$1$0.2$2—

Sources: docs.x.ai

DeepSeek

ModelInputCached inputOutputBatch
DeepSeek V4 Pro deepseek-v4-pro
Peak price. Off-peak is half: outside 01–04 and 06–10 UTC on weekdays, plus weekends and Chinese public holidays.
$1.32$0.044$3.96—
DeepSeek Flash deepseek-flash
Peak price. Off-peak is half: outside 01–04 and 06–10 UTC on weekdays, plus weekends and Chinese public holidays.
$0.3$0.006$1.2—

Sources: api-docs.deepseek.com

Mistral

ModelInputCached inputOutputBatch
Mistral Large 3 mistral-large-3$0.5—$1.5−50%

Sources: mistral.ai

Frequently asked questions

What is a token?

A token is a piece of text a language model reads or writes — often part of a word. In English, 1,000 tokens is roughly 750 words. APIs bill per million tokens, with separate prices for input (your prompt) and output (the answer).

Why do Claude and GPT count different tokens for the same text?

Each company uses its own tokenizer. Anthropic says Claude Opus 4.7 and later produce about 30% more tokens than earlier Claude models for the same text, so comparing price per token alone is misleading — compare the cost of the same prompt, as this calculator does.

Are the token counts exact?

For GPT-4o, GPT-4.1, the o-series and GPT-5, yes: we use OpenAI’s public o200k tokenizer in your browser. Other providers don’t publish their tokenizers, so their counts are estimates (marked ≈). For an exact Claude count, use Anthropic’s count_tokens API.

How do prompt caching and the Batch API lower the cost?

Cached input is billed at a fraction of the normal price (10% on most Claude models, less on some). The Batch API halves prices for requests that can wait up to 24 hours. Use the slider and checkbox to see the effect.

More calculators