waynetools

Guides · LLM & Cost

How Much Does a Multi-Turn LLM Conversation Actually Cost?

Every cost guide prices one token. That is not the number on your invoice. Because the API is stateless, a conversation resends its whole history as input on every turn — so cost grows with the square of the turn count. Here is the clear math, a worked example with real numbers, and why prompt caching is the single biggest lever you have.

Verified 2026-07-13 Worked example, real prices USD per 1M tokens
Direct answer

In a multi-turn conversation you pay the entire history as input on every turn, so cumulative cost grows with the square of the number of turns — not linearly. Output is never cached. Prompt caching serves the stable prefix at roughly 0.1× the input rate, cutting total input cost 70–90%.

§1 · Why a conversation is not "input + output, once"

An LLM API is stateless — it remembers nothing between calls. To continue a conversation, your client has to resend the entire history as input on every single turn: the system prompt and tool definitions (fixed, but resent each time), plus the full transcript of every previous user message and model response, plus the new message.

So the naive mental model — "price one prompt, that's the cost" — is wrong for anything conversational. A chatbot, a copilot, or an autonomous agent bills the same early tokens again and again. The single-prompt figure can be several times too low.

§2 · The math, made simple

Let the fixed per-turn pieces be: S = system prompt, T = tool definitions, U = a user message, A = an assistant reply. On turn t, the input you send is everything stable plus every prior exchange plus the new user message:

input(t) = S + T + (t−1)·(U + A) + U ← grows linearly with t

That per-turn input grows linearly with the turn number — each new turn adds one more (U+A) block that must be resent forever after. Now add it up across N turns. Summing a linearly growing quantity is the classic 1 + 2 + 3 + … + N pattern, which equals N(N+1)/2:

total input over N turns ≈ N·(S + T) + (U + A)·N(N−1)/2 + N·U ↑ linear in N ↑ quadratic in N

The history term carries an . Double the turns and the history you resend roughly quadruples. Meanwhile output is different: you generate exactly one new reply per turn, so total output cost grows only linearly with N — and output is never cached by any provider. It is the resent input that quietly explodes; output just rides along.

Want this for your own numbers? Set turns and token sizes, watch the cost curve, and read the caching savings live.

Open the conversation cost simulator →

§3 · A worked example — 10 turns on Claude Opus 4.8

Concrete beats abstract. Take a realistic assistant with a decent system prompt and a tool block, on Claude Opus 4.8 (July 2026 list price: $5 / 1M input, $25 / 1M output). Per-turn sizes:

Turn 1 sends 2000 + 1000 + 200 = 3,200 input tokens. Turn 10 sends 2000 + 1000 + 9×700 + 200 = 9,500 — the same conversation, now three times heavier on input, entirely because of resent history.

TurnInput tokTurn cost · no cacheCumulative · no cacheTurn cost · cachedCumulative · cached
13,200$0.0285$0.0285$0.0325$0.0325
23,900$0.0320$0.0605$0.0185$0.0510
34,600$0.0355$0.0960$0.0188$0.0698
45,300$0.0390$0.1350$0.0192$0.0890
56,000$0.0425$0.1775$0.0195$0.1085
66,700$0.0460$0.2235$0.0199$0.1284
77,400$0.0495$0.2730$0.0202$0.1486
88,100$0.0530$0.3260$0.0206$0.1692
98,800$0.0565$0.3825$0.0209$0.1901
109,500$0.0600$0.4425$0.0213$0.2114
Total63,500$0.4425$0.2114

Turn 10 costs 2.1× turn 1 — same task, all history resent. The "cached" columns assume every turn hits the cache within its TTL (see §4). Numbers computed with the exact model behind the conversation cost simulator.

The same result, laid out plainly

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

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)

Two things to internalize from these numbers. First, the input side is where the money hides: input is 72% of the uncached bill even though each reply is longer than each question, purely because the prefix is resent ten times. Second, caching attacks exactly that side — it collapses $0.3175 of input to $0.0864, but can do nothing about the $0.1250 of output, which is why the total saving (52%) is smaller than the input saving (73%).

§4 · Prompt caching — the lever, and how it works

Prompt caching lets you mark the stable prefix — system prompt, tool definitions, and the already-seen transcript — so on repeat turns it is served from a cache at a fraction of the input price instead of full price. The mechanics that matter for cost:

Put it together and the payoff scales with the conversation: the longer it runs and the larger the fixed prefix relative to each new message, the more of your cost is repeated prefix — and the more caching claws back. On short exchanges with a tiny system prompt there is little to cache; on a 25-turn agent with a 4,000-token tool block it is the difference between a sane invoice and a shocking one.

§5 · Prompt caching rates by provider (verified July 2026)

Rates are expressed as a multiple of each model's normal input price. "Read" is a cached-prefix token; "write" is a token entering the cache.

Provider · familyCache readCache writeTTL / notes
Anthropic (Claude Fable 5 / Opus 4.8 / Sonnet 5 / Haiku 4.5)0.1×1.25×5-min default TTL (1-hr option at higher write cost)
OpenAI · GPT-5.6 (Sol / Terra / Luna)0.1×1.25×Automatic cached-input discount
OpenAI · GPT-4.1 family0.25×1.00×Cached input discounted; no separate write fee
Google · Gemini 3 context caching0.1×0.25×Plus a per-hour storage fee (not modeled here)

Snapshot verified 2026-07-13 against provider pricing/caching docs. Caching rates and the exact placement rules change more often than base prices — confirm against your provider the week you ship, then plug current numbers into the simulator.

§6 · Four things that make it worse (or better)

§7 · FAQ

How much does a multi-turn conversation cost vs a single call?

Much more than the naive single-call estimate. Because the API is stateless, every turn resends the entire history as input, so the same system prompt and early messages are billed repeatedly. Input cost per turn climbs linearly with the turn number, making cumulative input cost grow with the square of the turn count. A 10-turn chat can cost 3–5× what pricing one turn suggests; long-running agents with large tool blocks are worse.

Why does the cost grow quadratically instead of linearly?

The input on turn t is system + tools + (t−1) previous turns + new user message, which grows linearly with t. Summing a linearly growing per-turn input across N turns follows the 1 + 2 + … + N pattern, whose total is proportional to N². Output cost per turn stays roughly flat because you generate only one new reply per turn — so it is the resent input, not the output, that explodes.

Does prompt caching actually reduce conversation cost?

Yes, and conversations are where it pays off most. The stable prefix — system prompt, tool block, 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 ~1.25× write premium for new content, but the repeated reads dominate. On a typical long conversation, caching cuts total input cost by 70–90%.

How much did caching save in the worked example?

It cut input cost from $0.3175 to $0.0864 — a 73% reduction on the input side. Because output tokens are never cached, total conversation cost fell less: from $0.4425 to $0.2114, a 52% saving overall. The longer the conversation and the larger the fixed prefix relative to each new message, the higher the percentage saved.

What are the current caching rates per provider?

As of July 2026: Anthropic ≈ 0.1× input for a read, ≈ 1.25× for a write, 5-minute default TTL. OpenAI GPT-5.6 ≈ 0.1× read / 1.25× write; the older GPT-4.1 family ≈ 0.25× cached input with no separate write fee. Google Gemini context caching ≈ 0.1× read / 0.25× write plus a per-hour storage fee. Every provider discounts only the repeated input prefix, never generated output.

Is output ever cached?

No. Every provider caches only the repeated input prefix. Generated tokens are always billed at the full output rate — typically 4–6× the input rate. That is exactly why caching slashes input cost but reduces total cost less: the uncacheable output side dilutes the percentage saved.

§8 · Related tools