Skip to content

Prompt Size Analyser

Splits a prompt into system, tool schemas, history and the user turn, and shows what each part costs per call and per month.

This is an estimate, not a token count. The shares and the money below are exact arithmetic over estimated token counts. The split between the four parts is reliable — it is the same estimator applied to each — but the absolute totals carry the estimator’s error. For the exact figure, read the usage object on any completion response — prompt_tokens and completion_tokens are what you are billed on, they cost nothing to read, and they settle the question for the model you are actually calling.
Estimated input tokens per call
246

$73.80 a month at $3.00 per 1M input tokens and 100,000 calls.

System prompt
62 tokens · 25.2% · $18.60/mo
Tool schemas
175 tokens · 71.1% · $52.50/mo
Conversation history
0 tokens · 0.0% · $0/mo
This turn's user message
9 tokens · 3.7% · $2.70/mo
Total per call
246 tokens
Largest part
Tool schemas (71.1%)
Trimming it by 20% saves
$10.50/mo · 35 tokens per call
Fixed overhead per call
237 tokens (system + tools)
Share of the call that is fixed overhead
96.3%
What this assumes: Input side only — the reply is billed separately and usually at several times the input rate. Chat template overhead per message is not included here; add a few tokens per message if you need the exact request size. No caching is assumed: if a stable prefix of this prompt is being cached, the repeated part is billed at the cache-read rate instead, which is a fraction of the figure above.

The part of the prompt nobody looks at

Ask someone what their prompt costs and they will quote you the length of the instruction they wrote. The instruction is rarely the expensive part. On a typical tool-using assistant the four components come out in roughly the opposite order from intuition: retrieved context first, tool schemas second, system prompt third, and the user’s actual question a distant fourth.

Tool schemas are the reliable surprise. They are serialised into every request in full — names, descriptions, every property, every enum value, every nested object — and they are sent whether or not the model ends up calling anything. Ten tools with thorough descriptions can be two thousand tokens of fixed overhead on a call whose user message is twelve. The fix is not usually to write worse descriptions but to send fewer tools: route to a subset based on the request, and the fixed cost drops proportionally.

The reason to split the prompt up before optimising it is that effort should go where the tokens are. A 20% cut to a component holding 5% of the prompt saves 1%; the same cut to the component holding 60% saves 12%. The trim field above exists to make that comparison concrete before you spend an afternoon rewriting the wrong thing. And if the largest part turns out to be stable across calls — a long system prompt, a fixed tool list — the better move is caching it rather than shortening it, because a cache read costs a fraction of a fresh one and loses nothing.

Prompt Size Analyser · Multigrid