AI Cost Calculator
How much will your AI feature actually cost to run? Enter your usage below and see the price per day, month and year — before you write a line of code.
Share of input tokens served from cache (repeated system prompts and documents). Only shown when the selected model has a cached-input price.
Count your tokens first if you are not sure how many tokens your prompts use.
Your assumptions
Planning estimate — not a quote or a guarantee. Your real bill depends on your actual usage.
Check your inputs — this is unusually high. A monthly cost over $1,000,000 usually means a typo in tokens or requests.
Same workload, every model
The table below prices the exact usage above on every model, cheapest first. Switch models in the calculator and this table follows.
| Model | Input / 1M tokens | Output / 1M tokens | Cost / month |
|---|
AI API prices used by this calculator
Prices are in USD per 1,000,000 tokens. The calculator uses these prices exactly as shown.
| Provider | Model | Input / 1M tokens | Cached input / 1M tokens | Output / 1M tokens |
|---|---|---|---|---|
| OpenAI | GPT-6.2 Astra | $8.00 | $0.40 | $40.00 |
| OpenAI | GPT-6.2 Sol | $2.00 | $0.10 | $10.00 |
| OpenAI | GPT-6 Astra | $10.00 | $1.00 | $50.00 |
| Anthropic | Claude Opus 5.5 | $4.00 | $0.20 | $20.00 |
| Anthropic | Claude Sonnet 5.5 | $2.00 | $0.10 | $10.00 |
| Anthropic | Claude Haiku 5.5 | $0.10 | $0.01 | $0.50 |
| Gemini 4 Carbon | $2.00 | $0.10 | $10.00 | |
| Gemini 3.8 Flash | $0.75 | $0.075 | $3.75 | |
| xAI | Grok 4.7 | $2.00 | $0.50 | $6.00 |
| xAI | Grok 4.3 | $1.25 | $0.20 | $2.50 |
| DeepSeek | DeepSeek V4 Pro | $1.32 | $0.044 | $3.96 |
| DeepSeek | DeepSeek Flash | $0.30 | $0.006 | $1.20 |
| Mistral | Mistral Large 4 | $0.70 | $0.07 | $2.10 |
| Mistral | Mistral Small 4 | $0.15 | $0.015 | $0.60 |
Prices last updated: 22 November 2026. Source: provider pricing pages — OpenAI, Anthropic, Google, xAI, DeepSeek, Mistral. This page is updated monthly, not live — check the date above before you budget.
Notes: Claude Haiku 5.5 prices are for prompts up to 100,000 tokens; longer prompts cost $0.50 input and $2.50 output per 1M tokens. Gemini 4 Carbon costs $2.00 input and $10.00 output through 30 November 2026, then $4.00 and $20.00 from 1 December 2026. Gemini 3.8 Flash costs $0.75 input and $3.75 output through 31 December 2026, then $1.50 and $7.50 from 1 January 2027. DeepSeek prices are peak rates; off-peak hours are half price. Grok prices are for prompts under 200,000 tokens; longer prompts are billed at double rates.
How to work out what an AI API will cost
The maths is one line: tokens divided by 1,000,000, times the price. Input tokens and output tokens are priced separately, so work them out separately and add them together.
Take the calculator’s defaults on GPT-6.2 Astra — 1,000 input tokens and 500 output tokens per request, 100 requests a day, 30 days a month:
- Input per request. 1,000 ÷ 1,000,000 × $8.00 = $0.008.
- Output per request. 500 ÷ 1,000,000 × $40.00 = $0.02.
- Cost per request. $0.008 + $0.02 = $0.028.
- Cost per day. $0.028 × 100 requests = $2.80.
- Cost per month. $2.80 × 30 days = $84.00.
- Cost per year. $84.00 × 12 = $1,008.00.
Change any number above and the total moves with it. The two numbers that matter most are the tokens per request and the requests per day — if either one doubles, so does the bill. If you do not know how many tokens your prompts use, count them with the AI Token Counter before you estimate.
Why output tokens cost more than input tokens
Providers charge less for input (what you send) than output (what the model writes), because generating text costs more compute than reading it. On GPT-6.2 Astra, output costs five times as much as input per token — so a reply that runs long costs far more than the prompt that triggered it. Keeping answers short, and asking the model for a summary instead of a full rewrite, is usually the cheapest way to cut a bill.
What the calculator does not include
This calculator covers API token usage only. It does not include hosting, development or support costs. It does not include retries, longer outputs than you estimated, or extra calls such as embeddings and image generation. It uses standard rates — not batch discounts, priority processing, long-context surcharges or taxes. Treat the result as a planning estimate, not a quote: your provider’s invoice is the real number.
AI cost calculator FAQ
Why do prices differ between input and output tokens?
Providers charge less for input (what you send) than output (what the model writes), because generating text costs more compute than reading it.
Are these prices current?
The table is dated — check the “Prices last updated” line on the page. Providers change prices; this page is updated monthly, not live.
Does this include hosting or development costs?
No — API usage only. Servers, development and support are separate (the AI Chatbot Cost Calculator covers build costs).
What is cached input pricing?
Some providers charge less for input tokens that repeat a previous request (prompt caching). If the model you picked supports it, the calculator shows the field; otherwise it is hidden.
Why is my bill higher than this calculator says?
Usually retries, longer outputs than estimated, or extra calls (embeddings, image generation) that this calculator does not cover. Treat the result as a planning estimate, not a quote.