AI Token Cost Calculator
AI APIs charge per token — roughly ¾ of a word — with separate input and output rates, so your cost is (input tokens × input price) + (output tokens × output price), times your number of requests. Pick a model or enter your own rate to see cost per request, month and year, and compare every major LLM side by side.
A free AI token & LLM cost calculator to estimate and compare OpenAI GPT-5, Claude, Gemini, Grok, DeepSeek and Mistral API pricing. Model prompt caching and batch discounts, count tokens from any text, and see your spend in your own currency.
Compare every model for this usage
Monthly cost for the same tokens and volume above, using each model's approximate 2026 list price (cheapest first). Your cached-input % and batch setting are applied.
| Model | Provider | Per request | Per month |
|---|
Token counter: estimate tokens from your text
Paste a prompt or document to estimate how many tokens it uses — roughly four characters, or three-quarters of a word, per token — then send the count straight into the calculator above.
Estimate only. For an exact count, use the model's own tokenizer (for example OpenAI's tiktoken); source code and non-English text can tokenize differently.
How the AI token cost calculator works
Every large language model API — OpenAI's GPT, Anthropic's Claude, Google's Gemini, xAI's Grok, DeepSeek and the rest — charges by the token. A token is a small piece of text, about four characters or three-quarters of a word. You pay for the tokens you send in (input) and the tokens the model writes back (output), and output is almost always the pricier side.
Cost per request = (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price)
Total cost = cost per request × number of requests
Providers quote prices per one million tokens, so this calculator does too. Pick a model preset to fill the rates automatically, or type your own to use it as an OpenAI API cost calculator, a ChatGPT API pricing calculator, a Claude or Gemini cost estimator, or a general LLM inference cost calculator. The comparison panel then prices your exact workload on every model at once — and you can price any other model, such as Meta's Llama, Alibaba's Qwen, Z.AI's GLM, Cohere, Perplexity or a Groq-hosted model, by typing its input and output rate into the custom fields.
How many tokens is that? Words and characters to tokens
For everyday English, one token is about four characters or roughly 0.75 words — so a word is about 1.33 tokens. Technical writing, code and non-English scripts usually use more tokens per word. Use these rules of thumb to size a prompt, or paste the text into the token counter above for an estimate.
| Text | ≈ Words | ≈ Tokens |
|---|---|---|
| A short question | 10 | ~13 |
| A paragraph | 100 | ~133 |
| A one-page memo | 500 | ~665 |
| A long article | 1,000 | ~1,333 |
| A short e-book chapter | 5,000 | ~6,650 |
2026 LLM API price comparison (per 1M tokens)
Current list prices, in US dollars, for 22 models across OpenAI, Anthropic, Google, xAI, DeepSeek and Mistral — verified against each provider's official pricing page in August 2026. This one table also powers the model dropdown and the live comparison above, so everything stays in sync. Prices change often and vary by context length, so confirm on the provider's page before you budget.
| Model | Provider | Input / 1M | Output / 1M |
|---|---|---|---|
| GPT-5.6 Sol | OpenAI | $4.00 | $20.00 |
| GPT-5.5 | OpenAI | $5.00 | $30.00 |
| GPT-5.4 mini | OpenAI | $0.75 | $4.50 |
| GPT-5.4 nano | OpenAI | $0.20 | $1.25 |
| GPT-4.1 | OpenAI | $2.00 | $8.00 |
| GPT-4o | OpenAI | $2.50 | $10.00 |
| GPT-4o mini | OpenAI | $0.15 | $0.60 |
| Claude Fable 5 | Anthropic | $10.00 | $50.00 |
| Claude Opus 5 | Anthropic | $5.00 | $25.00 |
| Claude Sonnet 5 | Anthropic | $2.00 | $10.00 |
| Claude Haiku 4.5 | Anthropic | $1.00 | $5.00 |
| Gemini 3.1 Pro | $2.00 | $12.00 | |
| Gemini 3.5 Flash | $1.50 | $9.00 | |
| Gemini 3 Flash | $0.50 | $3.00 | |
| Gemini 2.5 Flash | $0.30 | $2.50 | |
| Gemini 2.5 Flash-Lite | $0.10 | $0.40 | |
| Grok 4.5 | xAI | $2.00 | $6.00 |
| Grok 4.3 | xAI | $1.25 | $2.50 |
| DeepSeek V4-Flash | DeepSeek | $0.14 | $0.28 |
| DeepSeek V4-Pro | DeepSeek | $0.44 | $0.87 |
| Mistral Large | Mistral | $2.00 | $6.00 |
| Mistral Small | Mistral | $0.15 | $0.60 |
Estimates only — providers can change prices at any time and often launch new tiers. Cloud marketplaces such as AWS Bedrock and Azure OpenAI typically add roughly 10–30% on top of these direct-API rates.
GPT-4o vs Claude vs Gemini vs DeepSeek: which is cheapest?
There is no single winner — it depends on your token mix and how much quality you need. As a rough 2026 guide for a high-volume chatbot, the budget tiers win big: Gemini 2.5 Flash-Lite and DeepSeek are usually the cheapest, GPT-4o mini and Gemini Flash sit in the value zone, GPT-4o, Claude Sonnet and Gemini Pro are the mid-tier quality picks, and Claude Fable 5, Claude Opus and GPT-5.5 are the priciest per token. Instead of trusting a headline, enter your own input and output split above and read the Compare every model table — it ranks all 22 models cheapest-first for your exact workload, so the real answer is specific to you.
A worked example: monthly chatbot API cost
Imagine a support chatbot on GPT-4o handling 10,000 requests a month with about 1,000 input and 500 output tokens each. Input costs 10,000 × 1,000 ÷ 1,000,000 × $2.50 = $25; output costs 10,000 × 500 ÷ 1,000,000 × $10 = $50 — about $75 a month, or $0.0075 per request. The same workload on GPT-4o mini is roughly $4.50 a month, and Gemini 2.5 Flash-Lite is under $2 — which is exactly why the comparison table is worth a look before you pick a model.
Prompt caching and batch discounts
Two levers cut real money and are built into the calculator. Prompt caching stores a reused chunk — typically a fixed system prompt or shared context — and bills it at roughly 10% of the normal input rate on OpenAI, Anthropic and Google. For an agent that resends the same large instructions every call, caching can trim 40–70% off input cost; set your expected cached input % to model it. Batch APIs run non-urgent jobs (summaries, back-fills, evaluations) at about half price — tick Batch API to apply a 50% discount.
Reasoning (“thinking”) models cost more than they look
Reasoning models think in hidden tokens that never appear in the reply but are billed as output — often three to five times the visible answer. If you use a thinking or reasoning tier, budget your output tokens up, not down: a reply that shows 500 tokens might really bill 2,000–3,000. The calculator treats whatever you enter as billed output, so raise the output figure to stay realistic.
How much does an AI chatbot or agent cost to run?
Different workloads have very different token shapes. A chatbot is light — a few hundred tokens each way — so a small-business bot handling 100 conversations a day costs only a few dollars a month on a budget model, and even a frontier model stays modest. A RAG (retrieval) pipeline stuffs 5,000–10,000 input tokens of context per query, so input price and caching dominate. A coding agent reads whole files and reasons in long loops, burning hundreds of thousands of tokens in a single session — the fastest-growing and priciest pattern in 2026. To budget per user or per day, set the requests field to your conversations-per-day and switch the period to Day. Match the model to the shape: cheap tiers for high-volume chat, mid tiers with caching for RAG, and frontier models only for the hard reasoning steps.
Tips to lower your AI API bill
Most AI cost optimization comes from model choice and prompt discipline: use a smaller tier (GPT-4o mini, Claude Haiku, Gemini Flash or DeepSeek) for routine tasks, keep prompts tight, cap the maximum output length, cache repeated context, and route background jobs through the batch API. To control an enterprise AI budget, think in total cost of ownership — measure spend per feature and per user, not just per month — because one runaway agent loop can outspend everything else combined.
The AI token cost formula
No black box — here is exactly what the calculator does, so you can reproduce it in a spreadsheet.
- Tin, Tout — input and output tokens per request
- Pin, Pout — price per 1,000,000 input / output tokens
- R — number of requests (per day, month or year)
- c — share of input tokens served from cache (billed at ~10%); batch mode multiplies the total by 0.5
See your cost in any currency
AI providers bill in US dollars, but you can switch the display to 14 currencies — including the euro, pound, Indian rupee, Canadian and Australian dollar, yen and more — to sense-check a budget in the money you actually think in. So you can check the OpenAI, Claude or Gemini API cost in rupees (₹) for a project in India, in pounds (£) in the UK, or in euros (€) across Europe. Conversions use an approximate rate and are for reference only; your invoice is charged in USD.
How to use it & key terms
Pick a model (or enter prices), set your input and output tokens and how often you call the API, then press Calculate for the cost per call, per day and per month.
| Term | What it means |
|---|---|
| Token | A chunk of text (about 4 characters, or three-quarters of a word) that models are billed by. |
| Input tokens | The tokens in your prompt — usually the cheaper side. |
| Output tokens | The tokens the model generates — usually priced higher. |
| Context window | The maximum number of tokens a model can consider at once. |
| Cached input | Reused prompt tokens billed at a large discount. |
| Batch API | An asynchronous mode that roughly halves the price for non-urgent jobs. |
Sources & methodology
Cost is computed as (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price), multiplied by your request volume, with an optional cached-input discount (~10% of the input rate on the cached share) and a 50% batch discount. The comparison table applies the same maths to each model's list price. Currency conversions are approximate; providers bill in USD.
Sources: Standard per-token pricing arithmetic; list prices verified against each provider's official pricing page in August 2026 (OpenAI, Anthropic, Google, xAI, DeepSeek, Mistral) and cross-checked with independent pricing trackers.
Why a chat's cost grows with every turn
The API is stateless: the model keeps no memory between calls, so your app has to resend the entire conversation every time it asks for the next reply. That single fact quietly reshapes the bill. On the first turn you send a short system prompt and one question; by the tenth turn you are sending that system prompt plus the whole back-and-forth that came before, every earlier message counted again as fresh input tokens. The reply you see can stay a few sentences long, but the input riding beneath it grows with each exchange. In other words, the cost of a conversation is driven less by what the model says back and more by how much history you keep handing it.
This is why a real conversation costs more than a single exchange suggests. If each message and reply is a few hundred tokens, a ten-turn chat does not cost ten times the first turn — it costs more, because every later turn re-reads all the earlier ones. The closing turns of a long session are its most expensive part, and a few marathon threads can dominate a monthly total that is otherwise made up of short, cheap chats. To budget honestly, resist the urge to price one question and multiply. Instead, picture a typical conversation from greeting to resolution, add up the input across all of its turns, and enter that whole-session average as the input tokens above so the estimate reflects how people really use the assistant.
Once you can see the growth, the ways to tame it are clear. You rarely need to resend everything: trimming the thread to the last few turns, or replacing older messages with a short running summary, caps the input instead of letting it snowball. A lean system prompt helps as well, since that fixed block repeats on every single call. And setting a firm limit on how much history you carry protects you from the worst case, where one runaway session quietly outspends hundreds of ordinary ones. The same discipline keeps your forecast reliable: decide the conversation length you actually expect, then hold usage close to it.
- Early turns — cheap; there is little history to resend.
- Later turns — pricier; each one carries the whole thread as input.
- The fix — cap or summarise history, and keep the system prompt short.
Frequently asked questions
How are AI API costs calculated?
Divide input tokens by 1,000,000 and multiply by the input price, add output tokens ÷ 1,000,000 × the output price, then multiply by your number of requests. Output almost always costs more than input.
What is a token, and how many tokens is a word?
A token is about 4 characters or three-quarters of a word in English, so a word is roughly 1.33 tokens and 1,000 words is about 1,333 tokens. Code and non-English text can use more.
How much is 1 million tokens in 2026?
From under $1 per million for budget models (DeepSeek, Gemini Flash-Lite, GPT nano tiers) up to $15–$30 or more per million output tokens for frontier models. Input is usually 4–5× cheaper than output.
How much does the ChatGPT or GPT-5 API cost?
As a 2026 guide, GPT-5.5 is about $5 / $30 per 1M input/output, GPT-4o about $2.50 / $10, and GPT-4o mini about $0.15 / $0.60. Classic GPT-4 was $30 / $60. Confirm on OpenAI's pricing page.
How much does the Claude API cost?
Claude Opus is around $5 / $25 per 1M, Sonnet 5 about $2 / $10, and Haiku about $1 / $5. Prompts above 200K tokens can cost more on some tiers.
How much does the Gemini API cost?
Gemini 3.1 Pro is roughly $2 / $12 per 1M, Gemini 3.5 Flash about $1.50 / $9, Gemini 2.5 Flash $0.30 / $2.50, and Flash-Lite about $0.10 / $0.40 — among the cheapest from a major provider.
What is the cost per 1,000 tokens?
Divide the per-million price by 1,000: $2.50 per 1M input tokens is $0.0025 per 1,000. Output is usually priced higher than input.
Which is the cheapest LLM API?
Budget tiers like DeepSeek, Gemini Flash-Lite and the GPT nano class sit under $1 per million input tokens. The lowest list price isn't always cheapest in production — output volume, caching, retries and quality all matter.
How does prompt caching reduce cost?
Reused input such as a fixed system prompt is billed at roughly 10% of the normal input rate on OpenAI, Anthropic and Google, which can cut 40–70% off input cost for agents. Set a cached-input % above to model it.
Do reasoning or “thinking” models cost more?
Yes — they generate hidden reasoning tokens billed as output, often 3–5× the visible reply, so budget extra output tokens when using them.
How can I reduce my AI API bill?
Use a smaller model for simple tasks, shorten prompts, cap output length, cache repeated context, and use the batch API (about 50% off) for non-urgent jobs.
How much does an AI chatbot cost to run?
Roughly conversations-per-day × 30 × tokens-per-conversation × the model's per-token price. A small bot on a budget model (DeepSeek, Gemini Flash-Lite, GPT-4o mini) at ~100 chats a day is only a few dollars a month; the same on a frontier model is still modest. Set requests to your conversations and pick “Day” to see it.
Is the direct API cheaper than AWS Bedrock or Azure?
Usually yes. Cloud marketplaces like AWS Bedrock, Azure OpenAI and Google Vertex AI typically add about 10–30% on top of the model provider's direct API price, in exchange for unified billing and compliance features.
How do I convert tokens to words (and words to tokens)?
In English, one token is about 0.75 words. Multiply tokens by 0.75 to get words, or words by about 1.33 to get tokens — so 1,000 tokens ≈ 750 words, and 1,000 words ≈ 1,333 tokens. Paste text into the token counter above for an estimate.
Which is cheaper — GPT-4o, Claude, Gemini or DeepSeek?
On token price, budget tiers like Gemini 2.5 Flash-Lite and DeepSeek are usually cheapest; GPT-4o mini and Gemini Flash are strong value; GPT-4o, Claude Sonnet and Gemini Pro are mid-tier; Claude Fable 5, Opus and GPT-5.5 are priciest. Enter your token split and use the compare table for the exact ranking.
How much does the OpenAI API cost per month?
Roughly $5–$40 for light personal use, $40–$200 for small apps, $200–$1,500 for production, and $1,500+ at enterprise scale — driven by model, volume, output length, and caching/batch. Enter your usage above for a specific figure.
Can I see the cost in my own currency?
Yes — switch the currency selector to view your estimate in 14 currencies. Providers bill in USD and list prices change often, so treat conversions as a reference and confirm on the provider's page.
Is the OpenAI API free, and how much is the free credit?
The API is pay-as-you-go, not free — you're billed per token with no monthly fee. New OpenAI accounts have usually included a small one-time trial credit (recently about $5) that expires after a few months, and ChatGPT's free app tier is separate from the paid API. Check your OpenAI dashboard for the current offer, then use this calculator to see how far a budget goes.
Is the API cheaper than a ChatGPT Plus or Claude Pro subscription?
It depends on usage. A flat plan like ChatGPT Plus or Claude Pro (about $20/mo) gives one person unlimited chat in the app; the API is pay-per-token — often a few cents for light use, but more than $20 for heavy automated workloads. For light personal use the API is usually cheaper; for all-day heavy chat a flat plan often wins. Enter your token usage above to compare.
How much does GPT-4o cost per month for a chatbot?
GPT-4o is ~$2.50 / $10 per 1M (input/output). Rough example: a chatbot with ~50,000 conversations a month can run about $700 on GPT-4o — but only ~$40–45 on GPT-4o mini for the same work. Enter your own volume above for your exact figure.
How much do the DeepSeek, Grok and Mistral APIs cost?
2026 guide: DeepSeek ~$0.14 / $0.28 per 1M (Flash tier), xAI Grok 4.5 ~$2 / $6, Mistral Large ~$2 / $6. These budget/mid-tier models can cost far less than frontier ones — pick each in the compare table and confirm on the provider's page.
Why do output tokens cost more than input tokens?
Output is generated one token at a time (much more compute-heavy than reading input), so it's priced higher — usually 3–5×, sometimes up to 10× the input rate. Long replies and reasoning “thinking” tokens drive most of your bill, so capping output length saves the most.
How many tokens is 1,000 words, an email or a page?
1 token ≈ 0.75 words, so 1,000 words ≈ 1,333 tokens and 1,000 tokens ≈ 750 words. Rough guides: a ~200-word email ≈ 270 tokens, a ~500-word page ≈ 650 tokens, a 10-page (~3,000-word) report ≈ 4,000 tokens. Code uses more. Paste text into the token counter above to check.
How much does it cost to run an AI agent?
Agents cost more than chatbots — they read files, call tools and reason in long loops, often tens to hundreds of thousands of tokens per task as context grows. One heavy run can dwarf a single chat turn, so budget generously and use prompt caching. Set your per-task tokens and volume above to estimate.
Do images, vision or audio also use tokens?
Yes. Vision models bill an image as a set number of tokens (based on size), and voice/“realtime” audio is billed per token too — usually much pricier than text. This tool focuses on text tokens (which drive most chatbot/agent bills); for image- or audio-heavy apps, check the provider's page for those rates and add them on top.