LLM API Cost Calculator
Estimate language-model API cost per request, day, month, and year from uncached input, cached input, cache writes, output tokens, request volume, and editable provider rates.
Estimated monthly API cost
$336.00per month
GPT-5.6 terra · 30,000 requests/month
- Per request
- $0.0112
- Per day
- $11.20
- Per year
- $4,032.00
Cost per request
- Uncached input
- $0.004
- Cached input / cache reads
- $0.0012
- Cache writes
- $0.00
- Output
- $0.006
- Other variable charges
- $0.00
- Variable cost per request
- $0.0112
- Cost per 1,000 requests
- $11.20
Monthly usage and spend
- Requests
- 30,000
- Uncached input tokens
- 60,000,000
- Cached input tokens
- 180,000,000
- Cache-write tokens
- 0
- Output tokens
- 15,000,000
- Variable spend
- $336.00
- Fixed monthly costs
- $0.00
- Total monthly cost
- $336.00
Pricing sources
Preset rates verified 2026-08-10. Always confirm before a purchasing decision.
What this calculator assumes
- Direct standard paid-tier text-token prices only; rates are per 1 million tokens.
- Every request is assumed to have the same average token mix.
- Long context, regional processing, Fast/priority, Batch/Flex, media, tools, grounding, taxes, and free-tier quotas are excluded unless added manually.
- Google cache storage and similar time-based charges belong in fixed monthly cost.
Formulas, assumptions, and rounding are documented in our calculator methodology.
Built and maintained by Will Henschell, Data Scientist. Editorial policy.
The LLM API Cost Formula
For each request, multiply uncached input, cached input, cache-write, and output tokens by their separate prices per million tokens, then add any variable extras. Multiply request cost by daily request volume and active days for monthly variable spend, then add fixed monthly costs. Annual cost is the monthly estimate multiplied by twelve.
Why Token Mix Matters More Than Total Tokens
One million tokens do not have one universal price. Output tokens usually cost several times more than ordinary input, while cached input can cost a fraction of the uncached rate. Two applications with identical total tokens can therefore have very different bills depending on output length, cache-hit rate, and how often prompts are rewritten.
How to Forecast a Production Workload
Use provider usage logs or a representative test set to measure average uncached input, cached input, cache writes, and billed output. Forecast at low, expected, and high request volumes. Add retries, evaluation traffic, background jobs, cache storage, grounding, observability, and support plans where they apply. Averages are useful for budgets; percentiles are safer for capacity and worst-case controls.
Preset Pricing — Verified August 10, 2026
The presets use current first-party OpenAI, Anthropic, and Google standard paid text-token prices. They deliberately exclude modes that cannot be compared honestly across providers. Claude Sonnet 5 introductory pricing is published only through August 31, 2026, and Gemini 3.1 Pro Preview changes price above 200,000 prompt tokens. Use custom rates whenever the workload crosses a published boundary.
Frequently Asked Questions
- Divide each token class by 1,000,000 and multiply by its provider rate, then add the results: uncached input, cached input, cache writes, and output. Add any metered tool or grounding charge separately. Output often costs more per token, so a smaller output can still dominate the request cost.
- Cached input or cache reads reuse previously stored prompt content at a lower token rate. Cache writes create or refresh that stored content and may cost more than ordinary input. Providers also differ on cache lifetime and storage charges, so the calculator keeps reads, writes, and fixed storage costs separate.
- Enter every billed output token reported by the provider, including reasoning or thinking tokens when they are included in output billing. The calculator prices the token counts you enter; it does not infer hidden token usage from prompt text.
- No. Presets use comparable standard direct-API text pricing and clearly state their context limit or exclusions. Batch, flex, fast or priority processing, long context, regional processing, cloud marketplace markups, and free tiers require the matching custom rates.
- Real workloads vary by request, tokenizers differ, and invoices may include retries, tools, grounding, media, storage, service tiers, regional uplifts, taxes, and minimum charges. Use measured usage averages and replace presets with the exact rates from your account for the closest forecast.