Tokens & Costs
LLM cost calculator: API pricing for 340+ models
An LLM API bill is input tokens times the input price plus output tokens times the output price, quoted per million tokens. Enter tokens per request and requests per day to see the cost per request, per day and per month for 340+ models, with caching, batch discounts and cheaper alternatives. Prices as of 16 October 2026, updated daily.
$2 input · $10 output per 1M tokens · 1,000,000-token context
Prompt, history and context
The model's reply
Share of each prompt read from the prompt cache at $0.10 per 1M.
- Input per request
- $0.003
- Output per request
- $0.004
10 cheapest models for this workload
Only models whose context and output limits fit your request| # | Model | Per month | vs Claude Sonnet 5.5 | Action |
|---|---|---|---|---|
| 1 | Mistral NemoMistral | $1.69 | −99% | |
| 2 | Ling 3.0 FlashinclusionAI | $1.72 | −99% | |
| 3 | ExtractScaleDown | $1.83 | −99% | |
| 4 | SummarizeScaleDown | $1.83 | −99% | |
| 5 | gpt-oss-20bOpenAI | $1.92 | −99% | |
| 6 | Granite 4.0 MicroIBM | $2.14 | −99% | |
| 7 | Nex-N2.5-MiniNex AGI | $2.36 | −99% | |
| 8 | Llama 3 8B LunarisSao10K | $2.43 | −99% | |
| 9 | Qwen3.7 FlashQwen | $2.95 | −99% | |
| 10 | Schematron V2 TurboInference.net | $3.19 | −98% |
Cheapest isn’t always best: quality, speed and reliability differ a lot between models. Use this list to find candidates, then test them on your own prompts.
Steps
How do I use the LLM cost calculator?
- Pick the model you plan to use. Search by model name or provider.
- Enter the typical number of input and output tokens per request, or start from a preset such as a support chatbot or coding agent.
- Set how many requests you expect per day.
- If your prompts share a long, fixed start (like a system prompt), set the cached share. If results can wait up to a day, turn on the batch API.
- Read the monthly cost, compare it with the cheapest alternatives, and copy the link to share your estimate.
Method
How do you calculate LLM API cost?
Every major LLM API bills by the token: small chunks of text that average about four characters in English. Input tokens (everything you send: system prompt, conversation history, retrieved documents) and output tokens (the model’s reply) have separate prices, quoted in US dollars per million tokens. This calculator applies those published prices to your workload. To get real numbers, count the tokens in a real prompt.
For one request, the cost is:
(uncached input × input price + cached input × cached price + output × output price) ÷ 1,000,000
The daily cost multiplies that by your requests per day. The monthly figure uses the average month length of 365 ÷ 12 = 30.4 days, and the yearly figure uses 365 days. For example, a request with 2,000 input and 500 output tokens on GPT-6.1 Sol costs (2,000 × $2 + 500 × $10) ÷ 1,000,000 = $0.009.
How much does the OpenAI API cost?
OpenAI’s 57 paid models in our data cost from $0.018 to $150 per million input tokens (as of 16 October 2026), and output costs more. The cheapest by blended price is gpt-oss-20b. See every model and price on the OpenAI pricing page, or pick one in the calculator.
How much does the Claude API cost?
Anthropic’s 15 paid models in our data cost from $0.10 to $15 per million input tokens (as of 16 October 2026), and output costs more. The cheapest by blended price is Claude Haiku 5.5. See every model and price on the Anthropic pricing page, or pick one in the calculator.
How much does the Gemini API cost?
Google’s 21 paid models in our data cost from $0.05 to $2 per million input tokens (as of 16 October 2026), and output costs more. The cheapest by blended price is Gemma 3 4B. See every model and price on the Google pricing page, or pick one in the calculator.
How much is 1,000 or 1 million tokens?
Prices are quoted per million tokens, so 1 million tokens costs the listed price and 1,000 tokens costs a thousandth of it. For the popular models below, 1,000 input tokens cost from $0.0001 (GPT-6 Luna) to $0.004 (Claude Opus 5.5). The prices table lists the per-1,000 figure for each.
Why are output tokens the expensive part?
Output is priced at 3× to 5× the input price for the popular models below, because each output token is generated one after another. Two things inflate output more than people expect. First, reasoning models bill their hidden “thinking” as output tokens, so a short visible answer can still cost thousands of tokens. Second, a verbose system prompt (“explain your reasoning step by step”) makes every reply longer. Asking for concise answers is often the cheapest optimisation available.
How much does prompt caching save?
If many requests begin with the same text, providers can keep that prefix in a cache and charge 2% to 27% of the normal input price to read it again. The calculator assumes the cache is already warm. Some providers also charge a one-time premium to write to the cache, which matters if your prefix changes often. Caching only applies to an identical prefix, so put the fixed parts of your prompt first and the parts that change last. To see how often your traffic will actually hit the cache, and whether the write premium pays off, see what prompt caching saves.
When do batch and long-context prices apply?
Batch APIs run requests in the background, usually within 24 hours, at roughly half price. When you turn on batch mode, the calculator uses each provider’s published batch price, and it tells you if a model has none. To compare batch API pricing with real-time cost for a mixed workload, with each provider’s turnaround and limits, use the batch calculator. Some models also switch to a higher rate once a prompt passes a size threshold, such as 200,000 tokens. When that happens the higher rate covers the whole request, and the calculator shows a note.
Which LLM API is cheapest for this workload?
The alternatives table ranks every model whose context window and output limit can handle your request, from cheapest up. It doesn’t judge quality: the cheapest model may not be good enough for your task. Use it to shortlist candidates, then test them on real prompts before switching. For an overview, see the cheapest LLM APIs; if you chat more than you build, also compare with ChatGPT Plus or Claude Pro.
Prices come from the OpenRouter models API and the open-source LiteLLM price list and are refreshed daily (last updated 2026-10-16). For open-weight models such as Llama, the price is a typical hosted price; running them on your own hardware costs something else entirely. The methodology page explains how the data is collected and checked, and the AI pricing changes log shows which prices moved recently.
Examples
How much does a real workload cost?
Support chatbot: 1,500 input and 400 output tokens, 1,000 conversations a day
| Model | Per request | Per month | Per month, half the prompt cached |
|---|---|---|---|
| GPT-6.1 Sol OpenAI | $0.007 | $212.92 | $169.57 |
| GPT-6 Luna OpenAI | $0.00035 | $10.65 | $8.59 |
| Claude Opus 5.5 Anthropic | $0.014 | $425.83 | $339.15 |
| Claude Sonnet 5.5 Anthropic | $0.007 | $212.92 | $169.57 |
| Claude Haiku 5.5 Anthropic | $0.00035 | $10.65 | $8.59 |
| Gemini 3.8 Flash Google | $0.00289 | $87.83 | $70.89 |
| DeepSeek V4.1 Flash DeepSeek | $0.00093 | $28.29 | $21.58 |
| Llama 4 Maverick Meta | $0.000542 | $16.49 | $13.36 |
Prices used, in USD per 1M tokens
| Model | Input | Cached input | Output | Per 1K in / out | Batch in / out | Context |
|---|---|---|---|---|---|---|
| GPT-6.1 Sol | $2 | $0.10 | $10 | $0.002 / $0.01 | $1 / $5 | 1,050,000 |
| GPT-6 Luna | $0.10 | $0.01 | $0.50 | $0.0001 / $0.0005 | $0.05 / $0.25 | 1,050,000 |
| Claude Opus 5.5 | $4 | $0.20 | $20 | $0.004 / $0.02 | $2 / $10 | 1,000,000 |
| Claude Sonnet 5.5 | $2 | $0.10 | $10 | $0.002 / $0.01 | $1 / $5 | 1,000,000 |
| Claude Haiku 5.5 | $0.10 | $0.01 | $0.50 | $0.0001 / $0.0005 | $0.05 / $0.25 | 1,000,000 |
| Gemini 3.8 Flash | $0.825 | $0.0825 | $4.125 | $0.000825 / $0.00413 | $0.375 / $1.875 | 1,048,576 |
| DeepSeek V4.1 Flash | $0.30 | $0.006 | $1.20 | $0.0003 / $0.0012 | – | 1,048,576 |
| Llama 4 Maverick | $0.1875 | $0.05 | $0.6525 | $0.000188 / $0.000653 | – | 128,000 |
Last updated 2026-10-16 from OpenRouter models API and LiteLLM model prices and context windows. “–” means no published price.
FAQ
Frequently asked questions
What is the formula for LLM API cost?
Cost = input tokens ÷ 1,000,000 × input price + output tokens ÷ 1,000,000 × output price, with cached input and batch requests charged at their own lower prices. For example, 2,000 input and 500 output tokens on GPT-6.1 Sol ($2 in, $10 out per million) cost $0.009 per request.
How much does it cost to process 1,000 tokens?
The price per million tokens divided by 1,000. As of 16 October 2026, 1,000 input tokens cost $0.0001 on GPT-6 Luna and $0.004 on Claude Opus 5.5; output costs more. 1 million tokens costs the listed price itself.
Is it cheaper to use Claude or ChatGPT through the API than a subscription?
For light use, usually yes; for long daily conversations, usually not, because the API bills the whole conversation history again on every turn while a subscription is a flat fee. The subscription vs API calculator compares the two for your own usage.
How do I know how many tokens my requests use?
For English text, one token is roughly four characters or three-quarters of a word, so 1,000 words is about 1,300 tokens. The most reliable way is to log the usage numbers the API returns with every response, average them over a day of real traffic, and enter those averages here.
Why do output tokens cost more than input tokens?
Input tokens are processed in parallel, but output tokens are generated one at a time, which uses far more compute per token. Across the popular models on this page, output is priced at 3× to 5× the input price, so long answers usually dominate the bill.
What is cached input, and should I use it?
When many requests start with the same text (a long system prompt, tool definitions, or a document you ask several questions about), providers can cache that prefix and charge much less to read it again: 2% to 27% of the normal input price for the models on this page. If your prompts share a stable prefix, set the cached share to roughly how much of each prompt that prefix makes up.
When is the batch API worth it?
Batch APIs process requests asynchronously, usually within 24 hours, for about half the normal price. They suit work nobody is waiting for: nightly summaries, classifying a backlog, generating embeddings or evaluations. They don't suit chat or anything interactive.
Are these the prices I'll actually pay?
They are list prices in US dollars per million tokens. Your bill can differ because of taxes, free tiers, volume discounts, regional pricing, or using a reseller instead of the provider directly. For open-weight models, the price shown is a typical hosted price, and different hosts charge different amounts. Always confirm critical numbers on the provider's pricing page.
How often are the prices updated?
Every day. A scheduled job pulls the OpenRouter models API and the open-source LiteLLM price list, checks the data, and publishes it if anything changed. The prices on this page were last updated on 2026-10-16. See the methodology for details.
Why does the cost jump for very long prompts?
Some models charge a higher rate once a single prompt passes a size threshold (often around 200,000 tokens), and the higher rate then applies to the whole request, not just the extra tokens. The calculator applies these long-context prices automatically and tells you when they kick in.
Related
Related tools
- AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.
- Prompt Caching CalculatorEstimate savings from prompt caching.
- Batch API Savings CalculatorCompare batch and real-time API costs.
- AI Model ComparisonCompare prices, context windows and features across models.
- AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.
- Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.
Read