AI APIs bill by the token, with separate prices for input, output and cached input. This calculator turns your text or token counts into an estimated cost per request and per month, so you can compare models before you build. Prices were checked against each provider’s official pricing page on 18 October 2026. They change often, so confirm on the provider page before you commit to a budget.
How do I use this tool?
- Paste your prompt to get an estimated token count, or type exact input and output token counts if you have them.
- Enter the expected output length and the share of input that is served from cache, if you use prompt caching.
- Enter requests per day. The tool multiplies by 30 for a monthly figure.
- Choose which providers to compare and whether to show older models. The table lists every matching model, sorted by monthly cost.
How is the cost worked out?
Cost per request = (uncached input tokens x input price + cached tokens x cached price + output tokens x output price) / 1,000,000. Prices are in US dollars per million tokens (MTok).
| Model | Input / MTok | Cached input / MTok | Output / MTok |
|---|---|---|---|
| Claude Fable 5.1 | $10 | $0.25 | $50 |
| Claude Opus 5.5 | $4 | $0.20 | $20 |
| Claude Sonnet 5.5 | $2 | $0.10 | $10 |
| Claude Haiku 5.5 (prompt up to 100k tokens) | $0.10 | $0.01 | $0.50 |
| GPT-6 Astra (up to 272k) | $10 | $1 | $50 |
| GPT-6.1 Sol (up to 272k) | $2 | $0.10 | $10 |
| GPT-6 Luna (up to 272k) | $0.10 | $0.01 | $0.50 |
| Gemini 4 Argon (until 30 Nov 2026) | $2 | $0.10 | $10 |
| Gemini 3.1 Pro Preview (up to 200k) | $2 | $0.20 | $12 |
| Gemini 3.8 Flash (until 31 Dec 2026) | $0.75 | $0.075 | $3.75 |
Sources: Anthropic pricing, OpenAI API pricing and Gemini API pricing. Some models switch to higher rates above a prompt length threshold, and two Gemini models have announced price rises; the calculator applies these automatically.
Worked example
A support bot sends 3,000 input tokens and gets 500 output tokens back, 1,000 times a day, on Claude Sonnet 5.5 with no caching.
- Input: 3,000 x $2 / 1,000,000 = $0.006
- Output: 500 x $10 / 1,000,000 = $0.005
- Per request: $0.011. Per day: $11. Per 30 days: about $330.
If you set the cached share to 75%, 2,250 of those input tokens are served from cache. Input drops to (750 x $2 + 2,250 x $0.10) / 1,000,000, which is $0.001725. Each request then costs $0.006725, and the monthly total falls to about $202 (cache write costs not included).
How accurate is the token estimate?
Text estimates are rough. OpenAI says 1 token is about 4 characters or 0.75 words of English text, and Google says the same 4 characters for Gemini. Anthropic says 1M tokens is roughly 2.5M characters on the tokenizer used by Claude Opus 4.7 and later, and that this tokenizer produces about 30% more tokens than older Claude models for the same text. So the calculator uses about 2.5 characters per token for current Claude models and about 4 for OpenAI and Gemini. For exact counts, use the provider tools: Anthropic’s free /v1/messages/count_tokens endpoint, OpenAI’s tokenizer or tiktoken, and Gemini’s countTokens.
Common mistakes
- Ignoring output tokens. Output often costs 5 times the input price or more, so long answers drive the bill.
- Forgetting thinking tokens. Reasoning output is billed as output; Google states this for Gemini.
- Reusing old token counts. Counts from older Claude models can be about 30% low on current ones.
- Leaving out conversation history. In a chat, every earlier turn is sent again as input.
- Treating cache as free. Writing to Anthropic’s cache costs more than normal input (1.25x for 5 minutes on current models).
Tips to cut cost
- Cache long, repeated prefixes such as system prompts and reference documents.
- Use the Batch API for work that can wait; Anthropic gives 50% off input and output.
- Route simple tasks to a small model and keep the large model for hard ones.
- Cap output length and ask for short formats.
These figures are estimates for planning only, not a quote. Taxes, regional pricing, data residency multipliers and tool fees are not included. If you are planning an AI feature or agent, see our AI automation service, or read what is Claude Code to see how coding agents use tokens.
Last updated: October 19, 2026