Why Claude Output Tokens Cost 5x More Than Input
Claude output tokens cost 5x more than input. See why decoding runs token by token, plus wetin the gap fit add to your agent bill every month.
Why output tokens cost pass input tokens
Output tokens dey cost five times wetin input tokens cost for every Claude model wey dey the current catalogue. Na the shape of the computation cause am. Reading prompt na one pass across the model. Writing reply na one pass for every token, and each pass gats wait for the one before am.
That ratio na the same for every row of the price list, so the model wey you choose no change how much of your bill go be output. Na the shape of your workload decide am. An agent step wey read 60,000 tokens and answer with 800 dey spend almost nothing for output. A drafting job wey read 2,000 tokens and write 12,000 dey spend almost nothing for input. We go work both cases below with Anthropic's published rates, wey we check on 27 October 2026.
Prefill dey run once, decoding dey run once for each token
Inference server dey handle request for two phases wey get very different costs. Prefill dey read the prompt. Decoding dey write the reply.
Prefill dey take the whole prompt at once. Every prompt token dey enter the network for the same forward pass, so the attention and feed-forward work become small number of large matrix multiplications wey cover thousands of tokens at once. One read of the model weights from memory dey serve the whole prompt. The accelerator's matrix units dey busy, so prefill usually dey compute-bound: the limit na how fast the chip fit multiply. NVIDIA's serving documentation name the exceptions: very short prefills, and prefills wey get long prefix already as cache hit, become memory-bound instead.
Ordinary decoding no fit work that way, because token 2 dey depend on token 1. The token wey model just produce become part of the input for the next step, so the steps dey run one after another. Each output token get im own forward pass, and each pass dey read the full set of model weights, plus the KV cache (key/value cache, the stored attention state for every token so far), from high-bandwidth memory to produce one token. This usually make decoding memory-bound: the limit na how fast weights and cached state fit move, no be how fast dem fit multiply, and for long contexts NVIDIA single out KV cache reads as the bottleneck. The same weight traffic wey use the whole prompt during prefill dey give you one token during decoding.
Speculative decoding bend this rule without breaking am. One small draft model guess several tokens ahead, and the large model check all of dem in parallel for one pass, wey NVIDIA talk say fit shift decode toward compute-bound. The large model still accept the guesses in order and stop for the first wrong one, so long reply still cost many passes.
Serving systems dey fight back with batching. Many requests dey decode together, so one read of the weights dey produce one token for every request for the batch. Na why decoding dey affordable at all. The ceiling still na memory. Every request wey dey in flight hold im own KV cache, that cache dey grow with every token generated, and when e fill the accelerator the batch no fit grow again.
None of that give you exact number, and you no suppose read 5x as measured hardware ratio. Na price wey Anthropic set, based on that asymmetry. Wetin you fit check by yourself na the direction, and e dey take about one minute.
Measure the input and output gap by yourself
Install the tools for any Ubuntu box:
sudo apt update && sudo apt install -y curl jq moreutilsNow stream one short prompt wey dey ask for long answer, and put the time wey each line arrive for am.
curl -sN https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-5","max_tokens":1000,"stream":true,
"messages":[{"role":"user","content":"Count from 1 to 300, one number per line."}]}' \
| ts -s '%.s'ts -s put the seconds wey don pass since command start for front of each line. Two things dey worth reading from that output. The first content_block_delta line na your time to first token, and all the prefill happen inside am. Every line after that na one small step of decoding, and the timestamps keep increasing until message_stop show.
Now reverse the shape. Put one long document inside the prompt and limit the answer to a few tokens.
curl -sN https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d "$(jq -n --rawfile doc ./long-document.txt \
'{model:"claude-sonnet-5", max_tokens:16, stream:true,
messages:[{role:"user", content:("Answer in one word. Is this document about networking?\n\n" + $doc)}]}')" \
| ts -s '%.s'The first delta take longer than when the prompt short, because prefill get much more text to read. After e arrive, the response finish almost immediately, because na only few tokens remain to decode. Tens of thousands of tokens enter, but the clock barely move. A few hundred come out, but the clock run throughout.
Every non-streaming response end with the numbers wey dem use bill you.
{
"usage": {
"input_tokens": 41283,
"output_tokens": 6,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}Log all four fields for each request. output_tokens include thinking tokens, so if model think before e answer, dem bill that thinking for the output rate. To price prompt before you send am, POST /v1/messages/count_tokens take the same request body for most requests, return {"input_tokens": N} as estimate without running the model, and e free within its own rate limit. E reject some request bodies wey the Messages API accept: most server tools like web search, the MCP connector, and image or document blocks wey get url or file source, so send images and PDFs as base64 when you dey count dem. E no be the only part of the API wey cost nothing, and which parts of the Claude API dem never bill you for dey worth checking before you budget your first project.
How Claude dey charge per million tokens as of October 2026
Di data wey dey behind dis chart
[
{
"label": "Haiku 4.5",
"input_usd": 1,
"output_usd": 5,
"output_multiple": 5
},
{
"label": "Sonnet 5",
"input_usd": 2,
"output_usd": 10,
"output_multiple": 5
},
{
"label": "Opus 5",
"input_usd": 5,
"output_usd": 25,
"output_multiple": 5
},
{
"label": "Fable 5",
"input_usd": 10,
"output_usd": 50,
"output_multiple": 5
}
]The last column na output divided by input, and e dey show 5 for every row. Haiku 4.5 dey charge $1 for input and $5 for output. Opus 5 dey charge $5 and $25. Fable 5, wey cost pass, dey charge $10 and $50, and wetin those Fable 5 rates fit buy you worth reading before you dismiss that top row. As you move up the range, both sides multiply by the same factor, so e change your total but leave your input-to-output split exactly as e be.
Sonnet 5 dey charge $2 for input and $10 for output. Anthropic launch am at that rate as introductory pricing until 31 August 2026, with increase to $3 and $15 planned for 1 September, then e make $2 and $10 the standard price instead. The increase no ever happen, so the rate for every worked example below na the rate wey you pay today.
Anthropic don also release newer models since this page first come out, and claude.com/pricing now list the four above as legacy models wey still dey available. The new ones still keep the same 5x ratio. Opus 5.5 dey charge $4 and $20, Sonnet 5.5 dey charge $2 and $10, Fable 5.1 dey charge $10 and $50, and Haiku 5.5 dey charge $0.10 and $0.50 for prompts up to 100,000 tokens, then e rise to $0.50 and $2.50 above that. The 60,000 token agent step wey cost further down dey under that limit, but agent wey history dey grow go eventually cross am, and how Haiku 5.5 two price tiers dey work for real jobs show wetin that jump do to bill. Opus 5.5 base input and output rates dey 20% below Opus 5 rates, so every uncached Opus 5 figure below dey 20% lower for Opus 5.5. Cached figures fall further, because Opus 5.5 dey read cache hits at $0.20 per million tokens compared with $0.50 for Opus 5, na 60% cut. The cached agent step wey cost $0.0725 for Opus 5 further down go cost about $0.047 for Opus 5.5, roughly 35% less.
Rates dey change, and this page no be where you suppose check dem. claude.com/pricing na the source of truth. The method na wetin remain after price change.
One warning dey inside the notes under Anthropic price table, instead of inside the rates themselves. Anthropic pricing page talk say Claude 4.7 and later models dey use newer tokenizer wey produce roughly 30% more tokens for the same text than the tokenizer for Sonnet 4.6 and earlier. If you compare two models only by price per million tokens, the newer one go look better than e really be, because the same document go get more tokens for am. Compare cost per finished task, and count your real prompts against the model wey you actually plan to use. The same trap dey between providers, because their tokenizers differ too, so how to calculate the cost of one real job on both Claude and ChatGPT go tell you more than putting the two rate cards side by side. wetin one million Claude tokens worth for real text cover how that volume dey look for practice.
When output dey start to dominate your bill?
Since output price na 5 times input price, you fit remember the break-even point easily. Make we call your input tokens I and output tokens O. Input cost na I. Output cost na 5 times O. Output pass half of your total spend when 5 times O bigger than I. This mean say token ratio na 5 input to 1 output.
So if your prompt long pass your reply more than five times, input na the bigger cost item. Below that point, output na the bigger one.
Di data wey dey behind dis chart
[
{
"label": "100:1",
"input_share_pct": 95.2,
"output_share_pct": 4.8
},
{
"label": "75:1",
"input_share_pct": 93.75,
"output_share_pct": 6.25
},
{
"label": "20:1",
"input_share_pct": 80,
"output_share_pct": 20
},
{
"label": "10:1",
"input_share_pct": 66.7,
"output_share_pct": 33.3
},
{
"label": "5:1",
"input_share_pct": 50,
"output_share_pct": 50
},
{
"label": "1:1",
"input_share_pct": 16.7,
"output_share_pct": 83.3
},
{
"label": "1:6",
"input_share_pct": 3.2,
"output_share_pct": 96.8
}
]For 100 to 1, output na 4.8% of the total spend, so na only prompt reduction worth doing. For 5 to 1, both sides cost the same. For 1 to 6, output na 96.8%, and prompt cost almost no longer matter. Many people dey guess their own ratio wrongly. Check your logs first before you optimise anything.
Agent workload: long context enter, short answer commot
Make one retrieval agent step: retrieved documents and conversation history get 60,000 input tokens, while the answer get 800 tokens. That one na 75 to 1, and na normal for anything wey dey read before e write.
Di data wey dey behind dis chart
[
{
"label": "Haiku 4.5",
"input_cost": 0.06,
"output_cost": 0.004,
"total_cost": 0.064
},
{
"label": "Sonnet 5",
"input_cost": 0.12,
"output_cost": 0.008,
"total_cost": 0.128
},
{
"label": "Opus 5",
"input_cost": 0.3,
"output_cost": 0.02,
"total_cost": 0.32
},
{
"label": "Fable 5",
"input_cost": 0.6,
"output_cost": 0.04,
"total_cost": 0.64
}
]Output na 6.25% of that call for every model, because the ratio no change across the whole price list. The call cost $0.32 for Opus 5, $0.128 for Sonnet 5, and $0.064 for Haiku 4.5. Two hundred of those steps every day for Opus 5 na $64 per day.
The main lever dey obvious once you see the split. If you cut the answer from 800 tokens to 400, you save about 3% of the call. If you remove 20,000 tokens of stale context from the prompt, you save about one-third of the cost. Reducing output length for an agent wey mostly dey read na almost wasted effort. where a coding agent tokens dey really go explain wetin dey fill that prompt from the start.
Generation workload: short prompt, long draft
Now make we change the format. A 2,000 token brief, a 12,000 token draft, ratio na 1 to 6.
Di data wey dey behind dis chart
[
{
"label": "Haiku 4.5",
"input_cost": 0.002,
"output_cost": 0.06,
"total_cost": 0.062,
"batch_total_cost": 0.031
},
{
"label": "Sonnet 5",
"input_cost": 0.004,
"output_cost": 0.12,
"total_cost": 0.124,
"batch_total_cost": 0.062
},
{
"label": "Opus 5",
"input_cost": 0.01,
"output_cost": 0.3,
"total_cost": 0.31,
"batch_total_cost": 0.155
},
{
"label": "Fable 5",
"input_cost": 0.02,
"output_cost": 0.6,
"total_cost": 0.62,
"batch_total_cost": 0.31
}
]Output na 96.8% of this bill. Opus 5 cost $0.31 for each draft, compared with $0.062 for Haiku 4.5. Almost all of that five times difference come from the output side, and na exactly there cheaper model dey save you the most.
The last column na the same job through Batch API, wey reduce input and output cost by 50%. Opus 5 cost $0.155 for each draft. Batch dey run asynchronously, so e no return result immediately. Anthropic talk say most batches finish under one hour, but if batch still dey process after 24 hours, e expire. Any request wey e never reach by then come back as expired, no billing, and without message. So e fit work for overnight report generation and bulk classification, with resubmit step for anything wey expire. E no fit work for anything wey person dey wait for.
Model routing dey useful here in a way wey e no dey useful for the agent step. If the verbose part of the job na mechanical work, like reformatting text or expanding outline wey you don already approve, the cheap model fit produce those tokens at one-fifth of the price. choosing between Opus, Sonnet and Haiku explain where the quality line actually dey.
Caching dey give discount for input only
Prompt caching dey store one prefix of your prompt for server, then e charge small part of input rate to read am again. As of 27 October 2026, the multipliers na 1.25x of the base input rate to write 5 minute cache, 2x to write 1 hour cache, and 0.1x to read one hit for the models wey get price for this page. The newest models dey read hits cheaper: 0.05x for Opus 5.5 and Sonnet 5.5, and 0.025x for Fable 5.1.
Output no dey inside that deal. No cached output dey. Every token wey the model write dey billed with the full output rate every time, no matter how much of the prompt come back as cache hit.
Take the same agent step for Opus 5, with 55,000 of the 60,000 input tokens served from warm cache.
Di data wey dey behind dis chart
[
{
"label": "No cache",
"input_cost": 0.3,
"output_cost": 0.02,
"total_cost": 0.32
},
{
"label": "55k prefix cache read",
"input_cost": 0.0525,
"output_cost": 0.02,
"total_cost": 0.0725
}
]The call cost drop from $0.32 to $0.0725. The output line no change: $0.02 before, $0.02 after. Caching cut the bill and change how e dey divide. Output na 6.25% of that call before. Now e pass one quarter of the call, so e change which lever make sense to pull next.
The first call dey pay for the write. 5 minute cache write cost 1.25x base input, so one hit don make am pay for itself. 1 hour write cost 2x, so e need two hits. the write and read multipliers, and where caching stops paying explain that arithmetic.
Four levers wey you dey control
- Set
max_tokensfor your p95 output length, no be for the model maximum. - Route the verbose steps go cheaper model.
- Batch anything wey nobody dey wait for.
- Delete instructions wey dey make replies longer.
max_tokens na hard ceiling, and setting am high no cost anything by itself, because dem dey bill you for tokens wey dem produce, never for the ceiling. Wetin generous cap dey do na to remove the limit from reply wey go wrong. Pull the output_tokens distribution from your logs, set the cap small above the 95th percentile, and handle stop_reason: "max_tokens" for code by continuing the response or retrying. Truncation wey you detect cost less than 4,000 token ramble wey you pay for then throw away. Thinking dey enter output_tokens too and dey count against max_tokens, so size the cap from the same evidence, and for models with adaptive thinking reduce the effort level if thinking dey use up the reply.
Routing dey work when na volume, no be judgement, dey make one step expensive. Keep the strong model for the decision, then hand the typing go something cheaper. Measure the routed version with your own evaluation set first, because the number wey matter na cost per finished task. For the agent step above, two Haiku 4.5 attempts cost $0.128 against $0.32 for one Opus 5 attempt, so the price gap fit cover one or two retries. Wetin e no fit cover na wrong answer wey nobody catch.
Batching na the only lever wey dey discount output. 50% off for both sides, most batches dey finish within one hour, and anything wey dey run on schedule qualify, as long as the job resubmits anything wey expire for the 24 hour mark.
The last lever na the one people dey skip. Phrases like "be thorough" and "explain your reasoning" dey set your output length for every call wey you go ever make. Replace dem with the shape wey you want: "Answer in at most three sentences", or "Return only the JSON object, with no preamble". System prompt wey adds 300 tokens to every reply cost five times wetin the same 300 tokens cost for the prompt. keeping the costs of a running agent under control cover the monitoring side, and whether the API or a flat subscription cheaper for your pattern make sense to settle before you spend one week tuning per-token spend wey subscription for don cover. For one developer, e mostly come down to whether Claude Pro's $20 a month and the usage limits wey come with am cover the work wey you for otherwise dey meter. If you don already dey hit those limits for middle of session, working out which window you dey wait for come first, because the fix from there fit be smaller model, lighter context, extra usage credits, or moving that work go the metered API. If the metered API turn out to be the cheaper home for that work, dropping to a smaller plan or cancelling am leave the month wey you don already pay for intact, so switching no cost you anything as you dey leave. If the plan wey you dey compare with Pro na ChatGPT own instead of the metered API, the two subscription ladders priced side by side show which one cheaper for coding work. If na team dey ask the question instead of one developer, note say Claude Enterprise combine per-seat fee with tokens metered at these same API rates, so every lever for this page still apply to the metered half of that bill.
FAQ
Why output tokens dey cost pass input tokens?
To generate dem dey use far more accelerator time for each token. System dey process prompt for one forward pass across the whole thing, so one read of model weights fit cover thousands of tokens, and hardware usually dey limited by multiply throughput. For normal decoding, system dey produce reply one token at a time. Each token need its own forward pass wey go read model weights and the growing KV cache again, so hardware usually dey limited by memory bandwidth instead. Techniques like speculative decoding fit reduce the gap, but dem no remove am. Anthropic prices output five times pass input across the whole current catalogue, from Haiku 5.5 reach Fable 5.1.
Prompt caching dey make output tokens cheaper?
No. Prompt caching na for input only. As of 27 October 2026, cache read cost 0.1x the base input rate for most models (0.05x for Opus 5.5 and Sonnet 5.5, 0.025x for Fable 5.1), and cache writes cost 1.25x for the 5 minute duration or 2x for the 1 hour duration. Output dey billed at the full rate for every call, no matter wetin cache do. Na why caching dey change the shape of your bill and also the size: once the input side reduce plenty, output become the part wey make sense to reduce.
High max_tokens fit cost me money if the reply come back short?
No. Dem bill you for the tokens wey model actually produce, so max_tokens na ceiling, no be reservation. E still matter because na the only hard limit for reply wey fit run too long. Set am small above the 95th percentile of your observed output_tokens, then handle stop_reason: "max_tokens" for code instead of shipping answer wey truncate silently.
How I fit find my own input-to-output token ratio?
Log input_tokens, output_tokens, cache_read_input_tokens and cache_creation_input_tokens from the usage object of every response, then divide the totals across one week. If input-to-output ratio pass 5 to 1, na prompt dey use your money, so cache the stable part and reduce the rest. If e fall below that, na reply dey use your money, so limit the length and move the steps wey generate most of am to cheaper model or to the Batch API.