AI API cost calculator: OpenAI, Anthropic and Google
Tokens per request times requests per month, priced for nine OpenAI, Anthropic and Google models at the per-million-token rates on their own pricing pages.
Estimate your monthly bill
Result
Cost per request = (input tokens × input price + output tokens × output price) ÷ 1,000,000. Prices are per million tokens on each provider's standard rates. Models are listed by provider, not ranked; they are not equally capable.
| Model | Input / 1M | Output / 1M | Per request | Per month |
|---|---|---|---|---|
| OpenAI: GPT-6.2 Astra | $8.00 | $40.00 | $0.036 | $360.00 |
| OpenAI: GPT-6.2 Sol | $2.00 | $10.00 | $0.009 | $90.00 |
| OpenAI: GPT-6 Luna | $0.10 | $0.50 | $0.00045 | $4.50 |
| Anthropic: Claude Fable 5.2 | $8.00 | $40.00 | $0.036 | $360.00 |
| Anthropic: Claude Sonnet 5.5 | $2.00 | $10.00 | $0.009 | $90.00 |
| Anthropic: Claude Haiku 5.5 | $0.10 | $0.50 | $0.00045 | $4.50 |
| Google: Gemini 4 Carbon From 1 Dec 2026 the page states $4.00 in / $20.00 out. | $2.00 | $10.00 | $0.009 | $90.00 |
| Google: Gemini 4 Hydrogen | $1.50 | $7.50 | $0.00675 | $67.50 |
| Google: Gemini 3.5 Flash-Lite | $0.30 | $2.50 | $0.00185 | $18.50 |
How it is calculated
- Cost per request = (input tokens × input price per 1M + output tokens × output price per 1M) ÷ 1,000,000.
- Cost per month = cost per request × requests per month.
- Where a page states a different price from a later date (Gemini 4 Carbon), the price in force today is used and the later one is shown beside the model.
Worked example: 2,000 input and 500 output tokens on a model priced $8 in and $40 out per million is (2,000 × $8 + 500 × $40) ÷ 1,000,000 = $0.036 a request, or $360 for 10,000 requests a month. Rates are for standard processing. Left out: prompt caching, batch and flex discounts, requests above each provider's long-context threshold (so input is limited to 100,000 tokens per request), data residency uplifts, tool and search-grounding charges, and taxes.
Rates used
| Model | Input / 1M | Output / 1M | Basis and source |
|---|---|---|---|
| OpenAI: GPT-6.2 Astra | $8 | $40 | Standard processing, short context (up to 272K input tokens), per 1M tokens. “Standard pricing data: gpt-6.2-astra | $8.00 | $40.00 (Short context input | Short context output)” developers.openai.com/api/docs/pricing · read |
| OpenAI: GPT-6.2 Sol | $2 | $10 | Standard processing, short context (up to 272K input tokens), per 1M tokens. “Standard pricing data: gpt-6.2-sol | $2.00 | $10.00 (Short context input | Short context output)” developers.openai.com/api/docs/pricing · read |
| OpenAI: GPT-6 Luna | $0.10 | $0.50 | Standard processing, short context (up to 272K input tokens), per 1M tokens. “Standard pricing data: gpt-6-luna | $0.10 | $0.50 (Short context input | Short context output)” developers.openai.com/api/docs/pricing · read |
| Anthropic: Claude Fable 5.2 | $8 | $40 | Base input and output tokens, per 1M tokens (MTok). “Claude Fable 5.2 | $8 / MTok (Base input tokens) ... $40 / MTok (Output tokens)” platform.claude.com/docs/en/about-claude/pricing · read |
| Anthropic: Claude Sonnet 5.5 | $2 | $10 | Base input and output tokens, per 1M tokens (MTok). “Claude Sonnet 5.5 | $2 / MTok (Base input tokens) ... $10 / MTok (Output tokens)” platform.claude.com/docs/en/about-claude/pricing · read |
| Anthropic: Claude Haiku 5.5 | $0.10 | $0.50 | Base input and output tokens, per 1M tokens (MTok); prompts up to 100,000 tokens. “Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.10 / MTok (Base input tokens) ... $0.50 / MTok (Output tokens)” platform.claude.com/docs/en/about-claude/pricing · read |
| Google: Gemini 4 Carbon | $2 | $10 | Standard, paid tier, per 1M tokens in USD (output includes thinking tokens). From 1 Dec 2026: $4 in, $20 out. “Gemini 4 Carbon, Standard, Input price: $2.00 through November 30, 2026. $4.00 starting December 1, 2026.” ai.google.dev/gemini-api/docs/pricing · read |
| Google: Gemini 4 Hydrogen | $1.50 | $7.50 | Standard, paid tier, per 1M tokens in USD (output includes thinking tokens). “Gemini 4 Hydrogen, Standard, Input price: Free of charge (Free tier) | $1.50 (Paid tier)” ai.google.dev/gemini-api/docs/pricing · read |
| Google: Gemini 3.5 Flash-Lite | $0.30 | $2.50 | Standard, paid tier, per 1M tokens in USD (output includes thinking tokens). “Gemini 3.5 Flash-Lite, Standard, Input price: Free of charge (Free tier) | $0.30 (text / image / video / audio) (Paid tier)” ai.google.dev/gemini-api/docs/pricing · read |
Rates recorded on from developers.openai.com/api/docs/pricing, platform.claude.com/docs/en/about-claude/pricing, ai.google.dev/gemini-api/docs/pricing. Provider prices change; confirm the live figure on the provider's page before you decide.
Questions
How are these models priced?
By tokens, separately for what you send (input) and what the model returns (output), quoted per million tokens. Output tokens cost several times more than input tokens on every model here, so a short prompt with a long answer can cost more than a long prompt with a short answer. On Google's models, thinking tokens count as output.
Why do the same words give different token counts on different providers?
Each provider counts tokens with its own tokenizer. Anthropic's pricing page says Claude 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text than earlier Claude models. Enter the token counts the provider's own usage report or token-counting tool gives you, not a single count reused for every model.
What does this calculator not include?
Prompt caching, batch processing and flex tiers, which the providers' pages price at a discount, requests above a model's long-context threshold (OpenAI lists one at 272K input tokens, and Anthropic prices Claude Haiku 5.5 higher above 100,000 prompt tokens), regional processing uplifts (Anthropic states 1.1x for US-only inference, OpenAI a 10% uplift for regional endpoints), tool charges such as Google Search grounding, and models not listed. Confirm the live price on each pricing page before you commit.