AI API cost calculator
Enter how much text you send and get back, and see what a month costs on each model. Prices come from each company’s own pricing page.
Prices checked October 13, 2026
Monthly cost
Models
- Turn on JavaScript to see the costs. The price tables below work without it.
Prices by company
Comparisons
How the numbers work
AI companies charge for the text a model reads (input) and the text it writes (output), counted in tokens and priced per million. Output costs three to eight times as much as input (five times on most current models), so long answers move the bill more than long questions.
The calculator works out, for each model: input not read from cache × input price, plus cached input × cached price, plus output × output price, divided by one million. With batch on, it uses each company’s batch price instead.
Some models charge more once a single prompt gets long:
- Claude Haiku 5.5: over 100,000 tokens
- GPT-6, GPT-5.6, GPT-5.5 and GPT-5.4: over 272,000 tokens
- Grok 4.7: 200,000 tokens or more
- Gemini 3.1 Pro and 2.5 Pro: over 200,000 tokens
The calculator switches to the higher price when your input per request passes that point. Try the “Long documents” example to see it.
Not included: cache-write charges, Gemini’s hourly cache storage fee, web search and other tool fees, image and audio tokens, taxes, and regional or data-residency surcharges (about 10% at Anthropic and OpenAI). Your real bill can be higher.
Questions
What is a token?
A piece of a word. Google’s rule of thumb for its Gemini models is about 4 characters per token, or 60 to 80 English words per 100 tokens. Each company splits text its own way, so the same text can be a different number of tokens on different models. The token counter estimates it for your own text.
Which model is cheapest?
It depends on the job. In the support-chat example, Claude Haiku 5.5 and GPT-6 Luna cost the same at list prices, because both charge $0.10 per million input tokens and $0.50 per million output tokens. With 150,000-token documents, Haiku 5.5 moves to its long-prompt price and GPT-6 Luna does not. Change the numbers to match your own use.
Should I count in tokens or words?
Tokens, if your logs or the company’s dashboard give you real counts. Words, for a first estimate. In word mode the calculator adds 30% for Claude 4.7 and later models, because Anthropic says their newer tokenizer produces about 30% more tokens for the same text. You can switch that off.
How often are prices checked?
Every week, against each company’s pricing page. Changes and announced future prices go in the price change log with their dates.