AiCost

AI Token Calculator — Tokens to Dollars, Any Model

Who this is for: For developers and API users holding a token count and a model name who need the dollar number — before the invoice arrives.

Turn a token count into dollars on any model — or estimate tokens from text you paste.

Quick answer: Token prices are quoted per 1M tokens and span roughly 300×: input from $0.05 (GPT-5 nano) to $15 (Claude Opus 4.1), output from $0.40 to $75. A million in and a million out costs $11.25 on GPT-5, $18.00 on Claude Sonnet 4.5, $0.70 on DeepSeek V3. Cached input drops to 10% of list on Anthropic. Enter your token counts below.

tok
tok
tok

cached rate $0.125/M

Total cost
$32.50
GPT-5 · list price
Input side
$12.50
10,000,000 tok
Output side
$20.00
2,000,000 tok
OpenAI / Anthropic / DeepSeek / Grok formats · 100% client-side
Input (10,000,000 tok)$12.50
Output (2,000,000 tok)$20.00
Total$32.50
Price-check habit: the same 10M-in / 2M-out workload runs $32.50 on GPT-5, $60.00 on Claude Sonnet 4.5 and $3.64 on DeepSeek V3 — benchmark your own tasks before paying flagship prices.
All list prices per 1M tokens, verified Oct 2026 from each provider's pricing page. Tiered context pricing (Gemini >200k), batch discounts and taxes not reflected. Parsing runs client-side — nothing you paste leaves this page.
Core facts
Formulatokens ÷ 1M × price per 1M
Input band$0.05 – $15 /1M
Output band$0.40 – $75 /1M
Words per token≈0.75 words/token (1.3 tokens/word)
Cache readAnthropic 10% · OpenAI 10–50%
StatusList prices collected Oct 2026 from each provider's public pricing page. Providers change tiers often — always confirm on the official page before billing decisions.

How much does one million tokens cost?

Token pricing is quoted per million tokens and differs by an order of magnitude between tiers. Input prices run from $0.05 (GPT-5 nano) to $15 (Claude Opus 4.1) per million; output prices run from $0.40 to $75. The same 1M input + 1M output job costs $11.25 on GPT-5, $18.00 on Claude Sonnet 4.5, $2.25 on GPT-5 mini and $0.70 on DeepSeek V3. Cached input changes the arithmetic further: Anthropic bills cache reads at 10% of base input price and OpenAI at 10–50% depending on model. The calculator below prices any token count against each model's published rate, and can estimate tokens from text you paste in.

Common uses

  • Converting a token count into dollars for a chosen model
  • Comparing the same workload across providers before switching
  • Costing a cached-input workload against the uncached price
  • Estimating how many tokens a block of text will consume

Why per-token pricing is hard to compare

Providers quote per million tokens, but the usable work per token varies: a reasoning model may spend thousands of tokens thinking before it answers, and a long agent loop re-sends its tool definitions on every call. Two models at the same list price can differ several-fold in the cost of finishing the same task. Use this calculator to price a known token count accurately, then measure real consumption on your own workload before drawing conclusions about which provider is cheaper.

Frequently Asked Questions

How do I calculate token cost?
Cost = (input tokens ÷ 1,000,000 × input price per 1M) + (output tokens ÷ 1,000,000 × output price per 1M). Example: 2M input and 500k output on Claude Sonnet 4.5 ($3/$15) = $6.00 + $7.50 = $13.50.
How many tokens is a word?
Roughly 1.3 tokens per English word, or about 4 characters per token — enough for estimation, not billing. Code, non-English text and unusual formatting consume more. Paste your text into the calculator for a closer estimate rather than extrapolating from word count.
Which model has the cheapest tokens?
Among the major providers, GPT-5 nano ($0.05 in / $0.40 out per 1M) and Gemini 2.5 Flash-Lite ($0.10/$0.40) are the floor, with DeepSeek V3 ($0.28/$0.42) close behind. Cheapest per token is not the same as cheapest per completed task — weaker models often need more attempts.
Do cached tokens really cost less?
Yes, and the discount is large. Anthropic bills prompt-cache reads at 10% of the base input price (Claude Sonnet 4.5: $0.30/M instead of $3/M); OpenAI discounts cached input to 10–50% of list depending on model. Agent workloads with long, stable system prompts and tool definitions benefit most, because that prefix is re-sent on every call.
Is my text or data stored?
No. Token estimation and pricing run entirely in your browser with client-side JavaScript. Nothing you paste is uploaded, logged or sent to a third party — no account required.

More API cost

Related guides