Multi-turn · agent & chat · prompt caching
LLM Conversation Cost Simulator
Every other LLM cost calculator prices one prompt. This one prices the whole conversation. Because the model is stateless, your full history is resent as input on every turn — so a 10-turn chat or a long-running agent costs far more than a single call, and prompt caching is where you win it back. Set your turn count and token sizes, watch the cost curve, and read the caching savings. Everything runs in your browser.
—
Per-turn breakdown+
| Turn | Input tokens | Turn cost · no cache | Cumulative · no cache | Turn cost · cached | Cumulative · cached |
|---|
How it works
Why turn 10 costs more than turn 1
An LLM API is stateless — it remembers nothing between calls. To continue a conversation, your client resends the entire history as input every single turn: the system prompt and tool definitions (fixed, resent each turn), plus the full transcript of every previous user message and model response, plus the new message. So the input on turn t is system + tools + (t−1) previous turns + new user message. That grows linearly with the turn number, which means cumulative input cost grows with the square of the turn count. Output cost per turn stays roughly flat — it is the resent input that quietly explodes.
Prompt caching is the fix. Providers let you mark the stable prefix so it is served from a cache at roughly one tenth of the input price on repeat, instead of full price every turn. You pay a one-time cache-write premium (about 1.25× input) when new content enters the cache, but on a long conversation the repeated cache reads dominate and total input cost falls 70–90%. This simulator computes both curves — with and without caching — from your exact token sizes, so you can see the gap before it lands on an invoice.
Describe a turn
Set the fixed system prompt and tool block, plus the average user and assistant tokens per turn.
Set the length
Slide the turn count from a quick 3-turn chat up to a 50-turn agent run.
Read the curve
Watch cumulative cost climb, with and without caching, and see turn N vs turn 1.
Value the caching
Get the dollars and percent that prompt caching claws back for this exact conversation.
Worked example
A 10-turn Opus conversation
Without caching
Input tokens resent, turn 1 = 2,000 + 1,000 + 200 = 3,200
Input tokens resent, turn 10 = 2,000 + 1,000 + 9x700 + 200 = 9,500
Total input over 10 turns = 63,500 tok -> $0.3175 (@ $5 / 1M in)
Total output over 10 turns = 5,000 tok -> $0.1250 (@ $25 / 1M out)
Total conversation cost = $0.4425
Turn 10 costs 2.1x turn 1 (all history, resent every turn)
With prompt caching (read 0.1x input, write 1.25x input)
Cache reads over 10 turns = 54,000 tok -> $0.0270
Cache writes over 10 turns = 9,500 tok -> $0.0594
Total input with caching = $0.0864 (vs $0.3175 -> input down 73%)
Total output (never cached) = $0.1250
Total conversation cost = $0.2114
Saved by caching = $0.2311 = 52% of total cost
(73% of input cost; output dilutes the total)
Bump the turn count or shrink the system prompt and the story changes: with a small fixed prefix the growing history dominates, turn 10 can cost 5–7× turn 1, and caching's percentage savings climb. The tool above recomputes all of this live.
Reading the numbers
What this does and doesn't model
This is a planning model, built to show the shape and scale of multi-turn cost — not a billing-exact figure. It makes a few explicit, honest assumptions:
- Fixed average token sizes per turn. Real messages vary; use representative averages. Token counts here are round numbers, not tokenizer output.
- A cache hit on every turn. The with-caching curve assumes turns happen within the cache time-to-live (5 minutes on Anthropic by default) and that the whole conversation prefix is cached each turn. Idle gaps longer than the TTL, or misplaced cache breakpoints, reduce real savings.
- Output is never cached. Correct across all providers — only the repeated input prefix is discounted. On reasoning models, thinking tokens bill as output and are not modeled separately here.
- Standard synchronous pricing. Batch discounts (~50%), context-length premiums, and Gemini's per-hour cache storage fee are not included.
Caching rates and list prices are a dated snapshot (see below). Use this to compare architectures and decide whether caching is worth wiring up — then confirm the exact number against your provider's usage dashboard.
FAQ
Common questions
How much does a multi-turn LLM conversation cost?+
Far more than a single prompt, because the model is stateless: on every turn you resend the entire conversation history as input. Turn 1 pays for the system prompt plus one message; turn 10 pays for the system prompt plus nine full previous turns plus the new message. Input tokens per turn grow roughly linearly, so cumulative input cost grows with the square of the turn count. This simulator computes the exact per-turn and cumulative cost for your token sizes and turn count.
Why does my LLM agent get more expensive every turn?+
Because the API has no memory. Each request must carry the full context: the system prompt and tool definitions (resent every turn), plus the growing transcript of every previous user message and model response. By turn 10 a chat can send several times the input tokens it sent on turn 1, and an agent with a large tool block and long history can be much worse. Output cost per turn stays roughly flat, but input cost climbs with every turn.
Does prompt caching really save money on conversations?+
Yes, and multi-turn conversations are exactly where it pays off most. The stable prefix (system prompt, tool block, and already-seen history) is served from cache at roughly one tenth of the input price on Anthropic and OpenAI's newer models, instead of full price every turn. You pay a one-time cache-write premium (about 1.25× input) for new content, but the repeated reads dominate. On a typical long conversation, caching cuts total input cost by 70 to 90 percent; total cost falls less because output tokens are never cached.
How is prompt caching priced across providers?+
As of July 2026: Anthropic charges about 0.1× the input rate for a cache read and about 1.25× for a cache write, with a 5-minute default time-to-live. OpenAI's GPT-5.6 family caches at about 0.1× read and 1.25× write; the older GPT-4.1 family uses about 0.25× cached input with no separate write fee. Google Gemini context caching reads at about 0.1× and writes at about 0.25×, plus a per-hour storage fee this tool does not model. Every provider only discounts the repeated prefix, never the newly generated output.
What is the difference between single-prompt and multi-turn token cost?+
A single-prompt calculator prices one request: input tokens plus output tokens, once. A multi-turn simulator accounts for the conversation resending its whole history every turn, so the same system prompt and the same early messages are billed again and again. For anything conversational — chatbots, copilots, autonomous agents — the multi-turn number is the one that shows up on the invoice, and it can be several times the naive single-prompt estimate. (For the single-prompt case, use our LLM Token Cost Calculator.)
Is this an exact bill or an estimate?+
It is a planning model, not a billing-exact figure. It assumes fixed average token sizes per turn, a cache hit on every turn (turns within the cache TTL), and the full conversation cached at each turn. Real conversations vary in message length, tool calls add tokens, thinking tokens are billed as output on reasoning models, and cache hits depend on your breakpoint placement and traffic timing. Treat the output as a well-grounded estimate of the shape and scale of your cost, then verify against your provider's usage dashboard.