LLM API Cost Calculator — Compare GPT, Claude, Gemini Pricing
Compare the cost of your workload across 40+ models, with caching, batch discounts, long-context tiers and reasoning tokens. Prices sourced and dated.
| Per day | Per month | Notes | ||||||
|---|---|---|---|---|---|---|---|---|
| gpt-oss-20b groq-gpt-oss-20b | OpenAI via Groq | $0.075 | $0.3 | 131K | $0.0003 | $0.30 | $9.00 | Uses o200k_harmony, which is o200k_base plus chat-format special tokens. |
| Claude Haiku 5.5 claude-haiku-5-5 | Anthropic | $0.1 | $0.5 | 1M | $0.00045 | $0.45 | $13.50 | |
| GPT-6 Luna gpt-6-luna | OpenAI | $0.1 | $0.5 | 1.05M | $0.00045 | $0.45 | $13.50 | |
| gpt-oss-120b groq-gpt-oss-120b | OpenAI via Groq | $0.15 | $0.6 | 131K | $0.0006 | $0.60 | $18.00 | Uses o200k_harmony, which is o200k_base plus chat-format special tokens. |
| Mistral Small 4 mistral-small-2603 | Mistral AI | $0.15 | $0.6 | 256K | $0.0006 | $0.60 | $18.00 | |
| GPT-5.6 Luna gpt-5.6-luna | OpenAI | $0.2 | $1.2 | 1.05M | $0.001 | $1.00 | $30.00 | |
| GPT-5.4 nano gpt-5.4-nano | OpenAI | $0.2 | $1.25 | 400K | $0.001025 | $1.03 | $30.75 | |
| Codestral codestral-2508 | Mistral AI | $0.3 | $0.9 | 128K | $0.00105 | $1.05 | $31.50 | |
| DeepSeek V4.1 Flash deepseek-flash | DeepSeek | $0.3 | $1.2 | 1M | $0.0012 | $1.20 | $36.00 | |
| Gemini 3.1 Flash-Lite gemini-3.1-flash-lite | $0.25 | $1.5 | 1.05M | $0.00125 | $1.25 | $37.50 | ||
| Gemma 4 31B together-gemma-4-31b | Google via Together AI | $0.39 | $0.97 | 262K | $0.001265 | $1.27 | $37.95 | |
| Mistral Large 3 mistral-large-2512 | Mistral AI | $0.5 | $1.5 | 256K | $0.00175 | $1.75 | $52.50 | |
| Gemini 3.5 Flash-Lite gemini-3.5-flash-lite | $0.3 | $2.5 | 1.05M | $0.00185 | $1.85 | $55.50 | ||
| Llama 3.3 70B together-llama-3.3-70b | Meta via Together AI | $1.04 | $1.04 | 131K | $0.0026 | $2.60 | $78.00 | |
| Grok Build 0.1 grok-build-0.1 | xAI | $1 | $2 | 256K | $0.003 | $3.00 | $90.00 | |
| Qwen3.5-397B-A17B together-qwen3.5-397b | Alibaba via Together AI | $0.6 | $3.6 | 262K | $0.003 | $3.00 | $90.00 | |
| Gemini 3.6 Flash gemini-3.6-flash | $0.75 | $3.75 | 1.05M | $0.003375 | $3.38 | $101 | Cached tokens also bill $0.50 per 1M tokens per hour of storage. | |
| Gemini 3.8 Flash gemini-3.8-flash | $0.75 | $3.75 | 1.05M | $0.003375 | $3.38 | $101 | Cached tokens also bill $0.50 per 1M tokens per hour of storage. | |
| GPT-5.4 mini gpt-5.4-mini | OpenAI | $0.75 | $4.5 | 400K | $0.00375 | $3.75 | $113 | |
| Grok 4.3 grok-4.3 | xAI | $1.25 | $2.5 | 1M | $0.00375 | $3.75 | $113 | |
| DeepSeek V4 Pro deepseek-v4-pro | DeepSeek | $1.32 | $3.96 | 1M | $0.00462 | $4.62 | $139 | |
| Mistral Medium 3.5 mistral-medium-3-5 | Mistral AI | $1.5 | $7.5 | 256K | $0.00675 | $6.75 | $203 | |
| Grok 4.7 grok-4.7 | xAI | $2 | $6 | 500K | $0.007 | $7.00 | $210 | |
| Claude Sonnet 5.5 claude-sonnet-5-5 | Anthropic | $2 | $10 | 1M | $0.009 | $9.00 | $270 | |
| Gemini 4 Argon gemini-4-argon | $2 | $10 | 1.05M | $0.009 | $9.00 | $270 | Input and output share the 1,048,576-token window; long-decode mode allows longer outputs. | |
| GPT-6.1 Sol gpt-6.1-sol | OpenAI | $2 | $10 | 1.05M | $0.009 | $9.00 | $270 | |
| Gemini 3.1 Pro preview gemini-3.1-pro-preview | $2 | $12 | 1.05M | $0.01 | $10.00 | $300 | ||
| GPT-5.6 Terra gpt-5.6-terra | OpenAI | $2 | $12 | 1.05M | $0.01 | $10.00 | $300 | |
| GPT-5.4 gpt-5.4 | OpenAI | $2.5 | $15 | 1.05M | $0.0125 | $12.50 | $375 | |
| Claude Opus 5.5 claude-opus-5-5 | Anthropic | $4 | $20 | 1M | $0.018 | $18.00 | $540 | |
| GPT-5.6 Sol gpt-5.6-sol | OpenAI | $4 | $20 | 1.05M | $0.018 | $18.00 | $540 | |
| GPT-5.5 gpt-5.5 | OpenAI | $5 | $30 | 1.05M | $0.025 | $25.00 | $750 | |
| Claude Fable 5.1 claude-fable-5-1 | Anthropic | $10 | $50 | 1M | $0.045 | $45.00 | $1,350 | |
| GPT-6 Astra gpt-6-astra | OpenAI | $10 | $50 | 1.05M | $0.045 | $45.00 | $1,350 | |
| GPT-5.5 Pro gpt-5.5-pro | OpenAI | $30 | $180 | 1.05M | $0.15 | $150 | $4,500 | No cached-input discount. |
Prices as of 2026-10-16, USD per 1M tokens, standard tier
- OpenAI (checked 2026-10-16), batch 50% off. Prompts over 272K input tokens are billed at the long-context rate. Data-residency endpoints add 10% for models released on or after 2026-03-05.
- Anthropic (checked 2026-10-16), batch 50% off. Claude 4.6 and later (except Haiku 5.5) bill the full 1M context at the standard rate. Haiku 5.5 charges higher rates for prompts over 100,000 tokens. US-only inference adds 10%.
- Google (checked 2026-10-16), batch 50% off. Gemini API paid tier, text input. Context caching may also bill storage per hour. Google lists some price changes from 2026-12-01 and 2027-01-01.
- xAI (checked 2026-10-16). Once a prompt reaches 200K tokens, the higher rate applies to every token in that request. xAI does not publish a batch discount on its models page.
- Mistral AI (checked 2026-10-16), batch 50% off
- DeepSeek (checked 2026-10-16). Peak-hour prices shown (01:00-04:00 and 06:00-10:00 UTC on weekdays). All other hours, including weekends, are half price.
- Together AI (checked 2026-10-16). Serverless inference prices for open-weight models.
- Groq (checked 2026-10-16)
Calculated in your browser. Prompts you paste for estimation are tokenized locally and never sent anywhere. Browse all free tools.
Found a problem, or something that could be better? We read every message and we fix things quickly.
This LLM API cost calculator compares what your workload would cost on GPT, Claude, Gemini, Grok, Mistral, DeepSeek and open-weight models, per request, per day and per month. Enter the tokens you send and receive and how many requests you make, and every model is priced side by side in a table you can sort and filter by provider or context window.
Headline prices per million tokens are only the start. Real bills depend on how much of the prompt is served from cache, whether the job can go through a batch API at half price, whether a long prompt crosses a provider's higher-price threshold, and how many hidden reasoning tokens a thinking model spends before it answers. The calculator applies each provider's actual rules for all four. Prices were checked on the providers' own pricing pages on 2026-10-16, and each one is linked so you can confirm it. A second mode compares a $20-a-month chat subscription with the API cost of the same usage.
How to use
- Enter input tokens and output tokens per request. If you do not know them, click Estimate tokens from text and paste a typical prompt; the token counter fills the input figure.
- Add reasoning tokens if you use a thinking model, and the number of requests per day or per month.
- Set the cached-input percentage if your requests share a long prefix (a system prompt, a document), and turn on Batch for jobs that can wait up to 24 hours.
- Filter by provider or minimum context window, and sort by cost per request to find the cheapest model that fits. Models that cannot hold your prompt are greyed out.
- Switch to Subscription vs API to see whether a chat plan or pay-as-you-go is cheaper for your usage, then copy or download the table as CSV.
Frequently asked questions
How is LLM API cost calculated?
Cost per request = input tokens x input price + output tokens x output price, with prices quoted per million tokens. Reasoning tokens count as output. Cached input tokens are billed at the lower cached price, and some providers charge extra to write to the cache. Multiply by requests per month for the monthly bill. For example, 2,000 input and 500 output tokens on Claude Sonnet 5.5 ($2 in, $10 out) is $0.004 + $0.005 = $0.009 per request, or $270 a month at 1,000 requests a day.
What are reasoning tokens and why do they cost so much?
Reasoning (or thinking) models work through a problem in hidden tokens before writing the answer. You do not see most of them, but they are billed as output tokens, the expensive side of the price list. A short answer can sit on top of thousands of reasoning tokens, so a thinking model can cost several times more per request than its price per token suggests. Most APIs report reasoning tokens in the usage data of each response; measure a few real requests and enter the average.
How much does prompt caching save?
Cache hits are billed far below the normal input price: 10% of it for most Claude models (5% on Opus 5.5 and Sonnet 5.5, 2.5% on Fable 5.1), typically 5% to 10% on current OpenAI models, and about 10% on Gemini, which also bills cache storage by the hour on some models. Anthropic charges 1.25x the input price to write a 5-minute cache entry and 2x for a 1-hour entry; the newest OpenAI models also price cache writes. Caching pays off when many requests share a long identical prefix, such as a system prompt or a reference document.
What is the Batch API discount?
OpenAI, Anthropic, Google (Gemini API) and Mistral bill batch requests at 50% of the standard price. You submit many requests at once and get the results asynchronously, within 24 hours at most. It suits evaluations, classification and document processing, not chat. xAI, DeepSeek and the open-model hosts in this table do not list a batch discount, and the table flags them when Batch is on. DeepSeek instead halves its prices outside peak hours.
Is ChatGPT Plus or Claude Pro cheaper than the API?
For light and moderate use the API is usually cheaper; for heavy daily use of a top model, the $20 plan usually wins, within its usage limits. The deciding factor is that a chat resends the whole conversation every turn, so long threads multiply input tokens. The Subscription vs API mode models that, including prompt caching of the history, and shows the number of messages per day at which the two cost the same. A plan also includes the app's features, which the API price does not.
How current are these prices?
Every price was read from the provider's official pricing page on 2026-10-16; the date and a link to each source are shown under the table. Prices change often, sometimes with a few weeks' notice (Google lists changes scheduled for December 2026 and January 2027), so check the source before committing to a budget. Models whose prices could not be confirmed on an official page are left out.
What actually drives an LLM API bill
Output tokens. Output is priced 4 to 6 times higher than input at OpenAI, Anthropic and Google, and reasoning tokens are output. A workload that writes long answers or thinks hard is dominated by the output column, so a model with cheap input and expensive output can lose to one with the opposite profile.
Context you resend. Retrieval results, documents and chat history are input on every request. Ten thousand tokens of context on a million requests is ten billion input tokens, which at $2 per million is $20,000. Prompt caching cuts that by 90% or more when the context is identical across requests.
Tokenizer differences. Prices are per token, but tokens are not the same size across providers. Anthropic's current tokenizer produces about 30% more tokens than its previous one for the same text. Turn on Scale for each model's tokenizer to compare like for like.
Volume discounts that are not on the price list. Committed-use contracts, provisioned throughput and enterprise agreements can change the picture at large volumes. This calculator uses public pay-as-you-go prices.
Long-context price tiers, by provider
Several providers raise the price of the whole request once the prompt passes a threshold. The calculator applies these automatically and marks affected rows with Long-context rate.
• OpenAI: prompts over 272K input tokens on GPT-5.4, GPT-5.5, GPT-5.6 and GPT-6 models are billed at the long-context rate: double for input and 1.5x for output.
• Google: Gemini 3.1 Pro and 2.5 Pro charge more for prompts over 200K tokens ($4 instead of $2 input on 3.1 Pro). The Flash models and Gemini 4 Argon have a single rate.
• Anthropic: Claude 4.6 and later bill the full 1M-token context at the standard rate, with one exception: Claude Haiku 5.5 charges $0.50 instead of $0.10 per million input tokens once a prompt passes 100,000 tokens.
• xAI: every Grok model doubles its price when a prompt reaches 200K tokens, and the higher rate applies to every token in that request.
Reading the subscription vs API comparison
The subscription mode prices your chat usage as if you made the same calls through the API: messages per day, tokens per message and reply, and how long your conversations run. Turn k of a conversation resends the k-1 earlier messages and replies, so the average prompt grows with conversation length; the tool shows that average.
With Serve the conversation history from the prompt cache turned on, the part of each prompt that was already sent is billed as a cache hit and the new part as a cache write, which is how a well-built chat client on the API behaves. Turning it off shows the worst case.
The break-even column is the number of messages per day at which the API costs exactly the plan price. Below it, pay-as-you-go is cheaper. Remember what the comparison leaves out: plans include web search, file handling, image generation and a polished app, and they cap usage; the API has no app but no cap beyond rate limits.
Related free tools
- Token Counter — Count tokens exactly for OpenAI models, estimate them for Claude, Gemini and Llama, see the cost, and watch the text split into tokens.
- AI ROI Calculator — Estimate how many hours and dollars automating a repetitive task could save your business every year.
- LLM VRAM Calculator — Work out how much GPU memory a local LLM needs for your quantization and context length, whether it fits your GPU or Mac, and how fast it will run.
- PII Redactor for AI Prompts — Replace emails, phone numbers, card numbers, API keys and names with placeholders before you paste text into an AI, then restore them in the reply.