AI API cost calculator
Model APIs charge per million input and output tokens, with cheaper rates for cached prompt tokens. Enter how many tokens a typical request sends and receives, how much of the input is served from the prompt cache and how many requests you make a month. The calculator shows the cost per request, per 1,000 requests, per month and per year for the model you pick, and a table comparing every listed Claude, GPT and Gemini model for the same workload. Prices are copied from each provider’s official pricing page with the date shown, and you can edit any price.
Prices (US$ per million tokens)
Standard prices from the provider’s official page, checked November 24, 2026. Edit them if they have changed. Source
- Per request
- $0.009
- Per month
- $90.00
- Per year
- $1,080.00
- Per 1,000 requests
- $9.00
All models for this workload
| Model | Per request | Per month |
|---|---|---|
| Anthropic · Claude Haiku 5.5 | $0.00045 | $4.50 |
| OpenAI · gpt-6-luna | $0.00045 | $4.50 |
| Google · Gemini 3.5 Flash-Lite | $0.00185 | $18.50 |
| Google · Gemini 3.8 Flash | $0.003375 | $33.75 |
| OpenAI · gpt-5.4-mini | $0.00375 | $37.50 |
| OpenAI · gpt-6.1-terra | $0.0045 | $45.00 |
| Anthropic · Claude Sonnet 5.5 ✓ | $0.009 | $90.00 |
| Google · Gemini 4 Carbon | $0.009 | $90.00 |
| OpenAI · gpt-6.2-sol | $0.009 | $90.00 |
| Google · Gemini 4 Neon | $0.0135 | $135.00 |
| Anthropic · Claude Opus 5.5 | $0.018 | $180.00 |
| OpenAI · gpt-5.5 | $0.025 | $250.00 |
| Anthropic · Claude Fable 5.2 | $0.036 | $360.00 |
| OpenAI · gpt-6.2-astra | $0.036 | $360.00 |
Cheapest first. Quality, speed and limits differ between models.
How to use the AI API Cost Calculator
- 1
Describe a request
Input tokens, output tokens and the share of input that is cached.
- 2
Set your volume
Requests per month.
- 3
Pick a model
Check or edit its prices, then compare all models in the table.
How cost is calculated
Prices are in US dollars per million tokens. Cached input tokens are charged at the cache price where one is published. The comparison uses standard (non-batch) prices for short prompts.
- Cost = (fresh input × input price + cached input × cache price + output × output price) / 1,000,000
When to use it
- Budget a chatbot or AI feature before launch.
- Choose the cheapest model that meets your quality bar.
- See how much prompt caching saves.
Limits
- Prices change often; check the provider’s page before committing a budget.
- Batch discounts, long-context surcharges, tool use, images and audio are not included.
Privacy
All calculations run in your browser; nothing is sent anywhere.
Frequently asked questions
How current are the prices?
They were copied from the official pricing pages on the date shown under the price fields. Each model links to its source. Edit a price if it has changed.
Why is output more expensive than input?
Generating each output token needs a full pass through the model, while input tokens are processed in parallel, so providers charge several times more for output.
What is prompt caching?
If many requests start with the same long prefix, such as instructions or a document, providers can cache it and charge much less for those tokens on later requests.
How do I find my token counts?
API responses report input and output tokens. For planning, use the AI Token Counter on a typical prompt.
Does it include batch pricing?
No. Batch APIs are usually about half price for jobs that can wait; halve the result for a rough idea.
Are some prices temporary?
Yes. Models marked with a note have promotional or scheduled price changes announced on the provider’s page.
Related tools
People also use
- JWT Generator & SignerCreate and sign JSON Web Tokens with HMAC, RSA or ECDSA keys, entirely in your browser.
- Base64 Encoder & DecoderEncode and decode Base64 and Base64url, text or files.
- URL Encoder & DecoderPercent-encode or decode URLs and see their query parameters.
- CSV to JSON ConverterConvert CSV ⇄ JSON with correct quoting, types and nested data.
Last updated November 24, 2026 · How we build and test our tools