Pick a job or type in your own numbers, and this LLM cost calculator shows what 38 LLM APIs would cost you per request and per month, cheapest first. Prices come from each provider's own pricing page, in US dollars.
LLM Cost Calculator 2027: API Prices for 38 Models
Free LLM cost calculator: count your tokens and see what 38 models, including GPT, Claude, Gemini, and DeepSeek, cost per request and per month.
- Updated
- First published
On this page
How to use the LLM cost calculator
The LLM cost calculator needs four numbers, and the presets fill them in for you. Here's how to make it match your app:
- Pick the job closest to yours, or paste a sample prompt into the token counter and click Use as input tokens.
- Set the output tokens: how long a typical answer is, plus any thinking the model does first.
- Enter how many requests you expect a day or a month.
- Slide the cache bar to how much of each prompt repeats, like your instructions and the chat so far.
- Tick the batch API or DeepSeek off-peak boxes if your jobs can wait, and filter by quality to skip the weaker models.
- Done! The list shows what every model would cost you, cheapest first.
What do common LLM jobs cost?
Common LLM jobs cost from under 2 cents to about $60 per 1,000 requests, depending on the model and the job. Here's what 1,000 requests of each preset cost on ten popular models, cheapest chatbot first:
| Model | Chatbot reply | Summarize a document | Tag or classify | Coding agent step |
|---|---|---|---|---|
| Qwen3.7-FlashAlibaba Cloud | $0.080 | $0.30 | $0.018 | $1.54 |
| gpt-oss-20bDeepInfra | $0.13 | $0.31 | $0.018 | $1.41 |
| GPT-6 LunaOpenAI | $0.29 | $1.05 | $0.060 | $1.69 |
| Claude Haiku 5.5Anthropic | $0.29 | $1.05 | $0.060 | $1.69 |
| DeepSeek V4.1 FlashDeepSeek | $0.73 | $3.00 | $0.17 | $3.80 |
| Gemini 3.1 Flash-LiteGoogle | $0.80 | $2.75 | $0.15 | $4.60 |
| Gemini 3.8 FlashGoogle | $2.16 | $7.88 | $0.45 | $12.68 |
| GPT-6.1 TerraOpenAI | $2.79 | $10.50 | $0.60 | $15.20 |
| Claude Sonnet 5.5Anthropic | $5.58 | $21.00 | $1.20 | $30.40 |
| Claude Opus 5.5Anthropic | $11.16 | $42.00 | $2.40 | $60.80 |
Each job uses the calculator's preset numbers. A chatbot reply is 3,000 tokens in (60% of them cached) and 300 out. A document summary is 8,000 in and 500 out. Tagging is 500 in and 20 out. A coding agent step is 40,000 in (85% cached) and 1,500 out.
The spread is the point: the same 1,000 chatbot replies cost $0.29 on GPT-6 Luna and $11 on Claude Opus 5.5. Most apps don't need the biggest model for every message.
LLM API pricing comparison: all 38 models
This LLM API pricing comparison covers the 38 models in the calculator, from 14 providers, sorted from cheapest to most expensive by a typical mix of three input tokens to every output token. All prices are US dollars per million tokens.
| Model | Provider | Input | Cached input | Output | Context | Quality score |
|---|---|---|---|---|---|---|
| Llama 3.1 8BOld and small | DeepInfraOpen model | $0.02 | – | $0.04 | 128K | – |
| Qwen3.7-FlashPrompts up to 32K tokens | Alibaba Cloud | $0.03 | $0.003 | $0.13 | 1M | – |
| gpt-oss-20b | DeepInfraOpen model | $0.03 | – | $0.14 | 128K | – |
| Amazon Nova Micro | Amazon Bedrock | $0.035 | $0.00875 | $0.14 | 128K | – |
| Command R7B | Cohere | $0.0375 | – | $0.15 | 128K | – |
| gpt-oss-120b | DeepInfraOpen model | $0.037 | – | $0.17 | 128K | – |
| Ministral 3 3B | Mistral | $0.10 | $0.01 | $0.10 | 256K | – |
| Gemma 4 26B A4B | DeepInfraOpen model | $0.07 | – | $0.34 | 256K | – |
| Ministral 3 8B | Mistral | $0.15 | $0.015 | $0.15 | 256K | – |
| Llama 3.3 70B | DeepInfraOpen model | $0.10 | – | $0.32 | 128K | – |
| MiMo-V2.6-Flash | XiaomiOpen model | $0.14 | $0.0028 | $0.28 | 1M | 27 |
| Claude Haiku 5.55x the price on prompts over 100K tokens | Anthropic | $0.10 | $0.01 | $0.50 | 1M | 36 |
| GPT-6 Luna | OpenAI | $0.10 | $0.01 | $0.50 | 1M | 28 |
| Qwen3.8-Flash | Alibaba Cloud | $0.15 | $0.015 | $0.47 | 1M | – |
| GLM-5.3-Flash | Z.aiOpen model | $0.15 | $0.03 | $0.50 | 1M | 28 |
| MiniMax-M3.1-Flash | MiniMaxOpen model | $0.15 | $0.015 | $0.60 | 1M | 29 |
| Mistral Small 4 | Mistral | $0.15 | $0.015 | $0.60 | 256K | 4 |
| DeepSeek V4.1 FlashHalf price off-peak | DeepSeekOpen model | $0.30 | $0.006 | $1.20 | 1M | 33 |
| MiniMax-M3 | MiniMaxOpen model | $0.30 | $0.06 | $1.20 | 1M | 19 |
| Gemini 3.1 Flash-Lite | $0.25 | $0.025 | $1.50 | 1M | – | |
| Amazon Nova 2 Lite | Amazon Bedrock | $0.30 | $0.075 | $2.50 | 1M | – |
| Gemini 3.5 Flash-Lite | $0.30 | $0.03 | $2.50 | 1M | 12 | |
| Mistral Large 4 | Mistral | $0.70 | $0.07 | $2.10 | 1M | 26 |
| Grok Build 0.1Coding model | xAI | $1.00 | $0.20 | $2.00 | 256K | – |
| Gemini 3.8 FlashDoubles to $1.50 / $7.50 on January 1, 2027 | $0.75 | $0.075 | $3.75 | 1M | 31 | |
| Grok 4.3 | xAI | $1.25 | $0.20 | $2.50 | 1M | – |
| DeepSeek V4 ProHalf price off-peak | DeepSeekOpen model | $1.32 | $0.044 | $3.96 | 1M | 23 |
| GPT-6.1 Terra | OpenAI | $1.00 | $0.05 | $5.00 | 1M | 51 |
| GLM-5.3 | Z.aiOpen model | $1.40 | $0.26 | $4.40 | 1M | 32 |
| Grok 4.7 | xAI | $2.00 | $0.50 | $6.00 | 500K | 35 |
| Qwen3.8-Max | Alibaba Cloud | $2.00 | $0.20 | $6.00 | 1M | 34 |
| Claude Sonnet 5.5 | Anthropic | $2.00 | $0.10 | $10.00 | 1M | 55 |
| Gemini 4 ArgonDoubles to $4 / $20 on December 1, 2026 | $2.00 | $0.10 | $10.00 | 1M | 50 | |
| GPT-6.1 Sol | OpenAI | $2.00 | $0.10 | $10.00 | 1M | 55 |
| Kimi K3.1 Pro | Moonshot AIOpen model | $2.00 | $0.20 | $10.00 | 1M | 46 |
| Claude Opus 5.5 | Anthropic | $4.00 | $0.20 | $20.00 | 1M | 59 |
| Claude Fable 5.1 | Anthropic | $10.00 | $0.25 | $50.00 | 1M | 50 |
| GPT-6 Astra | OpenAI | $10.00 | $1.00 | $50.00 | 1M | 57 |
The quality score is the Artificial Analysis Intelligence Index, which runs every model through the same tough reasoning, coding, and agent tests, at each model's best setting. Higher is smarter, and a dash means it hasn't been scored. Open models can be hosted by anyone, so you'll find other prices for them, and DeepSeek's prices are its peak rates.
How do you calculate LLM API cost?
You calculate LLM API cost by multiplying your input tokens by the input price and your output tokens by the output price, adding them, and dividing by 1,000,000, because every provider prices per million tokens:
cost per request = (input tokens × input price + output tokens × output price) ÷ 1,000,000
Cached input gets its own, much lower price, so split the input into the part that's cached and the part that isn't. Here's the chatbot preset on GPT-6 Luna, which charges $0.10 per million input tokens, $0.01 cached, and $0.50 output:
- 1,200 fresh input tokens × $0.10 = 120
- 1,800 cached input tokens × $0.01 = 18
- 300 output tokens × $0.50 = 150
- (120 + 18 + 150) ÷ 1,000,000 = $0.000288 a reply, or $2.88 for 10,000 replies
Every provider's dashboard shows the exact tokens each request used, so after a day of real traffic, swap the presets for your actual averages.
How many tokens is 1,000 words?
1,000 words is about 1,330 tokens in English. A token averages about three-quarters of a word, or about four characters, which is OpenAI's rule of thumb too. Here's what everyday text works out to:
| Text | Tokens |
|---|---|
| A tweet (40 words) | About 55 tokens |
| A short email (150 words) | About 200 tokens |
| 750 words | About 1,000 tokens |
| 1,000 words | About 1,330 tokens |
| A 10-page report (5,000 words) | About 6,700 tokens |
| A novel (90,000 words) | About 120,000 tokens |
Code, numbers, and most languages other than English use more tokens per word, so pad your estimate if that's what you're sending. If you want the background on how models break text into tokens, my guide to natural language processing covers it.
What makes an LLM API cost more than the calculator says?
Thinking tokens, retries, and tool calls make a real LLM bill higher than a simple token estimate. These are the things to allow for:
- Thinking tokens. Reasoning models bill their hidden thinking as output. Add it to your output tokens, or turn the thinking down for simple jobs.
- Agents and tools. Every tool call resends the conversation, so one task can be dozens of requests. Count requests per task, not per user message.
- Retries. Timeouts and bad answers you ask for again cost the full price twice.
- Long prompts. Some models charge more past a length: Claude Haiku 5.5 costs five times as much over 100K tokens, and OpenAI and xAI charge more past 272K and 200K. The calculator applies these automatically.
- Premium tiers. Faster "priority" or "fast" processing costs 1.5 to 2 times as much, and OpenAI and Anthropic charge about 10% extra to keep data in one country or region.
- Cache writes. OpenAI and Anthropic charge a little extra the first time a prompt goes into the cache, so caching only pays off when a prompt gets reused.
Which LLM API is cheapest for my app?
The cheapest LLM API for your app is the top row of the calculator once you've filtered out the models that aren't good enough. Price alone picks old, small models like Llama 3.1 8B, so set a minimum quality score first.
For which cheap models are actually any good, the free options, and which providers' prices are about to change, see my breakdown of the cheapest LLM API, which uses the same prices as this calculator.
Is it cheaper to run an LLM locally?
Running an LLM locally costs nothing per token, so it's cheaper than any API if you already own a computer with 16GB of memory or more. You pay in quality and speed instead: laptop-sized models trail the best cloud models, and a graphics card big enough for the large ones costs more than years of API calls for most apps.
Here's how to run an LLM locally on a Mac, Windows, or Linux, and which model fits your computer.
Questions people ask
Frequently asked questions
How do you calculate LLM API cost?
Multiply your input tokens by the input price and your output tokens by the output price, add them together, and divide by 1,000,000, because prices are per million tokens. Then multiply by your number of requests. Cached input is billed at the lower cache price.
How many tokens is 1,000 words?
About 1,330 tokens in English. A token averages about three-quarters of a word, or about four characters, so 1,000 tokens is roughly 750 words. Code, numbers, and most other languages use more tokens per word.
How much does it cost to run an LLM chatbot?
About $0.0003 a reply on GPT-6 Luna or Claude Haiku 5.5, so 10,000 replies a month costs about $2.88. The same chatbot costs about $55.80 a month on Claude Sonnet 5.5 and $111.60 on Claude Opus 5.5.
Do thinking tokens count toward LLM API cost?
Yes. Reasoning models bill their hidden thinking tokens as output, at the output price. A model that thinks for 2,000 tokens before a 300-token answer is billed for 2,300 output tokens.
Is this LLM cost calculator free?
Yes. It's free, needs no sign-up, and runs in your browser. The prices come from each provider's own pricing page.
How accurate is this LLM cost calculator?
It uses each provider's list prices, so it's accurate for text requests at standard rates. Real bills run higher if a model thinks a lot, retries, or calls tools, and lower if you negotiate volume discounts.
What is a token in an LLM?
A token is a chunk of text the model reads or writes, usually part of a word. In English a token averages about four characters, or three-quarters of a word, and LLM APIs charge per million tokens.
Keep reading
More from AI Explained

Cheapest LLM API in 2027: Prices and Providers Compared
Updated Nov 10, 2026 · 10 min read


30 Computer Vision Projects With Source Code (All Levels)
Updated Nov 7, 2026 · 26 min read