LLM API Cost Calculator
Estimate what an AI model will cost you each month, and compare Claude, GPT and Gemini side by side.
Use 22 for weekdays only.
Your prompt, system instructions, documents and chat history.
The model's visible reply.
Reasoning the model does before it answers. It's billed as output even though you don't see it.
A long system prompt or document that repeats on every request. Cached input costs about a tenth of the normal price.
In US dollars. Shows how many requests it pays for.
API bills are in US dollars. Enter today's rate to see costs in another currency.
The same workload on every model
Cheapest first. Prices in US dollars per million tokens (input / output). Tap a model to pick it.
How your AI API bill is worked out
Tokens a month × price per million tokens, input and output priced separately.
- 1
Requests a month
1,000 × 30 days
= 30,000 - 2
Count the tokens
30,000 × 1,000
= 30M in
30,000 × 500
= 15M out - 3
Price each side
30M × $2/M
= $60.00 in
15M × $10/M
= $150 out - 4
Add them up
$60.00 + $150
= $210 a month
Read more: how pricing works, a worked example and every price used
AI model APIs charge per token. A token is a chunk of text, about ¾ of an English word or 4 characters, so 1,000 tokens is roughly 750 words, or 1½ pages. Input tokens (what you send) and output tokens (what the model writes back) are priced separately, and output usually costs several times more. Models that "think" before answering bill those thinking tokens as output too.
The formula
requests a month = requests a day × days
input cost = input tokens × input price × (uncached share + cached share × 0.1) ÷ 1,000,000
output cost = (output + thinking tokens) × output price ÷ 1,000,000
monthly cost = (input cost + output cost) × 0.5 if batch
budget pays for = budget ÷ cost per request
Worked example
A support bot handling 1,000 chats a day for 30 days, each with 1,000 input and 500 output tokens, uses 30 million input and 15 million output tokens a month. On Claude Sonnet 5.5 ($2 / $10 per million) that is 30 × 2 + 15 × 10 = $210 a month, $2,520 a year, or $0.007 per chat. If 80% of the input is a cached system prompt, input costs 30 × 2 × (0.2 + 0.8 × 0.1) = $16.80 instead of $60, and the bill drops to $166.80.
Ways to cut the bill
- Prompt caching: all three providers charge much less, about a tenth, for input they have recently seen. Anthropic also charges 1.25× the input price the first time a prompt is written to its 5-minute cache, which this calculator leaves out.
- Batch processing: work that can wait up to a day costs half price.
- Smaller models: send simple tasks to a smaller, cheaper model and save the larger ones for hard questions.
- Shorter outputs and less thinking: because output costs the most, asking for concise answers or a lower thinking effort saves more than trimming the prompt.
Prices used
| Model | Input / 1M | Output / 1M |
|---|---|---|
| Claude Fable 5.1 Anthropic | $10 | $50 |
| Claude Opus 5.5 Anthropic | $4 | $20 |
| Claude Sonnet 5.5 Anthropic | $2 | $10 |
| Claude Haiku 5.5 Anthropic · Prompts up to 100K tokens; $0.50 / $2.50 above that | $0.1 | $0.5 |
| GPT-5.6 Sol OpenAI · Prompts under 270K tokens | $5 | $30 |
| GPT-5.6 Terra OpenAI · Prompts under 270K tokens | $2 | $12 |
| GPT-5.6 Luna OpenAI · Prompts under 270K tokens | $0.2 | $1.2 |
| Gemini 3.1 Pro (preview) Google · Prompts up to 200K tokens; long prompts cost more | $2 | $12 |
| Gemini 3.8 Flash Google · Introductory price · Rises to $1.5 / $7.5 after 31 Dec 2026 | $0.75 | $3.75 |
| Gemini 3.5 Flash-Lite | $0.3 | $2.5 |
Standard prices from each provider's official pricing pages and launch announcements, checked on 9 October 2026. The cached-input rate is an approximation; exact cache prices differ a little between models. Some models charge more for very long prompts. Prices change often, so confirm with the provider before committing to a budget.
Common questions
How is LLM API cost calculated?
APIs charge per million tokens, with input and output priced separately. Monthly cost is input tokens × input price plus output tokens (including thinking tokens) × output price, divided by 1,000,000. For example, 30 million input and 15 million output tokens on a $2 / $10 model costs 30 × 2 + 15 × 10 = $210.
How many words is 1,000 tokens?
A token is a chunk of text, about ¾ of an English word or 4 characters. So 1,000 tokens is roughly 750 words, or about 1½ pages. Input tokens (what you send) and output tokens (what the model writes back) are counted and priced separately.
Do output tokens cost more than input tokens?
Yes, output usually costs several times more than input. Models that "think" before answering bill those thinking tokens as output too. That's why asking for concise answers or a lower thinking effort often saves more than trimming your prompt, and the calculator counts thinking tokens separately.
How much does prompt caching save?
All three providers charge much less, about a tenth of the normal input price, for input they have recently seen. In the worked example, caching 80% of the input cuts a $60 input bill to $16.80. Anthropic also charges 1.25× the input price the first time a prompt is written to its 5-minute cache.
Is the batch API cheaper?
Yes. Work that can wait up to a day costs half price through the providers' batch APIs. It suits jobs where you don't need an instant answer. Turn on batch in the calculator and the monthly cost is halved, with the same tokens and models.
How can I reduce my AI API bill?
Use prompt caching for repeated system prompts, send work that can wait to the batch API, route simple tasks to a smaller, cheaper model and ask for shorter answers or less thinking, because output costs the most. Prices change often, so confirm with the provider before committing to a budget.
Related calculators
Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.