A 300-page book runs to roughly 90,000 words. Multiply by 1.33 and you get about 119,700 tokens, which fits inside every million-token window on the market with room to spare. Send that book to Claude Opus 5 at $5.00 per million input tokens and every question you ask about it costs $0.60 before the model has written a single word of the answer. Ask 3,000 questions in a month and the book alone — not the answers, the book — costs $1,795. The book has not changed. You have paid for it 3,000 times.
That is the whole argument this calculator exists to settle, and everything below explains how it gets to its number.
Where the 1.33 comes from
Models do not read words. They read tokens: sub-word fragments produced by a tokeniser that splits common words whole and rare words into pieces. Across ordinary English prose the ratio settles at about 1.33 tokens per word, which is the multiplier used here. Put 180,000 words in and the calculator bills you for 239,400 tokens.
The ratio is not universal. Code, JSON, CSV rows and anything with long identifiers or heavy punctuation runs closer to 1.5 to 2.5 tokens per word, because getUserAccountPreferences is four or five tokens where "preferences" is one. Non-Latin scripts are worse again. If your corpus is a codebase or a database export rather than prose, treat the figure here as a floor and check the real count with the token estimator before committing to a budget. For contracts, transcripts, support tickets and documentation, 1.33 is close enough that the error is smaller than the month-to-month variation in your traffic.
What the window actually constrains
A context window is a per-request ceiling on input and output combined. It is not an allowance, not a monthly quota, and not memory. Claude Opus 5 and Claude Sonnet 5 accept 1,000,000 tokens; GPT-5.6 across all three tiers accepts 1,050,000; Claude Haiku 4.5 stops at 200,000. Feed our 239,400-token example to Haiku and the call is rejected outright — you chunk or you retrieve, and cost never enters the conversation.
The distinction that costs people money is between fitting and repeating. Every API call is stateless. The model has no recollection of the previous request, so the same 239,400 tokens are transmitted, processed and billed again on every single query. The window tells you whether one call is possible. The price tells you what happens when you make thousands.
A million tokens is a ceiling, not a target
Two things degrade as the prompt grows, and neither appears on a pricing page.
The first is latency. Prefill scales with input length, so a quarter-million-token prompt adds seconds before the first output token arrives. For a batch job that is irrelevant. For anything a person is waiting on, it is the difference between a tool people use and one they route around.
The second is recall. Across published needle-in-a-haystack testing, models reliably retrieve a fact placed near the start or the end of a long context and measurably less reliably retrieve one buried in the middle. The effect worsens as the context fills and as the task requires combining several scattered facts rather than finding one. A model advertising a million-token window is telling you what it will accept, not what it will reason over evenly. Filling 90% of a window and expecting uniform attention across it is the most common way long-context systems quietly get worse without anyone noticing, because the failure mode is a confident answer that omits something, not an error.
Retrieval sidesteps this by construction. Four thousand well-chosen tokens are four thousand tokens the model attends to properly.
Reading the crossover table
Take the defaults: 180,000 words, 3,000 queries a month, 400-token answers, Gemini 2.5 Flash at $0.30 input and $2.50 output per million.
Stuffing, per call: 239,400 ÷ 1,000,000 × $0.30 = $0.07182 of input, plus 400 ÷ 1,000,000 × $2.50 = $0.001 of output. That is $0.07282 a call, or $218.46 a month.
Retrieval, per call: 4,000 ÷ 1,000,000 × $0.30 = $0.0012 of input, plus the same $0.001 of output. That is $0.0022 a call, or $6.60 a month. Thirty-three times less, for output that is often better because the model is not hunting through 235,000 tokens of irrelevance.
The gap is $211.86 a month, $2,542 a year. If building the retrieval pipeline costs you two engineer-weeks — call it $6,000 fully loaded — it pays back in 28 months and you should not bother. Stuff the context and move on.
Now change one field. Run the identical workload on Claude Opus 5 at $5.00 input and $25.00 output: stuffing costs $1.207 a call and $3,621 a month, retrieval costs $0.03 a call and $90 a month. The same $6,000 of engineering now pays back in 1.7 months. The crossover is driven as hard by model tier as by query volume, which is why the table lets you sweep volume while you change the model — run it twice and the pattern is obvious.
Prompt caching shifts the line without moving it. At a 90% cache hit rate on Gemini 2.5 Flash, cached input at $0.03 per million gives an effective rate of $0.057, cutting the stuffed month from $218.46 to $43.95. Better, but still 6.7 times the retrieval cost, and only if your traffic genuinely hits the same cached prefix inside the cache's lifetime. Set that field to what your logs show, not what you hope. The prompt caching savings calculator prices the hit rate question properly.
Where retrieval is the wrong answer
Retrieval is a lossy filter with an engineering bill attached, and it fails at tasks that need the whole document at once: summarise this contract, find every inconsistency across these twelve chapters, tell me what is missing. No chunk ranking can answer "what is missing" because the answer is not in any chunk. Those workloads want the full context, and the right response to the cost is a cheaper model tier rather than a retrieval layer.
Low volume is the other case. A hundred queries a month against a stuffed context on Gemini 2.5 Flash costs $7.28. Nothing you build will beat free.
Run the numbers with your real query volume, then read the annual difference rather than the monthly one — that is the figure to weigh against engineering time. If it comes to less than a fortnight of a developer's cost, the pipeline is not worth building yet. Our long context versus retrieval guide covers the quality trade-offs on both sides of that line.
Prices used by this calculator were last verified on 15 August 2026 from the vendors' own pricing pages. See the full price index for every figure and its source, the change log for what has moved recently, and the methodology for how the index is maintained and where its limits are.