Conversation Cost Calculator
Multi-turn chat cost is non-obvious — history grows quadratically. Compare full history, sliding window, summarization, and caching strategies to find the cheapest approach for your chatbot.
| Strategy | Cost / conv | Monthly (10,000) | vs full | Quality trade-off |
|---|---|---|---|---|
| Full history | $0.0360 | $360.0000 | baseline | No trade-off — full context |
| Sliding window (K=5) | $0.0255 | $255.0000 | −29.2% | Loses early context after turn 5 |
| Summarize (M=10) | $0.0277 | $276.7500 | −23.1% | Loses precise detail in summaries |
| Cached prefix | $0.0317 | $317.2500 | −11.9% | No trade-off — only system prompt cached |
Prices verified 2026-08-20 · Caching Calculator · Agent Cost Calculator
How to Use
Set conversation structure
Enter system prompt size, average user message and assistant response sizes, and the number of turns in a typical conversation.
Choose your model
Select from 30+ live-priced models. Caching-enabled models unlock the prompt caching strategy estimate.
Tune strategy parameters
For sliding window: how many turns to keep. For summarization: how often to summarize (every M turns). Adjust to see quality vs cost tradeoffs.
Compare strategies
The bar chart shows all 4 strategies side-by-side at your conversation length. The table shows cost at 10, 25, 50, and 100 turns.
Full history vs sliding window — the math
FULL HISTORY (naive): Total_input = T·S + (U+A)·T·(T−1)/2 ← quadratic! SLIDING WINDOW (last K turns, T > K): Total_input = T·S + (U+A)·[ K(K−1)/2 + (T−K)·K ] At T=20, K=5, S=1000, U=100, A=300: Full history: 80,500 input tokens Sliding window: 25,500 input tokens (68% less) SUMMARIZE EVERY M TURNS: Resets history to ~150 token summary + extra API call per summarization event CACHING on S: Turn 1: full S price Turns 2+: cache-read price for S (10% on Anthropic)
How to Cut This Cost
Use a sliding window (K=5–10) instead of full history. Most conversations need only recent context.
Summarize every 10 turns. Inject the summary as a compact history — pays a small summary cost but cuts input by 60–80%.
Cache your system prompt. A 5,000-token system prompt sent over 20 turns is 95,000 tokens — caching drops that to ~14,500 tokens total.
Use a cheap model for history turns and a capable model only for the final response — route within your conversation pipeline.
FAQ
Have more questions? Contact us
Last verified: 2026-08-20 · methodology · data sources