What does your hidden system prompt really cost?
Most production LLM apps prepend a large system prompt the user never sees — instructions, tone, guardrails, tool definitions. Because it is re-sent as input on every call, its cost scales with your traffic and quietly becomes one of your biggest line items. This tool isolates that cost.
How it works
The tool estimates the token size of your system prompt, then multiplies by your monthly call volume and your model’s input price:
monthly_cost = system_prompt_tokens
× calls_per_month
/ 1,000,000
× input_price_per_million
It also shows the cached figure — providers discount repeated, unchanged prefix content heavily, and a stable system prompt is the ideal candidate.
Illustrative example
For example: suppose your system prompt is 2,000 tokens and you handle 500,000 API calls per month at an input price of $3 per million tokens.
monthly tokens = 2,000 × 500,000 = 1,000,000,000
monthly cost = 1,000,000,000 / 1,000,000 × $3 = $3,000
That is $3,000/month from the system prompt alone, before any user or assistant tokens are counted. If your provider offers prompt caching at, say, a 75% discount on cached prefixes, the effective cost could drop to around $750/month for the same volume — a substantial saving worth enabling.
Why system prompts grow
System prompts tend to inflate over time because teams keep adding guardrails, examples, and special-case instructions. Every new rule adds tokens that are paid on every single call. Common growth drivers include:
- Few-shot examples — pasting three or four full conversation examples to steer tone can easily add 500–1,000 tokens.
- Tool definitions — each function definition for tool-calling schemas adds tens to hundreds of tokens.
- Verbose formatting instructions — lengthy lists of “always do X, never do Y” that could be compressed.
- Redundant safety rules — re-stating the same guardrail in multiple ways.
Tips to cut the cost
- Trim ruthlessly. Every token here is paid on every call. Remove filler, redundant examples, and decorative formatting. Consolidate similar rules.
- Enable prompt caching. A static, stable system prompt is the textbook caching use case — the prefix is identical on every call, so the provider can cache the computation rather than re-processing it.
- Move rarely-needed instructions out. Conditional rules that apply to 5% of requests can be injected only when relevant rather than living in the always-on prompt.
- Compare trimmed vs original. Paste both versions to see the token and cost difference before deciding which instructions are worth keeping.
A note on token estimation
The tool estimates token count from character count using a typical ratio, rather than running an exact provider tokenizer. Most modern LLMs (GPT-4, Claude) use a subword tokenizer (BPE) where roughly 1 token ≈ 4 characters for English text, though this varies with punctuation-heavy content, code, and non-Latin scripts. For budgeting purposes the estimate is reliable enough — the relative comparison between a full and trimmed prompt is what matters most. For exact token counts on a specific model, use your provider’s tokenizer endpoint or library directly.
Nothing you paste is sent to any server — the token estimate and cost calculation run entirely in your browser.