Why are output tokens typically 3-5× more expensive than input tokens?
Explain the physical reason output tokens are priced 3-5× higher than input tokens. Tie the pricing back to the underlying hardware utilization.
Input is one parallel prefill pass that saturates compute, so it is cheap per token. Output is N sequential decode steps, each gated by HBM bandwidth, so providers price it 3-5x higher.
Imagine a bakery oven. Reading your order (the input) is like baking a full tray at once: you heat the oven once and dozens of cookies come out together, so each cookie is cheap. Writing the reply (the output) is like baking one cookie, taking it out, then reheating the whole oven for the next single cookie. The expensive part is not the cookie, it is firing up that huge oven again and again for one item at a time. The model weights are the oven, and loading them from memory is the reheating. Input bakes a whole tray in one pass. Output reheats per cookie. That is why the company charges you more for each word it writes than for each word it reads.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: prefill compute-bound versus decode bandwidth-bound, the roofline and arithmetic intensity argument, the per-instance decode throughput ceiling, how batching narrows the gap, then map the throughput ratio onto the 3-5x price band.
Real products, models, and research that use this idea.
- OpenAI prices GPT-5.5 output tokens several times higher than input, with cached input far cheaper still, reflecting the prefill versus decode split.
- Anthropic's Claude Opus 4.7 lists output at roughly 5x input, and prompt caching cuts repeated input cost to a fraction of full prefill.
- vLLM and SGLang use continuous batching to raise realized decode throughput, directly narrowing the input versus output cost gap on self-hosted Llama 4.
- NVIDIA's TensorRT-LLM disaggregates prefill and decode onto separate GPU pools so each phase runs at its own optimal batch and the decode cost floor drops.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does decode stay bandwidth-bound even when the GPU has spare compute?
QHow does batching change the input versus output cost ratio, and what bounds it?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Claiming output costs more because generation does more math. It is the opposite: decode does the same matmuls as prefill but spreads them over one token per weight read, so it is bandwidth starved, not compute heavy.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.