LLM providers bill by the token, and the math is simple once you know the four levers: which model you use, how many input and output tokens each request needs, how much of your input you can cache, and whether the job can run in batch. This calculator turns those levers into a real monthly and yearly number and lets you compare models on the same workload. This guide explains how each lever works and where the savings hide.
How token pricing works
Every request is priced in tokens — sub-word chunks roughly four characters long. Providers publish two headline rates per model: a price per million input tokens (everything you send) and a price per million output tokens (everything the model generates). A request's cost is just each token count divided by one million, multiplied by its rate, summed up.
The single most important thing to internalize is that output is far more expensive than input — typically 3 to 6 times the rate. On Claude Sonnet 4.6, input is $3/1M and output is $15/1M; on GPT-5.5 it is $5 versus $30. That means a chatty model that pads responses can cost more than a pricier model that answers tersely. When a bill surprises you, look at output length first.
Input vs. output cost — and why model choice matters
Because the two rates differ so much, the cheapest model is not always the cheapest for your workload. A workload that sends huge prompts but expects short answers is dominated by input cost, where a mid-tier model can be a bargain. A workload that generates long documents is dominated by output cost, where a smaller, faster model may save far more than shaving input.
That is what the Compare Models tab is for: it holds your token counts and volume fixed and reprices them across three models at once, splitting each bar into input, cached input, and output so you can see exactly where the money goes. Often a model one tier down handles the task at a fraction of the cost — the only way to know is to compare on your real numbers.
Prompt caching and batch discounts
Two provider features cut cost without changing your model or your prompts. Prompt caching stores a request's stable prefix — a system prompt, a long instruction block, retrieved context — so repeat requests do not reprocess it. Cached tokens read back at roughly 10% of the input price. The catch is a one-time cache-write premium (about 1.25× input on Anthropic) on the first request, so caching pays off when the same prefix is reused many times within the cache window.
The Batch API runs requests asynchronously at 50% of standard price. If your job can tolerate minutes-to-hours of latency — bulk summarization, classification, evaluations, data enrichment — batching is free money. The two stack: a cached, batched, right-sized workload can cost a small fraction of the naive estimate.
Estimating tokens and avoiding surprises
To budget before you build, you need a token estimate. English text runs about four characters or 0.75 words per token, so a 2,000-word document is roughly 2,700 tokens. The Token Estimator tab does this conversion from pasted text or a raw count. Treat it as a rough guide — code, JSON, non-English text, and unusual vocabulary tokenize differently, and for exact figures you should use the provider's tokenizer or token-counting endpoint.
Two common surprises: conversation history is re-sent (and re-billed) on every turn unless you cache or trim it, so multi-turn chats grow more expensive as they get longer; and retrieved context counts as input every time even if the user's question is tiny. Model and prices in this tool were captured in mid-2026 and are isolated in a single dated table in the code — always confirm against the provider's own pricing page before committing a budget, because rates change.