AI economics · Free calculator

Context Window Cost Calculator

See exactly what a big context window costs you. Model per-turn compounding across a conversation and compare full history against summarization and truncation strategies.

Disclaimer: Model prices move constantly. Every rate here is an editable input, not a quote — pull the current price page for your provider before you lock a margin model. Token counts are estimates (~0.75 words per token) and vary by tokenizer and language.

20,000

System prompt + retrieved docs sent every turn.

10
120
500
3
15
5

0 = never summarize (send full history).

10%
5,000
Try it like this

Tap a scenario to load realistic numbers, then tweak the sliders.

New here? Watch it work in 2 seconds — then tweak it for you.
Advertisement
Formula used

Per-turn context compounding

A 200k context window doesn't mean you can stuff 200k tokens into every call for free — it means you pay for every token, every turn. This walks the conversation turn by turn and compares full history against periodic summarization.

Input_total = Σ(base + history_t + user_t), history_t = Σ prior (user + output)
10-turn chat vs 1 turn
8–15× the cost
Typical summarization reduction
~90% of history tokens
Cached context discount
75–90% off input
Input vs output price ratio
1:3 to 1:5
Backlink-friendly embed

Embed this calculator

Free to embed on any site. Inputs preserved, link back to RevenueLab. Each format trades polish for SEO juice.

<iframe src="https://www.revenuelab.fyi/embed/context-window-cost-calculator?baseContext=20000&turns=10&userTokens=120&outputTokens=500&inputPrice=3&outputPrice=15&summariseEvery=5&summaryRatio=10&conversations=5000" width="100%" height="680" style="border:0;border-radius:12px;max-width:100%" loading="lazy" title="Context Window Cost Calculator"></iframe>
<p style="font:12px/1.4 system-ui;color:#666;margin:6px 0 0">Calculator by <a href="https://www.revenuelab.fyi/context-window-cost-calculator?baseContext=20000&turns=10&userTokens=120&outputTokens=500&inputPrice=3&outputPrice=15&summariseEvery=5&summaryRatio=10&conversations=5000" target="_blank" rel="noopener">RevenueLab</a></p>

Easiest to install — passes referral traffic and a referring-domain signal.

Cite this calculator

Writing about this topic? Grab a citation — every link helps keep these tools free.

APA
RevenueLab. (2026). Context Window Cost Calculator. Retrieved from https://www.revenuelab.fyi/context-window-cost-calculator
HTML
<p>Source: <a href="https://www.revenuelab.fyi/context-window-cost-calculator" target="_blank" rel="noopener">Context Window Cost Calculator — RevenueLab</a> (2026).</p>
Markdown
Source: [Context Window Cost Calculator — RevenueLab](https://www.revenuelab.fyi/context-window-cost-calculator) (2026).

The context-window trap

Big context windows are marketed as a capability. They are also a billing mechanism. A 10-turn conversation carrying 50k tokens of retrieved context costs 10× a single-turn call — on a $3/M input model that's about $1.50 per conversation. Fine for an enterprise tool; lethal for a consumer chatbot at $20 a month.

Three fixes, in order of return

Summarize the conversation every 4–6 turns and discard raw history (a 90% token reduction is normal). Cache the fixed portion — system prompt and stable retrieved chunks — for 75–90% off that slice. Retrieve less: top-3 well-ranked chunks usually beat top-10 mediocre ones, at a third of the tokens.

  • Summarize every 4–6 turns; keep a rolling gist, not a transcript.
  • Cache the system prompt and stable context.
  • Cut top-k retrieval and rerank instead of over-fetching.
  • Trim tool definitions — they're input tokens on every single call.

Long context also degrades quality

This isn't only a cost argument. Models reliably show 'lost in the middle' behaviour, where information buried in a long context is retrieved less accurately than the same information at the start or end. Shorter, better-curated context is usually both cheaper and more accurate.

FAQ

Why does my chat cost more than my per-turn estimate?

Because every turn resends the system prompt, retrieved context, and the full prior conversation. Turn 10 pays for turns 1–9 all over again. A 10-turn conversation typically costs 8–15× a single turn, not 10× a user message.

How much does a 200k-token context call cost?

At $3 per million input tokens, a single 200k-token call costs $0.60 in input alone — before output. Ten such turns is $6 per conversation. This is why long-context workflows need caching or aggressive retrieval limits.

How much does summarization actually save?

Summarizing every 4–6 turns and discarding raw history typically cuts history tokens by around 90%. On a long conversation that's commonly a 40–70% reduction in total input spend.

Is caching better than summarization?

They solve different halves. Caching discounts the fixed portion (system prompt, stable docs) by 75–90%. Summarization shrinks the growing portion (conversation history). Production systems should do both.

Should I just use a bigger context window instead of RAG?

Rarely. Stuffing everything into context costs more per call and retrieves less accurately for information buried mid-context. RAG keeps the prompt small and targeted — cheaper and usually more accurate.

Do tool definitions count as input tokens?

Yes, and they're easy to forget. A dozen verbose tool schemas can be several thousand tokens resent on every single call. Trim descriptions and only expose the tools relevant to the current step.

How this calculator is built

Independently maintained

Written by Sam Doshi and the RevenueLab editorial team. We don't sell the data feeds this tool is built on.

Sourced from primary data

Benchmarks come from public AdSense / Stripe / IRS disclosures and reader-submitted data — never third-party "$X per view" claims. Full methodology.

Last editorial review

Reviewed on a rolling quarterly cycle. Dated reviews are published on the methodology record for each calculator.

Editorial standards

See our editorial policy and disclaimer. Results are estimates, not advice.