How the calculator works
Providers charge per 1M tokens, with one price for input and a higher one for output. The calculator multiplies your input tokens by the input price and your output tokens by the output price, adds them and divides by 1 million. That is the cost of one request.
Take gpt-6.1-sol at $2.00 input and $10.00 output per 1M tokens. A request with 2,000 input tokens and 500 output tokens costs $0.004 plus $0.005, so $0.009. At 1,000 requests a day that is $9.00 a day and $270.00 over a 30-day month.
The cached input slider sets how much of each prompt the provider serves from its prompt cache. Those tokens cost the cached input price, which is 75% to 98% below the normal input price on these models.
Count reasoning and thinking tokens as output. OpenAI, Anthropic and Google bill them as output tokens, even though they never show up in the answer. To measure a real prompt, paste it into the token counter.
Prices per 1M tokens
These are the standard rates the calculator uses, in US dollars per 1M tokens, checked on 9 Nov 2026. Each provider's pricing page is listed under sources.
| Model | Input | Cached input | Output | Long prompts and changes |
|---|---|---|---|---|
| gpt-6-astra (OpenAI) | $10.00 | $1.00 | $50.00 | Over 272K input: $20.00 in, $75.00 out |
| gpt-6.1-sol (OpenAI) | $2.00 | $0.10 | $10.00 | Over 272K input: $4.00 in, $15.00 out |
| gpt-6.1-terra (OpenAI) | $1.00 | $0.05 | $5.00 | Over 272K input: $2.00 in, $7.50 out |
| gpt-6-luna (OpenAI) | $0.10 | $0.01 | $0.50 | Over 272K input: $0.20 in, $0.75 out |
| gpt-5.6-sol (OpenAI) | $4.00 | $0.40 | $20.00 | Over 272K input: $8.00 in, $30.00 out; promo price until 30 Nov 2026 |
| gpt-5.6-terra (OpenAI) | $2.00 | $0.20 | $12.00 | Over 272K input: $4.00 in, $18.00 out |
| gpt-5.6-luna (OpenAI) | $0.20 | $0.02 | $1.20 | Over 272K input: $0.40 in, $1.80 out |
| Claude Fable 5.1 (Anthropic) | $10.00 | $0.25 | $50.00 | Flat rate |
| Claude Opus 5.5 (Anthropic) | $4.00 | $0.20 | $20.00 | Flat rate |
| Claude Sonnet 5.5 (Anthropic) | $2.00 | $0.10 | $10.00 | Flat rate |
| Claude Haiku 5.5 (Anthropic) | $0.10 | $0.01 | $0.50 | Over 100K input: $0.50 in, $2.50 out |
| Gemini 4 Argon (Google) | $2.00 | $0.10 | $10.00 | From 1 Dec 2026: $4.00 in, $20.00 out |
| Gemini 3.8 Flash (Google) | $0.75 | $0.075 | $3.75 | From 1 Jan 2027: $1.50 in, $7.50 out |
| Gemini 3.5 Flash-Lite (Google) | $0.30 | $0.03 | $2.50 | Flat rate |
| grok-4.7 (xAI) | $2.00 | $0.50 | $6.00 | From 200K input: $4.00 in, $12.00 out |
| grok-build-0.1 (xAI) | $1.00 | $0.20 | $2.00 | From 200K input: $2.00 in, $4.00 out |
| grok-4.3 (xAI) | $1.25 | $0.20 | $2.50 | From 200K input: $2.50 in, $5.00 out |
| deepseek-v4-pro (DeepSeek) | $1.32 | $0.044 | $3.96 | Peak rate, off-peak is half |
| deepseek-flash (DeepSeek) | $0.30 | $0.006 | $1.20 | Peak rate, off-peak is half |
Long prompts and price changes
Some prices depend on prompt size. Once a prompt passes 272K input tokens, OpenAI bills the whole request at 2x the input and cached rates and 1.5x the output rate. xAI doubles every rate once a prompt reaches 200K tokens. Claude Haiku 5.5 goes from $0.10 to $0.50 input and from $0.50 to $2.50 output for prompts over 100,000 tokens. The calculator applies these rules when you enter a long prompt.
Some prices change by date. Gemini 4 Argon doubles on 1 Dec 2026, to $4.00 input and $20.00 output. Gemini 3.8 Flash doubles on 1 Jan 2027, to $1.50 input and $7.50 output. The calculator moves to the new price on that day. OpenAI lists gpt-5.6-sol at a promotional price until 30 Nov 2026 and does not say what comes after.
DeepSeek charges by time of day, and the calculator uses its peak price. Off-peak rates are half. Off-peak covers weekends, Chinese public holidays and all weekday hours outside 01:00 to 04:00 and 06:00 to 10:00 UTC.
What the estimate leaves out
The calculator covers standard token prices. A real bill can also include these:
- Cache writes. OpenAI charges 1.25x the input price to write a prompt into its cache, Anthropic charges for 5-minute and 1-hour cache writes, and Google charges for cache storage by the hour.
- Batch discounts. OpenAI and Anthropic charge 50% of the standard price for batch jobs, and xAI takes 20% off grok-4.7 and grok-4.3.
- Tool calls. Built-in tools cost extra. OpenAI web search is $10 per 1,000 calls, and Google Search grounding on Gemini is $14 per 1,000 requests after 5,000 free a month.
- Faster tiers and regional processing. OpenAI charges 2x for Fast mode and adds 10% for data residency endpoints on models released since 5 Mar 2026.
When the real bill runs ahead of the estimate
An estimate assumes traffic stays the way you entered it. Real traffic does not. A retry loop, a leaked key or a prompt that grew tenfold shows up on the bill before anyone looks.
Costbrake reads what you actually spend on OpenAI, Anthropic, xAI, DeepSeek and Gemini through Google Cloud. Set a budget from your estimate and it alerts you at 50, 80 and 100 percent of it. It also alerts when an hour costs 3x your usual hour and at least $5 more. On Pro, most providers are checked every 5 minutes. Free checks hourly.
On Pro and Team, an admin can also put a brake on OpenAI, Anthropic or xAI spend, for example by setting an OpenAI project's spend limit to $0.01 or disabling an Anthropic or xAI API key, and lift it later. Nothing fires on its own. See pricing: Free covers 2 accounts, and Pro is $12 a month with a 14-day trial.
Questions and answers
How do I calculate the cost of an AI API call?
Multiply the input tokens by the input price and the output tokens by the output price, add them and divide by 1 million, since prices are per 1M tokens. For 2,000 input and 500 output tokens on Claude Sonnet 5.5 at $2 and $10 per 1M, that is $0.004 plus $0.005, or $0.009 a request.
Which AI API model is cheapest?
For 2,000 input and 500 output tokens per request, gpt-6-luna and Claude Haiku 5.5 tie at $0.00045 a request, or $13.50 a month at 1,000 requests a day. deepseek-flash costs $36.00 a month at peak rates and half that off-peak. The ranking changes with your mix of input and output tokens, so enter your own numbers.
Does the calculator include prompt caching?
Yes. Move the cached input slider to the share of your prompt that the provider serves from its cache, and those tokens are billed at the cached input price. At 50% cached, the default workload on gpt-6.1-sol drops from $270.00 to $213.00 a month. Cache write and storage fees are not included.
Are reasoning tokens included in the estimate?
Only if you add them to the output tokens. OpenAI, Anthropic and Google bill reasoning and thinking tokens as output, so a short answer can cost more than its visible text suggests. The usage field of a real response shows how many you used.
How current are these prices?
Every price was checked on 9 Nov 2026 on the provider's own pricing page, listed under sources. Announced changes are built in: Gemini 4 Argon doubles on 1 Dec 2026 and Gemini 3.8 Flash on 1 Jan 2027. If your bill shows a different rate, the provider's page wins.
How do I know when my real bill goes over the estimate?
Connect the provider to Costbrake and set a budget. It alerts you at 50, 80 and 100 percent of the budget, and when an hour costs 3x your usual hour and at least $5 more. The Free plan covers 2 accounts with hourly checks. See pricing for Pro.
Sources
Updated