Free calculator
Claude API pricing vs OpenAI, Gemini, DeepSeek and Grok in one calculator
Current API prices per million tokens from Anthropic, OpenAI, Google, xAI, DeepSeek and Mistral, read from each provider’s own pricing page, and what your workload costs a month with caching and batch.
Your workload
System prompt, context and the user’s message.
Include reasoning tokens: they bill as output.
Share of input tokens read from the prompt cache.
Share of requests sent through a Batch API.
Runs in your browser. Nothing you type is sent or stored.
Cheapest model for this workload
$76.50
GPT-5 nano (OpenAI): $2.55 a day, $0.255 per 1,000 requests.
Cheapest five
- 1GPT-5 nano · OpenAI$76.50
- 2Gemini 2.5 Flash-Lite · Google$93.00
- 3Claude Haiku 5.5 · Anthropic$108
- 4GPT-6 Luna · OpenAI$108
- 5Mistral Small 4 · Mistral$180
- Requests a month
- 300K
- Models that fit
- 33 of 33
- Input tokens a month
- 600M
- Output tokens a month
- 150M
Every model, priced for your workload
Prices in USD per 1M tokens, Standard tier, checked on each provider’s pricing page on October 27, 2026. A month is 30 days. Cache-write surcharges are not included.
Quick answer
How is LLM API pricing calculated?
LLM APIs charge per million tokens, with separate prices for input and output. Cost = (input tokens × input price + output tokens × output price) ÷ 1,000,000. Cached input costs 2% to 25% of the input price on the models here, and batch requests 20% to 50% less. Example: 10,000 requests a day of 2,000 input and 500 output tokens on Claude Sonnet 5.5 ($2/$10), half the input cached, costs $71 a day, $2,130 a month.
How to use the LLM API pricing calculator
- Describe one request
Enter requests per day and the input and output tokens of a typical request. The token counter gives exact numbers for your prompt.
- Add caching and batch
Set how much of the input repeats from the cache and how many requests can wait for a Batch API.
- Compare models
Read the cheapest model, then sort the full table, filter by provider or require a minimum context window.
- Check your margin
Switch to AI SaaS margin, enter plan prices and tokens per user, and see what each plan keeps after AI cost.
How the calculator works
Each request costs its input tokens at the input price plus its output tokens at the output price, per million tokens. The cache hit rate moves that share of the input to the cache-read price; models without a listed cache price ignore it. The batch share moves that share of requests to Batch API prices, where the model has them. Daily cost × 30 gives the month.
Some models charge more for long prompts: Claude Haiku 5.5 above 100,000 input tokens, OpenAI’s GPT-6 and GPT-5.5 models above 272,000, Gemini 3.1 Pro and 2.5 Pro above 200,000, and Grok from 200,000. When your input per request crosses that line, the whole request is priced at the higher rate, as the providers bill it.
Not included: cache-write surcharges (Anthropic charges 1.25× input for a 5-minute cache write, OpenAI the same for GPT-5.6 and later), Gemini’s hourly cache storage, regional or data-residency uplifts, and tool fees such as web search. DeepSeek is priced at peak rates, with the off-peak cost shown under it.
Cost per request = (uncached input × input price + cached input × cache price + output × output price) ÷ 1,000,000
Monthly cost = cost per request × requests per day × 30
Batch requests: the same formula at batch prices
Gross margin = (plan price − AI cost per user) ÷ plan priceWorked example
- Workload: 10,000 requests a day, each 2,000 input and 500 output tokens, half the input from cache.
- Input on Claude Sonnet 5.5: 1,000 × $2 + 1,000 × $0.10 per 1M = $0.0021 per request.
- Output: 500 × $10 per 1M = $0.005 per request.
- Per request $0.0071; per day × 10,000 = $71; per month × 30 = $2,130.
- The same workload on Claude Haiku 5.5 costs $108 a month, on GPT-5 nano $76.50.
LLM API prices compared
API prices per 1M tokens, verified 27 October 2026
| Model | Input | Output | Cached input | Batch in / out | Context | Source |
|---|---|---|---|---|---|---|
| Claude Fable 5.1 | $10.00 | $50.00 | $0.25 | $5.00 / $25.00 | 1M | Anthropic pricing page |
| Claude Opus 5.5 | $4.00 | $20.00 | $0.20 | $2.00 / $10.00 | 1M | Anthropic pricing page |
| Claude Sonnet 5.5 | $2.00 | $10.00 | $0.10 | $1.00 / $5.00 | 1M | Anthropic pricing page |
| Claude Haiku 5.5 | $0.10 | $0.50 | $0.01 | $0.05 / $0.25 | 1M | Anthropic pricing page |
| Claude Opus 5 (legacy) | $5.00 | $25.00 | $0.50 | $2.50 / $12.50 | 1M | Anthropic pricing page |
| Claude Sonnet 5 (legacy) | $2.00 | $10.00 | $0.20 | $1.00 / $5.00 | 1M | Anthropic pricing page |
| Claude Sonnet 4.6 (legacy) | $3.00 | $15.00 | $0.30 | $1.50 / $7.50 | 1M | Anthropic pricing page |
| Claude Haiku 4.5 (legacy) | $1.00 | $5.00 | $0.10 | $0.50 / $2.50 | 200K | Anthropic pricing page |
| GPT-6 Astra | $10.00 | $50.00 | $1.00 | $5.00 / $25.00 | 1.05M | OpenAI pricing page |
| GPT-6.1 Sol | $2.00 | $10.00 | $0.10 | $1.00 / $5.00 | 1.05M | OpenAI pricing page |
| GPT-6.1 Terra | $1.00 | $5.00 | $0.05 | $0.50 / $2.50 | 1.05M | OpenAI pricing page |
| GPT-6 Luna | $0.10 | $0.50 | $0.01 | $0.05 / $0.25 | 1.05M | OpenAI pricing page |
| GPT-5.5 | $5.00 | $30.00 | $0.50 | $2.50 / $15.00 | 1.05M | OpenAI pricing page |
| GPT-5.4 mini | $0.75 | $4.50 | $0.075 | $0.375 / $2.25 | 400K | OpenAI pricing page |
| GPT-5 mini | $0.25 | $2.00 | $0.025 | $0.125 / $1.00 | 400K | OpenAI pricing page |
| GPT-5 nano | $0.05 | $0.40 | $0.005 | $0.025 / $0.20 | 400K | OpenAI pricing page |
| Gemini 4 Argon | $2.00 | $10.00 | $0.10 | $1.00 / $5.00 | 1M | Google pricing page |
| Gemini 3.8 Flash | $0.75 | $3.75 | $0.075 | $0.375 / $1.875 | 1M | Google pricing page |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | $0.03 | $0.15 / $1.25 | 1M | Google pricing page |
| Gemini 3.1 Flash-Lite | $0.25 | $1.50 | $0.025 | $0.125 / $0.75 | 1M | Google pricing page |
| Gemini 3.1 Pro Preview (preview) | $2.00 | $12.00 | $0.20 | $1.00 / $6.00 | 1M | Google pricing page |
| Gemini 2.5 Pro | $1.25 | $10.00 | $0.125 | $0.625 / $5.00 | 1M | Google pricing page |
| Gemini 2.5 Flash | $0.30 | $2.50 | $0.03 | $0.15 / $1.25 | 1M | Google pricing page |
| Gemini 2.5 Flash-Lite | $0.10 | $0.40 | $0.01 | $0.05 / $0.20 | 1M | Google pricing page |
| Grok 4.7 | $2.00 | $6.00 | $0.50 | $1.60 / $4.80 | 500K | xAI pricing page |
| Grok 4.3 | $1.25 | $2.50 | $0.20 | $1.00 / $2.00 | 1M | xAI pricing page |
| Grok Build 0.1 | $1.00 | $2.00 | $0.20 | No batch API | 256K | xAI pricing page |
| DeepSeek V4.1 Flash | $0.30 | $1.20 | $0.006 | No batch API | 1M | DeepSeek pricing page |
| DeepSeek V4 Pro | $1.32 | $3.96 | $0.044 | No batch API | 1M | DeepSeek pricing page |
| Mistral Large 4 (preview) | $1.36 | $4.18 | $0.14 | $0.68 / $2.09 | 1M | Mistral pricing page |
| Mistral Medium 3.5 | $1.50 | $7.50 | — | $0.75 / $3.75 | 256K | Mistral pricing page |
| Mistral Large 3 | $0.50 | $1.50 | — | $0.25 / $0.75 | 256K | Mistral pricing page |
| Mistral Small 4 | $0.15 | $0.60 | — | $0.075 / $0.30 | 256K | Mistral pricing page |
Standard tier, text tokens, prompts under each model’s long-context threshold. DeepSeek shows peak prices; off-peak is half. Batch prices for xAI are 20% off as xAI states; Anthropic batch cache reads and Mistral batch prices follow the providers’ stated discounts. Every row comes from the provider’s official pricing page, checked 27 October 2026 and linked under Sources.
Claude API pricing
Anthropic API pricing per million tokens: Claude Fable 5.1 costs $10 input and $50 output, Claude Opus 5.5 $4 and $20, Claude Sonnet 5.5 $2 and $10, and Claude Haiku 5.5 $0.10 and $0.50 for prompts up to 100,000 tokens, rising to $0.50 and $2.50 above that. Older models stay available: Opus 5 at $5 and $25, Sonnet 5 at $2 and $10, Sonnet 4.6 at $3 and $15, Haiku 4.5 at $1 and $5. Cache reads cost 10% of input, 5% on Opus 5.5 and Sonnet 5.5 and 2.5% on Fable 5.1; writing the cache costs 1.25× input for 5 minutes or 2× for an hour. The Batch API halves every price. Claude 4.6 and later models get the full 1M-token context at standard rates (Haiku 5.5 aside), and US-only inference adds 10%. Claude Opus 4.7 and later use a tokenizer that Anthropic says produces about 30% more tokens for the same text, so compare costs on real prompts.
OpenAI API pricing
OpenAI’s current flagships: GPT-6 Astra at $10 input and $50 output per million tokens, GPT-6.1 Sol at $2 and $10, GPT-6.1 Terra at $1 and $5, and GPT-6 Luna at $0.10 and $0.50. GPT-5.5 ($5 and $30), GPT-5.4 mini, GPT-5 mini and GPT-5 nano ($0.05 and $0.40) are still sold. Prompts above 272,000 input tokens pay double input and 1.5× output for the whole request on the GPT-6 models and GPT-5.5. Cached input costs 10% of input (5% on GPT-6.1 Sol and Terra); on GPT-5.6 and later a 30-minute cache write costs 1.25× input and a 12-hour write 2.5×. Batch and Flex cost half, Fast mode doubles the GPT-6 prices, and data-residency endpoints add 10% for models released since 5 March 2026. Searches for ChatGPT API pricing mean the same thing: developers pay for the GPT models per token through the OpenAI API.
Gemini API pricing
Gemini 4 Argon costs $2 input and $10 output per million tokens until 30 November 2026 and $4 and $20 from 1 December 2026, with implicit caching only. Gemini 3.8 Flash costs $0.75 and $3.75 until 31 December 2026, then $1.50 and $7.50. Gemini 3.5 Flash-Lite ($0.30 and $2.50), 3.1 Flash-Lite ($0.25 and $1.50) and 2.5 Flash-Lite ($0.10 and $0.40) are the low-cost tiers. Gemini 3.1 Pro Preview and 2.5 Pro double their input price for prompts over 200,000 tokens. Output prices include thinking tokens. Explicit context caching adds a storage charge per million tokens per hour ($0.50 to $1.00 on the Flash models, $4.50 on Pro). The Batch API halves most prices, and Priority costs about 1.8× Standard.
DeepSeek API pricing
DeepSeek sells two models through its API: deepseek-flash (DeepSeek V4.1 Flash) at $0.30 input and $1.20 output per million tokens, and deepseek-v4-pro at $1.32 and $3.96. Those are peak prices. Off-peak prices are half: peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, and every other hour, weekends and Chinese public holidays are off-peak. Context caching is on by default for every account, and a cache hit costs $0.006 per million tokens on Flash at peak, 2% of the input price. Both models take 1M tokens of context. DeepSeek lists no Batch API; its Search and Fetch APIs cost $0.75 per 1,000 requests.
Grok API pricing
xAI’s Grok 4.7 costs $2 input, $0.50 cached input and $6 output per million tokens with a 500,000-token context. Grok 4.3 costs $1.25, $0.20 and $2.50 with 1M tokens of context, the same rates as the Grok 4.20 models. Grok Build 0.1, the coding model, costs $1 and $2 and has no Batch API. On every Grok model a prompt that reaches 200,000 tokens doubles the price of all tokens in the request. Caching is automatic, the Batch API takes 20% off on the Grok 4 models, and Priority processing costs double.
Mistral API pricing
Mistral Large 4, in public preview, costs $1.36 input and $4.18 output per million tokens with $0.14 cached input and a 1M-token context. Mistral Medium 3.5 costs $1.50 and $7.50, Mistral Large 3 $0.50 and $1.50, and Mistral Small 4 $0.15 and $0.60, each with 256K tokens of context. Batch processing takes 50% off.
Prompt caching: what it saves
Prompt caching stores the start of a prompt that repeats, such as a system prompt, tool definitions or a long document, and bills it at a cache-read price on later requests. On the models above a cache read costs between 2% (DeepSeek) and 25% (Grok 4.7) of the input price. Anthropic and OpenAI’s newest models also charge 1.25× input to write the cache, so caching pays off once a prefix is reused at least once. DeepSeek and xAI cache automatically; Gemini 4 Argon supports implicit caching only. Put the stable part of the prompt first and the changing part last, or the cache never matches.
LLM API pricing questions
- How much does the Claude API cost?
- Per million tokens: Claude Opus 5.5 costs $4 input and $20 output, Sonnet 5.5 $2 and $10, Haiku 5.5 $0.10 and $0.50 for prompts up to 100,000 tokens, and Fable 5.1 $10 and $50. Batch requests cost half; cache reads cost 2.5% to 10% of input.
- How much does the OpenAI API cost per token?
- GPT-6 Astra costs $10 per million input tokens and $50 per million output, GPT-6.1 Sol $2 and $10, GPT-6.1 Terra $1 and $5, and GPT-6 Luna $0.10 and $0.50. One input token on Astra costs $0.00001.
- What is the cheapest LLM API?
- Per token, GPT-5 nano ($0.05 input, $0.40 output per million) is the cheapest model listed here, followed by Gemini 2.5 Flash-Lite ($0.10 and $0.40). The cheapest for you depends on your input-output mix and cache hits, which is what the calculator ranks.
- What is prompt caching?
- Prompt caching stores a repeated prompt prefix, such as a system prompt or a document, so later requests read it at a discount: 2% to 25% of the input price on the models here. Anthropic and OpenAI’s newest models charge extra to write the cache.
- How does OpenRouter pricing work?
- OpenRouter resells many providers’ models through one API. It says it passes the providers’ prices through with no markup on inference and charges a fee when you buy credits, so per-token prices should match the provider prices in this table.
- Do reasoning or thinking tokens cost extra?
- They bill as output tokens. OpenAI, Anthropic and Google all count reasoning tokens as output even when you never see the text, so a model that thinks longer costs more per answer. Add them to your output tokens per request.
- How much does the Batch API save?
- Batch requests run asynchronously instead of in real time, at a discount: 50% at Anthropic, OpenAI, Google and Mistral, 20% on xAI’s Grok 4 models. DeepSeek lists no Batch API but halves its prices off-peak.
- Is Claude cheaper than GPT?
- Tier by tier, Claude Sonnet 5.5 and GPT-6.1 Sol both cost $2 and $10 per million tokens, Claude Opus 5.5 ($4/$20) costs less than GPT-6 Astra ($10/$50), and Claude Haiku 5.5 matches GPT-6 Luna for short prompts. Tokenizers differ, so compare on your real prompts.
Cite this tool
Free to link and quote. Use this reference:
SaaSCity, "LLM API Pricing Calculator", October 27, 2026. https://saascity.io/free-tools/llm-api-pricing-calculator
Sources
- Anthropic, Claude API pricing (checked 27 Oct 2026)
- Anthropic, Models overview (context windows, tokenizer)
- OpenAI, API pricing (checked 27 Oct 2026)
- OpenAI, Prompt caching
- OpenAI, Models (context windows)
- Google, Gemini Developer API pricing (checked 27 Oct 2026)
- Google, Gemini models (context windows)
- xAI, Grok API pricing and batch discounts (checked 27 Oct 2026)
- DeepSeek, Models & Pricing (checked 27 Oct 2026)
- DeepSeek, Context caching
- Mistral, API pricing (checked 27 Oct 2026)
- Mistral, Batch processing
- OpenRouter, FAQ: pricing and fees