LLM API cost
LLM API cost calculator
Monthly and per-request cost of an LLM API workload from input tokens, output tokens, requests a month, cached share and the Batch discount.
With model claude-sonnet-5-5, input tokens 1,500 tokens, output tokens 500 tokens, requests per month 100,000, cached share of input 0%, the cost per request is $0.00800 at list prices read 2026-11-01.
Cost per request
Read from vendor pricing pages on 2026-11-01. Arithmetic on list prices, not advice or a quote.
Saving and exports come with Pro, $9 a month. What is in it. The calculator itself is free.
How it works
Vendors price input and output tokens separately per million tokens. Output tokens cost several times more than input, so a chatty assistant costs more than a long-prompt classifier with the same total token count. Cached input tokens are billed at the cache-read price (often a tenth of the input price or less) and the Batch API halves both prices at most vendors in exchange for asynchronous delivery.
The formula
cost_per_request = (input_tokens * ((1 - cached) * input_price + cached * cached_price) + output_tokens * output_price) / 1,000,000 * (batch ? 1 - discount : 1); monthly = cost_per_request * requests
Worked example
Inputs
- Model
- claude-sonnet-5-5
- Input tokens
- 1,500 tokens
- Output tokens
- 500 tokens
- Requests per month
- 100,000
- Cached share of input
- 0%
- Batch API
- No
Result
- Cost per request
- $0.00800
- Cost per 1K requests
- $8.00
- Monthly cost
- $800.00
- Monthly input cost
- $300.00
- Monthly output cost
- $500.00
- Input share of cost
- 37.5%
Sources
- developers.openai.com/api/docs/pricing (read 2026-11-01)
- platform.claude.com/docs/en/about-claude/pricing (read 2026-11-01)
- ai.google.dev/gemini-api/docs/pricing (read 2026-11-01)
- docs.mistral.ai/inference/pricing (read 2026-11-01)
- api-docs.deepseek.com/quick_start/pricing (read 2026-11-01)
- docs.x.ai/docs/models (read 2026-11-01)
Prices read from each vendor's own pricing page on 2026-11-01; the page may have changed since. This is arithmetic on published list prices, not advice or a quote. Check the vendor's page before committing a budget.