AI API token & prompt caching cost calculator
A bill is not a price per million tokens: it is your request count, the system prompt you re-send every time, how often that prompt hits the cache, and how much the model writes back. Enter those four things to price 19 models from OpenAI, Anthropic and Google on the same traffic — with cache writes, cache reads and the 50% batch tier where the vendor publishes them.
- Input tokens / month
- —
- Output tokens / month
- —
- Caching saves, cheapest model
- —
| Model | Monthly |
|---|
Caching break-even
Enter your volumes to see the hit rate at which caching starts to pay.
Every model in the calculator, at list price
USD per 1,000,000 tokens, standard tier before tax, read from the vendor's own page on December 4, 2026. Cache write is the short and long retention tier each vendor publishes; Gemini has no write charge on its implicit cache. Batch is exactly half on all three.
| Vendor | Model | Input | Output | Cache read | Cache write | Batch in / out | Notes |
|---|---|---|---|---|---|---|---|
| OpenAI | gpt-6.2-sol | $2.00 | $10.00 | $0.10 | $2.50 / $5.00 | $1.00 / $5.00 | Flagship. Long context $4 / $15 |
| OpenAI | gpt-6.2-astra | $8.00 | $40.00 | $0.40 | $10.00 / $20.00 | $4.00 / $20.00 | Most expensive current tier |
| OpenAI | gpt-6.1-terra | $1.00 | $5.00 | $0.05 | $1.25 / $2.50 | $0.50 / $2.50 | Half the flagship at the same multipliers |
| OpenAI | gpt-6-luna | $0.10 | $0.50 | $0.01 | $0.125 / $0.25 | $0.05 / $0.25 | Smallest OpenAI tier |
| OpenAI | gpt-5.4-mini | $0.75 | $4.50 | $0.075 | $0.9375* | $0.375 / $2.25 | *write price not listed; 1.25x applied |
| OpenAI | gpt-4.1 | $2.00 | $8.00 | $0.50 | $2.50* | $1.00 / $4.00 | Cached read is 25% of input |
| OpenAI | gpt-4o-mini | $0.15 | $0.60 | $0.075 | $0.1875* | $0.075 / $0.30 | Cached read is 50% of input |
| Anthropic | Claude Fable 5.2 | $8.00 | $40.00 | $0.20 | $10.00 / $16.00 | $4.00 / $20.00 | Cache hit 0.025x input; new tokenizer |
| Anthropic | Claude Opus 5.5 | $4.00 | $20.00 | $0.20 | $5.00 / $8.00 | $2.00 / $10.00 | Cache hit 0.05x input; new tokenizer |
| Anthropic | Claude Sonnet 5.5 | $2.00 | $10.00 | $0.10 | $2.50 / $4.00 | $1.00 / $5.00 | $2 / $10 is now the standard price |
| Anthropic | Claude Sonnet 4.6 | $3.00 | $15.00 | $0.30 | $3.75 / $6.00 | $1.50 / $7.50 | Old tokenizer, so no +30% |
| Anthropic | Claude Haiku 5.5 | $0.10 | $0.50 | $0.01 | $0.125 / $0.20 | $0.05 / $0.25 | Up to 100K-token prompts; $0.50 / $2.50 above |
| Anthropic | Claude Haiku 4.5 | $1.00 | $5.00 | $0.10 | $1.25 / $2.00 | $0.50 / $2.50 | Ten times Haiku 5.5 |
| Gemini 4 Carbon | $4.00 | $20.00 | $0.20 | none | $2.00 / $10.00 | Doubled on December 1, 2026; implicit cache only | |
| Gemini 4 Neon | $3.00 | $15.00 | $0.15 | none | $1.50 / $7.50 | 1M-token window | |
| Gemini 4 Hydrogen | $1.50 | $7.50 | $0.075 | none | $0.75 / $3.75 | Free tier available | |
| Gemini 3.8 Flash | $0.75 | $3.75 | $0.075 | none | $0.375 / $1.875 | Doubles January 1, 2027 | |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | $0.03 | none | $0.15 / $1.25 | 90% off cached reads | |
| Gemini 3.1 Flash-Lite | $0.25 | $1.50 | $0.025 | none | $0.125 / $0.75 | Previous Flash-Lite generation |
Long-retention writes: OpenAI 12 hours at 2.5x input, Anthropic 1 hour at 2x input. Anthropic's 5-minute write is 1.25x input on every model, and Gemini charges no write fee because its cache is implicit.
Four numbers decide an API bill
Every request is billed as two streams: the tokens it sends and the tokens it writes back. The input stream is bigger than people expect because the system prompt travels with every single call — a 3,600-token instruction block sent a million times is 3.6 billion input tokens, whether or not the model needed to read it again. The calculator multiplies your request count by both streams, so a change in request volume moves the bill linearly while a change in the output/input ratio moves it much faster: output is five times the input price on most of the models here, and eight times on Gemini 3.5 Flash-Lite.
Caching is a bet on repetition
A cache read costs 5% of input on GPT-6.2 Sol, GPT-6.1 Terra and Claude Sonnet 5.5, 10% on GPT-6 Luna, 2.5% on Claude Fable 5.2, and 10% on the Gemini 3 family. A cache write costs more than a fresh token: 125% of input on the short tier for OpenAI and Anthropic, 250% of input for OpenAI's 12-hour tier and 200% for Anthropic's one-hour tier. That asymmetry sets a break-even hit rate — 20.8% on GPT-6.2 Sol and Claude Sonnet 5.5, 21.7% on Claude Haiku 5.5 — and the result panel shows it for the model you are looking at. Traffic below that rate pays a premium for a cache it barely uses, which is the most common way a "caching optimisation" raises a bill.
Google takes the opposite approach: on Gemini 4 the cache is implicit, reads are 95% off and there is no write charge, so any hit rate above zero helps. That makes Gemini 4 the friendlier default for unpredictable traffic, and the two Claude cache tiers the better fit for a large prompt reused many times inside an hour.
Batch, and what it stacks with
Batch pricing is a flat 50% on all three vendors in exchange for asynchronous turnaround, up to 24 hours at Google. It stacks with caching: Anthropic states that the cache multipliers combine with the batch discount, and OpenAI's batch table lists cached input at half the standard cached price. A nightly re-scoring job over a fixed document therefore gets both discounts at once — which is why the checkbox in this calculator applies to every line, not just to input.
Two traps the headline price hides
The first is Claude's tokenizer. Anthropic documents that Claude 4.7 and later produce about 30% more tokens for the same text, so a prompt measured at 6,000 tokens against GPT-6.2 is roughly 7,800 tokens on Claude Sonnet 5.5. Comparing $2 / $10 to $2 / $10 without that factor understates Claude by a third; the calculator applies it by default and lets you switch it off.
The second is context length. Above 200K tokens Google bills Gemini 3.1 Pro at $4 / $18 and OpenAI moves to a long-context tier — $4 / $15 on GPT-6.2 Sol, double the short-context price. A single very long document per request can double the bill without changing the request count, which is why the input field measures tokens rather than pages.
API cost questions
Why is my bill higher than the price per million tokens suggests?
Because output tokens cost five times input on almost every current model, and because the system prompt is re-sent with every request. 300,000 requests carrying a 6,000-token input and a 700-token answer is 1.8 billion input tokens and 210 million output tokens a month — $5,700 on GPT-6.2 Sol at list price, not the few hundred dollars a headline rate implies.
Does prompt caching always save money?
No. A cache write costs more than a fresh input token — 1.25x on GPT-6.2 Sol and Claude Sonnet 5.5, 2x for Anthropic's one-hour cache — while a cache read costs far less. Caching only pays above a break-even hit rate: 20.8% on GPT-6.2 Sol and Claude Sonnet 5.5, 21.7% on Claude Haiku 5.5. Below that, the writes cost more than the reads save, and a page of unique text per request saves nothing at all.
How much does the batch API really cut?
Half, on all three vendors: OpenAI lists batch prices at exactly 50% of standard, Anthropic's Batch API applies a flat 50% discount to input and output, and Google's Batch API is 50% of the interactive price with a 24-hour target turnaround. The discounts stack with caching, so a batch job over a cached document gets both.
Which model is cheapest for a chat product in December 2026?
At the default volume — 300,000 requests, 6,000 input and 700 output tokens each, 60% of the input cacheable at an 80% hit rate — GPT-6 Luna at $0.10 / $0.50 comes to about $213 a month, Claude Haiku 5.5 to about $276 and Gemini 3.1 Flash-Lite to about $517. On the flagships the same traffic costs $4,166 on GPT-6.2 Sol, $5,416 on Claude Sonnet 5.5 with its newer tokenizer, and $7,253 on Gemini 4 Carbon after the December 1 doubling.
Why do Claude models need a token adjustment?
Anthropic's own pricing page states that Claude 4.7 and later use a new tokenizer that produces about 30% more tokens for the same text. A prompt that costs 6,000 tokens on GPT-6.2 or on Claude Sonnet 4.6 costs roughly 7,800 tokens on Claude Sonnet 5.5. The calculator applies that factor to the Claude 4.7-and-later models by default; switch it off to compare raw token prices only.
Do cached reads count against my rate limit?
Yes on all three. Caching reduces the price of the tokens, not the number of them: a cache read is still an input token for throughput and rate-limit accounting, and the vendor's minimum cacheable prefix still applies — 1,024 tokens on OpenAI's GPT-5.6-and-later models, 512 on the current Claude Sonnet, Opus, Haiku and Fable models, and 4,096 on Claude Haiku 4.5. Shorter prompts cannot be cached at all.
Keep the estimate honest as prices move
These rates changed four times in the last month: Gemini 4 doubled on December 1, Gemini 3.8 Flash doubles on January 1, Gemini 4 Argon stops being selectable on December 15, and Claude Sonnet's introductory price became permanent. Point a Make scenario at the three pricing pages and have it post a diff when a number moves, so your token budget is never a month behind the invoice.
Affiliate link: if you subscribe to Make through this link, AI Calc Lab may earn a commission at no extra cost to you. The calculator above is free and works without it.
Sources for this page
- OpenAI — API pricing: Standard tier table for gpt-6.2-sol, gpt-6.2-astra, gpt-6.1-terra, gpt-6-luna, gpt-5.4-mini, gpt-4.1 and gpt-4o-mini, including cached input, the 30-minute and 12-hour cache-write columns, long-context rates and the Batch table. Checked December 4, 2026.
- Anthropic — Claude pricing: model table for Claude Fable 5.2, Opus 5.5, Sonnet 5.5, Sonnet 4.6, Haiku 5.5 and Haiku 4.5, the cache multipliers (0.025x / 0.05x / 0.1x), the Batch API's 50% discount and the note on the newer tokenizer. Checked December 4, 2026.
- Google — Gemini Developer API pricing: Gemini 4 Carbon, 4 Neon, 4 Hydrogen, 3.8 Flash, 3.5 Flash-Lite and 3.1 Flash-Lite, the December 1 and January 1 price changes and the December 15 Argon retirement. Batch API (50%, 24-hour turnaround) and the optimisation page (95% off cached reads on Gemini 4, 90% on Gemini 3). Checked December 4, 2026.
- Cache rules — OpenAI prompt caching guide (1,024-token minimum on GPT-5.6 and later, 1.25x write for 30 minutes, 2.5x for 12 hours, reads at 0.1x or 0.05x) and Anthropic prompt caching (minimum cacheable length per model, 5-minute and 1-hour writes, what invalidates a cache). Checked December 4, 2026.