How to use this LLM API cost calculator
- Describe one request. Enter the input and output tokens for a typical call. Include the system prompt, chat history and retrieved documents in the input. If you do not know the size, paste a real prompt into the LLM token counter first.
- Add your volume. Enter requests per day or per month, then set how much input comes from cache and how many requests can wait for batch processing.
- Compare. Pick your model and the table ranks every model on the same workload. Select a row to see its breakdown.
How LLM API cost is calculated
Providers charge per million tokens, with separate rates for input and output. Output usually costs several times more, so a long reply can cost more than a long prompt.
Cost per request = (input tokens x input rate + output tokens x output rate) /
1,000,000
Monthly cost = cost per request x requests per month
Example: a chatbot on Claude Sonnet 5.5 ($2.00 input, $10.00 output) sends 2,000 input tokens and gets 500 output tokens back. That is $0.004 for input plus $0.005 for output, or $0.009 per request. At 100,000 requests a month, the bill is $900. Output is only a fifth of the tokens but more than half of the cost.
Monthly cost of common LLM workloads
What three typical workloads cost a month on popular models, at standard list price with no caching or batch discount. Every row uses the same token counts, so Claude 5.x would land about 30% higher on identical text. Set caching and batch in the calculator above to see how far each figure drops.
| Model | Support chatbot3,000 in, 350 out, 30,000 a month | RAG assistant6,000 in, 500 out, 10,000 a month | Document summaries12,000 in, 800 out, 5,000 a month |
|---|---|---|---|
| GPT-6.1 SolOpenAI | $285 | $170 | $160 |
| GPT-6 LunaOpenAI | $14 | $8 | $8 |
| Claude Sonnet 5.5Anthropic | $285 | $170 | $160 |
| Claude Haiku 5.5Anthropic | $14 | $8 | $8 |
| Gemini 3.8 FlashGoogle | $107 | $64 | $60 |
| Gemini 3.1 Flash-LiteGoogle | $38 | $22 | $21 |
| Grok 4.7xAI | $243 | $150 | $144 |
| DeepSeek FlashDeepSeek | $40 | $24 | $23 |
| Mistral Large 4Mistral | $85 | $52 | $50 |
LLM API pricing comparison
Standard list prices in USD per 1 million tokens, read from each provider's own pricing page on 5 November 2026. The calculator uses these same rates.
| Model | Input | Cached input | Output | Context | Note |
|---|---|---|---|---|---|
| GPT-6 AstraOpenAI | $10.00 | $1.00 | $50.00 | 1.05M | Higher rate above 272,000 tokens |
| GPT-6.1 SolOpenAI | $2.00 | $0.10 | $10.00 | 1.05M | Higher rate above 272,000 tokens |
| GPT-6.1 TerraOpenAI | $1.00 | $0.05 | $5.00 | 1.05M | Higher rate above 272,000 tokens |
| GPT-6 LunaOpenAI | $0.10 | $0.01 | $0.50 | 1.05M | Higher rate above 272,000 tokens |
| GPT-5.6 SolOpenAI | $4.00 | $0.40 | $20.00 | 1.05M | $5.00 input and $30.00 output from 1 December 2026 |
| GPT-5.6 TerraOpenAI | $2.00 | $0.20 | $12.00 | 1.05M | Higher rate above 272,000 tokens |
| GPT-5.6 LunaOpenAI | $0.20 | $0.02 | $1.20 | 1.05M | Higher rate above 272,000 tokens |
| Claude Fable 5.1Anthropic | $10.00 | $0.25 | $50.00 | 1M | |
| Claude Opus 5.5Anthropic | $4.00 | $0.20 | $20.00 | 1M | |
| Claude Sonnet 5.5Anthropic | $2.00 | $0.10 | $10.00 | 1M | |
| Claude Haiku 5.5Anthropic | $0.10 | $0.01 | $0.50 | 1M | $0.50 input and $2.50 output above 100,000 tokens |
| Claude Sonnet 4.6Anthropic | $3.00 | $0.30 | $15.00 | 1M | |
| Gemini 4 ArgonGoogle | $2.00 | $0.10 | $10.00 | 1M | $4.00 input and $20.00 output from 1 December 2026 |
| Gemini 3.8 FlashGoogle | $0.75 | $0.075 | $3.75 | 1M | $1.50 input and $7.50 output from 1 January 2027 |
| Gemini 3.5 Flash-LiteGoogle | $0.30 | $0.03 | $2.50 | 1M | |
| Gemini 3.1 Flash-LiteGoogle | $0.25 | $0.025 | $1.50 | 1M | |
| Grok 4.7xAI | $2.00 | $0.50 | $6.00 | 500K | Higher rate above 200,000 tokens |
| DeepSeek FlashDeepSeek | $0.30 | $0.006 | $1.20 | 1M | Peak rate, off-peak is half |
| DeepSeek V4 ProDeepSeek | $1.32 | $0.044 | $3.96 | 1M | Peak rate, off-peak is half |
| Mistral Large 4Mistral | $0.70 | $0.07 | $2.10 | 1M | |
| Mistral Small 4Mistral | $0.15 | n/a | $0.60 | 256K |
Check the current rates on the pricing pages of OpenAI, Anthropic, Google, xAI, DeepSeek and Mistral.
What makes an LLM API bill higher than expected
- Long-context surcharges. On OpenAI, a prompt over 272,000 input tokens pays 2x input and 1.5x output on the whole request. Claude Haiku 5.5 moves to higher rates above 100,000 tokens, and xAI charges more above 200,000. The calculator applies the OpenAI and Claude rules for you and flags Grok.
- Thinking tokens. Reasoning models bill their internal reasoning as output, even though you never see it. Add it under More options.
- Different tokenizers. Anthropic says Claude 4.7 and later produce about 30% more tokens for the same text. Two models at the same price per token can cost different amounts per request. Turn on the same-text option to compare fairly.
- Promotions that end. GPT-5.6 Sol's promotional price runs until 30 November 2026. Gemini 4 Argon goes from $2.00 to $4.00 input on 1 December 2026. Gemini 3.8 Flash goes from $0.75 to $1.50 input on 1 January 2027. The calculator switches to the new rate on the date, and warns you if your model is about to change.
- Tools and storage. Web search, file search, code containers and cache storage are charged separately. OpenAI, for example, lists web search at $10 per 1,000 calls. These are not included here.
- Regional processing. OpenAI adds 10% for data residency endpoints on recent models, and Anthropic applies 1.1x for US-only inference.
How to reduce LLM API costs
- Cache what repeats. Cached input costs far less than fresh input: on GPT-6.1 Sol it is $0.10 against $2.00 per million. Put your system prompt, tools and fixed documents first so they can be reused.
- Use batch for work that can wait. Anthropic, Google, OpenAI and Mistral offer about half price for asynchronous jobs such as summaries and classification.
- Route by difficulty. Send simple requests to a budget model and only hard ones to a flagship. Rates on this page differ by 100x between the two ends of a single provider's range.
- Trim the prompt. Chat history and retrieved documents grow quietly. Summarise older turns and retrieve fewer, better chunks.
- Limit output. Set a sensible maximum output and ask for concise answers, because output is the expensive side.
At high and steady volume, self-hosting an open model can also make sense. Our guide to private LLMs for business covers when it pays off. If you are building agents, an agent's repeated calls multiply these figures, so see what AI agent development costs as well.
LLM API cost calculator FAQ
How accurate is this LLM API cost calculator?
It uses each provider's published list price and applies the caching, batch and long-context rules shown on this page. Your real bill depends on actual token use, tool fees and any negotiated discount, so treat it as a planning estimate.
How often are the prices updated?
Prices were last checked on 5 November 2026. Promotions with a known end date switch to the new rate automatically on that day.
Which LLM API is the cheapest?
It depends on your workload. On list price, GPT-6 Luna and Claude Haiku 5.5 are the lowest at $0.10 input and $0.50 output per million tokens, with Mistral Small 4 and DeepSeek Flash close by. Rank them on your own numbers above, and test quality before you switch.
How much does 1 million tokens cost?
On the 21 models in this calculator, 1 million input tokens costs between $0.10 and $10.00, and 1 million output tokens between $0.50 and $50.00, at list price. Flagship models sit at the top of that range and small models at the bottom.
What is the difference between input and output tokens?
Input tokens are everything you send: the system prompt, history, documents and the question. Output tokens are what the model writes back, including reasoning. Output usually costs several times more.
How much does prompt caching save?
Reading from cache costs far less than fresh input, often 90% or more off the input rate. Writes can cost extra on OpenAI and Anthropic, so it pays off when the same content repeats across many requests.
Does the calculator include image, audio or tool costs?
No. It covers text tokens only. Web search, file search, code containers, cache storage, audio and image generation are billed separately by each provider.
Are DeepSeek prices the peak or off-peak rate?
The calculator uses DeepSeek's peak rate. Its off-peak rate is half of that, so a job run entirely off-peak would cost less than shown.