LLM API Cost Calculator โ What You Actually Pay
Most cost calculators multiply tokens by the sticker price. Production workloads rarely pay sticker price โ they pay the effective rate after cache hits, batch discounts and long-context tiering. This calculator applies all of them and ranks every model by real monthly cost.
Your workload
Presets
| Model | Provider | Input $/M | Cached $/M | Write $/M | Output $/M | Cost / month | Context |
|---|
What this LLM token price estimator actually computes
The same question gets asked four different ways: how much does this LLM API cost, what is the model cost per million tokens, what will my token cost be at a given request volume, and which price estimator can be trusted. This page answers all four, because the answer is the same number every time โ the only inputs that change it are the cached share, the batch flag and whether your prompt crosses a long-context threshold.
Set your four workload numbers above and the estimator recomputes every model in the table, sorted by cost per month. Nothing is estimated behind an email gate, and there is no account to create.
How the cost is actually calculated
Total cost is the sum of four independently billed line items, multiplied by your request volume:
| Uncached input | tokens รท 1e6 ร inputRate |
| Cached input | tokens รท 1e6 ร cachedRate |
| Cache write | tokens รท 1e6 ร writeRate |
| Output | tokens รท 1e6 ร outputRate |
The part most calculators skip is the cache write premium. Anthropic bills a 5-minute cache write at 1.25ร the input rate and a 1-hour write at 2ร. A caching strategy only pays off if you write once and read many times โ roughly 20 reads to 1 write breaks even on a 5-minute TTL, more on a 1-hour TTL. Google bills cached context storage separately per MTok-hour rather than per token, so it does not appear as a per-token write rate here.
Long-context tiers
Quoting a single price per model is misleading if your prompts are large. This calculator switches rates automatically when your input size crosses a provider's threshold:
| Provider | Threshold | Effect above threshold |
|---|---|---|
| OpenAI (GPT-5.6 / GPT-6 / GPT-5.5 / GPT-5.4) | 272K input tokens | Input 2ร ยท Cached 2ร ยท Output 1.5ร |
| Google (Gemini Pro) | 200K input tokens | Input 2ร ยท Output 1.5ร |
| xAI (Grok) | 200K input tokens | Input 2ร ยท Output 2ร |
| Anthropic (Claude 5 / Opus / Sonnet) | โ | Flat rate across the full 1M window, no surcharge |
Claude's flat 1M window is a real advantage for whole-document workloads: a 900K-token request bills at the same per-token rate as a 9K one. On the same workload, OpenAI's tiering roughly doubles the effective rate.
How to cut your bill
1. Route by task, not by brand
Matching the model tier to the job is a bigger lever than switching vendors. Classification, extraction, routing and first-pass support belong on a budget tier. Tier 2 of the table above will beat your flagship on most of those jobs without a meaningful quality drop.
2. Cache a stable prefix
Any workload where requests share a system prompt, a policy document or a product catalogue should cache it. Cache reads bill at roughly 10% of list on OpenAI, Anthropic and Google, and about 2% on DeepSeek.
3. Push offline work to batch
Batch halves both input and output. Combined with a cache hit, cached input inside a batch request can land near 5% of list. This is the single largest available reduction for evaluation runs, nightly summaries and bulk enrichment.
4. Remember reasoning tokens bill as output
Thinking and reasoning tokens are billed at the output rate, and output runs 3โ6ร input across every vendor. Heavy deliberation, not prompt size, is what usually dominates an agent bill. If output price is your problem, the fix is prompting and model choice โ not caching.
Deciding when to switch
Run the numbers before you migrate. The pattern most teams land on is a two-model setup rather than a single choice, and the split is almost always the same:
- A budget tier for the boring 80% โ routing, classification, extraction, summarisation, first-pass support. This is where request volume lives, and it is where a tier downgrade pays for the expensive model that handles the last 20%.
- A frontier model for the part that is the product โ the reasoning a user actually pays for. Volume is low enough here that a 2.5ร rate difference does not matter.
Two things that look like cost savings and usually are not:
- Switching vendor for a flat rate when your current model is already one tier down. The tier is a bigger lever than the vendor โ the gap between a workhorse and a budget model is 10ร; the gap between similarly positioned models at different vendors is usually under 20%.
- Buying a cheaper model to save tokens โ cheaper models are not shorter. Output volume is a product decision, not a pricing lever.
And one that usually is: if your input is large and repetitive, the long-context tier is a bigger line item than the model choice. Compare the same workload at 150K and 400K tokens in the calculator above and read the difference before you optimise anything else.
Frequently asked
How do I calculate LLM API costs?
Multiply each token category by its own rate per million, then by monthly request volume. Input, cached input, cache writes and output are four separate line items. See the formula table above.
Does prompt caching actually reduce costs?
Yes โ a cache read bills at roughly 10% of the standard input rate on OpenAI, Anthropic and Google, and around 2% on DeepSeek. Output is never discounted by caching. Because writes carry a premium, caching only wins when the same prefix is reused many times.
What is the difference between batch and real-time calls?
Batch requests are accepted asynchronously and return within up to 24 hours in exchange for roughly 50% off both input and output. Batch stacks with caching. DeepSeek publishes no batch tier, so it is excluded from batch rankings rather than being shown at $0.
Why does my bill jump with long context?
OpenAI applies long-context rates above 272K input tokens, roughly doubling input and raising output 1.5ร. Google tiers above 200K on Pro models. Anthropic charges flat across 1M. The calculator applies these thresholds based on your actual input size.
Are these the same prices as a ChatGPT subscription?
No. ChatGPT and Claude subscriptions are separate flat-rate products and do not include API access. API access is billed per token with no platform fee or minimum.
How accurate are these prices?
Every figure is transcribed from the provider's own published pricing page and carries a verification date shown in the table. LLM pricing changes frequently โ several rates here are promotional and time-limited โ so treat this as a dated snapshot and confirm against the official page before you sign a contract. The table marks promotional rates and expired promotions explicitly.
How much do 1 million LLM tokens cost?
It depends entirely on which tokens and which model. On a mid-tier model, 1M input tokens typically cost between $0.15 and $0.60, while 1M output tokens cost roughly four times more. At the cheap end, a small model starts near $0.02 per million; at the expensive end, a frontier reasoning model reaches $15 or more. The single clearest lever is output: it is billed at a premium and you can usually reduce it more easily than you can reduce input.
Is there a free LLM cost estimator, or an API I can call?
Both, and they return the same numbers. This page is the free estimator โ no account, no trial, no emailed
report. There is no calculation API that will run a calculation for you, but every rate on this page is also
published as a flat, documented JSON dataset at
/data/pricing.json, so you can read the same numbers
programmatically instead of scraping a table. That file is generated directly from this page's own model data on
every build, so the two can never drift apart. If you would rather do the arithmetic yourself, the formula table
above and the rates in the model table are all you need โ it is four multiplications.
How do I estimate the cost of my own LLM usage before I ship it?
Start from a single real request, not from a token guess. Log one production prompt and one response, count their tokens, and multiply by expected monthly requests. Then stress two variables: what happens if your prompt doubles, and what happens if 40% of it becomes a cached prefix. Those two tests usually move the total more than switching providers does.
Use the data without scraping this page
Everything above is also published as machine-readable files. They are generated from this page's own model data during the build, which means a rate can never appear in one place and contradict the other. If you are writing an article, generating a model comparison, or feeding an LLM, use these instead of copy-pasting the table.
/data/pricing.json |
All 25 models as flat JSON with documented field names, the verification date, and every long-context and batch tier. Safe to cite. |
/llms.txt |
A short plain-text map of this site for language models that read it before answering. |
Rates carry a verification date and several are promotional. If you cite a number, cite the date with it โ LLM pricing moves often enough that an undated figure is worth very little.
Sources & verification
Prices verified: September 2026 ยทSources: OpenAI Anthropic Google xAI
TokenMeter is not affiliated with OpenAI, Anthropic, Google, xAI or DeepSeek. Model names and prices are the property of their respective owners. This tool runs entirely in your browser โ no request, token count or calculation leaves your device.