Input vs output tokens: why output costs 5× more (it's the GPU's memory, not a markup)
On Claude, the newest GPT models and Gemini 4, a million output tokens cost exactly five times a million input tokens. The reason is how a GPU runs a model: your prompt is read in one parallel pass that keeps the chip busy, while the answer is written one token at a time and every token re-reads the whole model from memory. List prices as of November 2026, the arithmetic behind the gap, where thinking tokens land on the bill, and four ways to pay less.
On Claude Sonnet 5.5 a million input tokens cost $2 and a million output tokens cost $10. Same model, same tokens, five times the price. That isn’t one provider’s quirk: every Claude model, every GPT-6.x model and the whole Gemini 4 family sit at exactly 5× in their November 2026 price lists, and at standard prompt lengths the other text models range from 4× to just over 8×. (OpenAI’s long-context rates, above 272K tokens, are the exception at 3.75×: very long prompts are priced up more than the output.)
Providers don’t publish their cost sheets, so nobody outside can tell you the exact formula behind those prices. What anyone can check is the physics, and it points the same way: reading your prompt and writing the answer are two very different jobs for a GPU. This post walks through why, with the arithmetic labelled as arithmetic and every other number linked to its source. No tests were run for it.
(New to tokens? Start with what a token is. The KV cache, which shows up below, has its own post.)
The price lists
List prices per million tokens, standard tier, read on 25 November 2026:
| Provider | Model | Input | Output | Output ÷ input |
|---|---|---|---|---|
| Anthropic | Claude Opus 5.5 | $4.00 | $20.00 | 5× |
| Anthropic | Claude Sonnet 5.5 | $2.00 | $10.00 | 5× |
| Anthropic | Claude Haiku 5.5 (≤100K prompt) | $0.10 | $0.50 | 5× |
| OpenAI | GPT-6.2 Sol | $2.00 | $10.00 | 5× |
| OpenAI | GPT-5.6 Terra | $2.00 | $12.00 | 6× |
| OpenAI | GPT-5 | $1.25 | $10.00 | 8× |
| OpenAI | o3 | $2.00 | $8.00 | 4× |
| Gemini 4 Carbon (through 30 Nov) | $2.00 | $10.00 | 5× | |
| Gemini 3.1 Pro Preview (≤200K) | $2.00 | $12.00 | 6× | |
| Gemini 2.5 Pro (≤200K) | $1.25 | $10.00 | 8× |
Sources: Anthropic pricing, OpenAI pricing, Gemini API pricing. Gemini 4 Carbon moves to $4 / $20 on 1 December, still 5×. Prices change often: check the pages before you rely on a number.
There’s also a cheaper third tier: cached input. On Sonnet 5.5 a cache hit costs $0.10 per million, so cached input, fresh input and output are priced 1 : 20 : 100.
Reading the ticket: prefill
Think of the model as a kitchen. The GPU’s compute units are the chef, the model’s weights are a recipe book kept in the pantry (the GPU’s memory), and your prompt is the order ticket.
When a request arrives, the model processes the whole prompt in one forward pass: every token goes through every layer at the same time. NVIDIA’s inference guide calls this phase “a matrix-matrix operation that’s highly parallelized” that “effectively saturates GPU utilization” (NVIDIA, 2023). The weights are fetched from memory once and used for all the prompt’s tokens, so the chef’s hands are busy the whole time. Prefill is limited by how fast the GPU can do the maths: it’s compute-bound.
Plating one dish at a time: decode
The answer can’t be made that way. Each new token depends on the one before it, so the model generates “output tokens autoregressively one at a time” (same NVIDIA post). Every step is a full forward pass for a single new token, and every step has to stream the entire set of weights from memory to the compute units again, plus the KV cache of everything so far.
That’s “like a matrix-vector operation that underutilizes the GPU compute ability compared to the prefill phase”, and the speed of moving data from memory “dominates the latency, not how fast the computation actually happens. In other words, this is a memory-bound operation.” Databricks’ engineering team puts it the same way: “Generating the first token is typically compute-bound, while subsequent decoding is memory-bound” (Databricks, 2023). The Splitwise paper describes “a compute-intensive prompt computation, and a memory-intensive token generation” (arXiv:2311.18677).
In kitchen terms: a 2,000-token ticket is read in about one trip to the pantry. A 500-token answer is 500 trips.
How big is the gap? Ceilings for one GPU
Here’s the back-of-the-envelope version for an NVIDIA H100 SXM, which has 3.35 TB/s of memory bandwidth and 1,979 TFLOPS of BF16 compute with sparsity, about 989 TFLOPS dense (NVIDIA H100). A transformer’s forward pass costs roughly 2 operations per parameter per token (Kaplan et al., arXiv:2001.08361).
- Maths per byte. 989 trillion operations a second ÷ 3.35 TB/s ≈ 295 operations for every byte the GPU fetches. Decoding for one user with 16-bit weights does about 2 operations per 2-byte parameter: about 1 per byte. The compute units sit idle more than 99% of the time.
- Tokens per second. Take an 8-billion-parameter model in 16-bit: 16 GB of weights. Reading them once at 3.35 TB/s takes 4.8 ms, so one conversation can get at most about 209 tokens a second. Prefill for the same model needs about 16 GFLOP per token, a compute ceiling near 61,800 tokens a second: roughly 300 times more.
These are textbook upper bounds, not what anyone gets in production. But one published measurement shows the same shape: in Databricks’ tests on their MPT models, “the addition of 512 input tokens increases latency less than the production of 8 additional output tokens.” Per token, that’s more than 64 times.
Why the price gap is 5×, not 300×: batching
A server doesn’t cook for one table. It batches: one read of the weights serves the next token of many conversations at once, because “the memory cost of the weights is spread out” (NVIDIA). With 64 conversations sharing each 4.8 ms read, the weights-only ceiling rises to about 13,400 tokens a second, which closes most of the gap.
What stops it closing completely is the KV cache, each conversation’s notes. For a Llama-3-8B-style model (32 layers, 8 KV heads, head size 128, fp16) that’s 2 × 32 × 8 × 128 × 2 bytes = 128 KB per token, or about 4.3 GB at a 32,768-token context. An 80 GB H100 holding 16 GB of weights has room for about 15 such conversations, and at that point each decode step reads roughly 64 GB of KV cache against 16 GB of weights: the notes weigh four times the recipe book. Long answers and long reasoning grow every conversation’s cache, so fewer fit in a batch.
This is why serving engines put so much effort into KV cache memory. PagedAttention found that the cache “can be significantly wasted by fragmentation and redundant duplication, limiting the batch size”, and vLLM’s paging improved throughput “by 2-4×” over the systems it compared with (arXiv:2309.06180); see also vLLM vs Ollama vs llama.cpp. vLLM’s chunked prefill mixes the two kinds of work on purpose, putting “compute-bound (prefill) and memory-bound (decode) requests to the same batch” (vLLM docs).
Some systems go further and split the kitchen. Splitwise runs prompt processing and token generation on separate machines and reports 1.4× higher throughput at 20% lower cost; DistServe puts prefill and decoding on different GPUs to avoid “strong prefill-decoding interferences” and reports serving up to 7.4× more requests within its latency targets (arXiv:2401.09670). Both numbers are the papers’ own results.
The output you never see
Reasoning models make this matter more, because their thinking is output too. OpenAI’s reasoning guide says reasoning tokens “are not visible via the API” but are “billed as output tokens” (OpenAI reasoning). Gemini’s price list labels its column “Output price (including thinking tokens)”. On Claude, usage.output_tokens_details.thinking_tokens “reports how many of the billed output tokens were internal reasoning” (Anthropic).
Here’s one request on Sonnet 5.5. With 3,000 tokens in and 600 out, output is a sixth of the tokens and half the bill. Add 2,400 thinking tokens and output becomes 83% of it.
| One request, Sonnet 5.5 | Input | Output | Total | Output share |
|---|---|---|---|---|
| 3,000 in, 600 out | $0.006 | $0.006 | $0.012 | 50% |
| + 2,400 thinking tokens | $0.006 | $0.030 | $0.036 | 83% |
Four ways to pay less
- Cap the output.
max_tokenson Claude andmax_output_tokenson OpenAI are hard ceilings that include thinking ("max_tokensremains the hard ceiling on total output"). OpenAI suggests reserving at least 25,000 tokens for reasoning and output when you start with reasoning models, so measure before you cap tightly: a reply cut off mid-thought is wasted money too. - Ask for short, structured output. A JSON object with three fields instead of an essay. One surprise: lowering effort doesn’t reliably shorten the reply. Anthropic’s effort docs say it “barely changes how long the model’s replies are” on Claude Fable 5.2, and that on Claude Opus 5 it “does not reliably shorten responses, so prompt for length instead”.
- Set the reasoning effort. Claude’s
output_config.effort(low, medium, high, xhigh, max) “affects all tokens in the response”, including thinking and tool calls; OpenAI’s reasoning effort goes fromnonetomaxdepending on the model. Simple jobs at low or medium think less. - Use the batch API for anything that can wait. Anthropic: “a 50 percent discount on both input and output tokens” (Sonnet 5.5 output $10 → $5). Gemini: “Batch API (50% cost reduction)”. OpenAI’s batch prices are about half of standard.
And for the input side, cache what repeats: on Sonnet 5.5 a cache hit is $0.10 per million instead of $2.
Takeaways
- Output costs 5× input on the newest models from all three big providers; at standard prompt lengths, other text models range from 4× to just over 8×.
- Input is read in one parallel, compute-bound pass. Output is written one token at a time, and every token re-reads the model from memory.
- Batching hides most of that gap; growing KV caches from long answers and long thinking bring it back.
- Thinking tokens are output tokens. Cap them, ask for less, lower the effort, and batch what can wait.
Sources
- List prices, read 25 Nov 2026: Anthropic pricing, OpenAI API pricing, Gemini API pricing
- Thinking and effort: OpenAI reasoning guide, Anthropic extended thinking, Anthropic effort, Gemini thinking
- Prefill and decode: NVIDIA, Mastering LLM Techniques: Inference Optimization (2023), Databricks, LLM Inference Performance Engineering (2023)
- Papers: Kaplan et al., Scaling Laws (arXiv:2001.08361), PagedAttention / vLLM (arXiv:2309.06180), Splitwise (arXiv:2311.18677), DistServe (arXiv:2401.09670)
- Hardware and serving: NVIDIA H100, vLLM optimization and tuning
The GPU numbers above are arithmetic on the spec sheet (ceilings, not measurements); no tests were run for this post.