How LLM token pricing actually works
Two teams can ship the same document-summarisation feature, with the same prompt, the same traffic and the same output quality target, and end the month twenty-one times apart on the bill. Neither of them has done anything wrong. The gap is entirely a pricing decision made in an afternoon and never revisited. Understanding where that factor of twenty-one comes from means understanding the unit vendors actually sell, which is not a word, not a request and not a character.
A token is a chunk of text produced by the model's tokeniser — a lookup table built by compression over a training corpus. Common English words are usually one token. "Unbelievable" is often three. A UUID is a dozen or more. Rules of thumb put English prose at roughly four characters per token, so 750 words lands near 1,000 tokens, but that ratio collapses on code, JSON, non-Latin scripts and anything with long identifiers. German compounds, Japanese and Hindi routinely cost two to three times more tokens per unit of meaning than the equivalent English.
Vendors bill on tokens rather than words because tokens are what the model actually processes. Every token is one forward pass through the attention stack; compute scales with token count, not with how meaningful a human finds the text. Billing per request would let one caller send a 400,000-token contract and another send "hi" for the same money. Billing per word would leave the vendor exposed to whatever the tokeniser does with unusual input. Tokens are the honest unit — they map to the thing that costs the vendor money.
Input and output are separate line items
Every price card has two numbers. Anthropic's Claude Sonnet 5 is $2.00 per million input tokens and $10.00 per million output. OpenAI's GPT-5.6 Sol is $5.00 in and $30.00 out. Google's Gemini 2.5 Flash-Lite is $0.10 in and $0.40 out. Input is everything you send: system prompt, tool definitions, retrieved documents, conversation history, the user's message. Output is everything the model generates.
The two rates are never equal on frontier models, and the gap is the single most important thing to internalise about this market, because it means your cost is not driven by traffic volume alone but by the shape of each call. A feature that reads a lot and writes a little behaves completely differently from a chatbot that reads a little and writes a lot, even at identical request counts.
"One million tokens" is not a fixed amount of text
Price cards invite direct comparison — $2.00 against $0.10 — but the denominators are not identical. Each vendor family uses its own tokeniser, and the same document does not produce the same token count across them. On ordinary English prose the spread between major tokenisers is usually a few per cent and not worth modelling. On source code, minified JSON, tabular data or CJK text it can reach 20% or more. A model that looks 10% cheaper per million can lose that advantage entirely if its tokeniser is 15% more verbose on your particular payload.
A concrete case: a 40-line Python file with descriptive variable names and a docstring might come out at 520 tokens on one tokeniser and 610 on another. Priced against DeepSeek V4 Flash at $0.14 per million input versus Mistral Small 4 at $0.15, the 7% headline gap between those two models is smaller than the tokenisation gap, and the cheaper-looking card can lose.
The fix is not to argue about it. Take a hundred real requests from your logs, run them through each candidate's tokeniser, and compare cost per request rather than cost per million. The token estimator will get you close enough to plan with before you have logs to sample.
Cached and batch tiers
Two discount mechanisms sit underneath the headline rate.
Cached input applies when the beginning of your prompt is byte-identical to a prompt the provider has already processed and still holds in memory. The provider skips recomputing that prefix and charges a fraction: Sonnet 5 drops from $2.00 to $0.20, Claude Opus 5 from $5.00 to $0.50, GPT-5.6 Luna from $0.20 to $0.02, Gemini 2.5 Flash from $0.30 to $0.03. That is a 90% reduction on the cached portion, and on a long, stable system prompt it is the largest single lever available. It applies only to input, and only to a prefix — one changed byte near the top invalidates everything after it. Prompt caching explained covers the break-even arithmetic, which is less forgiving than the headline discount suggests.
Batch processing trades latency for money. Submit a job, get results within a stated window — typically 24 hours — and pay half. Anthropic and OpenAI both run batch at −50% across their model lines. If nothing about your feature requires an answer while a human waits, this is a straight halving with no quality cost and no prompt changes. Batch API savings calculator will size it for your volume.
One feature, priced end to end
Take a real shape: an internal tool that summarises uploaded documents. Each call sends roughly 8,000 input tokens — a 600-token system prompt plus the document — and returns about 500 tokens of summary. It handles 60,000 requests a month.
Monthly token volumes first. Input: 8,000 × 60,000 = 480,000,000 tokens, or 480 million. Output: 500 × 60,000 = 30,000,000 tokens, or 30 million.
On Claude Sonnet 5 at $2.00 / $10.00:
- Input: 480 × $2.00 = $960.00
- Output: 30 × $10.00 = $300.00
- Total: $1,260.00 a month
On Gemini 2.5 Flash-Lite at $0.10 / $0.40:
- Input: 480 × $0.10 = $48.00
- Output: 30 × $0.40 = $12.00
- Total: $60.00 a month
That is the factor of twenty-one. Note what the arithmetic exposes: on Sonnet 5, input is 76% of the bill, because this feature reads sixteen times more than it writes. Any effort spent trimming the summary length is aimed at the smaller number. Trimming the document — chunking it, extracting the relevant sections first — is aimed at the larger one.
Now apply the discount tiers. Suppose 6,000 of those 8,000 input tokens are a stable prefix: the system prompt plus a fixed set of extraction rules and few-shot examples, identical on every call. Cached on Sonnet 5, that prefix costs 360 million × $0.20 = $72.00 instead of 360 × $2.00 = $720.00. The remaining 120 million variable tokens still cost $240.00, output is unchanged at $300.00, and the month comes to $612.00 — a 51% cut from restructuring the prompt, not from changing model.
If the summaries do not need to be immediate, batch instead: $1,260.00 × 0.5 = $630.00. And on Flash-Lite, the same cached structure gives 360 × $0.01 = $3.60, plus $12.00 variable input, plus $12.00 output — $27.60 a month. The LLM API cost calculator runs these permutations across the full price index if you want to see where your own numbers land.
One more thing the arithmetic makes visible: this feature's cost is linear in requests, so every projection is a multiplication you can do in your head once you have the per-request figure. Sonnet 5 costs $1,260 / 60,000 = $0.021 per document. Flash-Lite costs $0.001. Whether the difference matters depends on what a summary is worth to you, which is a product question rather than an engineering one — but you cannot answer it without both numbers in front of you.
What the price card does not tell you
The two headline rates are accurate and incomplete. Five things routinely change the real figure.
Rate limits and tier minimums. Published rates assume you can actually send the traffic. New accounts sit in low tiers with token-per-minute ceilings that a 480-million-token month will hit hard, and moving up a tier usually requires cumulative spend or a commitment. The price is right; your access to it is throttled.
Tool-call round trips. An agent that calls three tools does not send 8,000 input tokens once. It sends the prompt, gets a tool call, appends the result, and resends everything — four times, each slightly longer. A conversation billed at 8,000 + 8,400 + 8,800 + 9,200 = 34,400 input tokens is not a 4.3× overrun on a rounding error; on Sonnet 5 at 60,000 requests it is 2,064 million × $2.00 = $4,128 against the $960 you budgeted.
Thinking and reasoning tokens. Extended reasoning is billed as output, at the output rate, whether or not the tokens are shown to the user. A feature producing 500 visible tokens with 1,500 reasoning tokens behind them is generating 2,000 billable output tokens. On Sonnet 5 that is 120 million × $10.00 = $1,200.00 instead of $300.00 — output goes from a quarter of the bill to more than half.
Egress and data movement. Negligible for text, real for the surrounding architecture: documents pulled from object storage in another region, embeddings shipped to a hosted vector database, logs of every full prompt written somewhere durable for debugging.
Failed and retried calls. A request that times out at 90% completion is billed. A retry loop with no backoff bills every attempt.
Before you commit to a model, price the feature with tool round trips and reasoning tokens included, at the traffic you expect in month six rather than month one. The 8,000-token call in your prototype is rarely the call that reaches production.
All figures in this guide come from the price index, last verified 15 August 2026. Every entry links to the vendor page it was read from — see the price index and the methodology.