API cost · prices checked December 4, 2026

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.

19 models · 3 vendors Cache write, read and batch included No sign-up · runs in your browser

Your traffic and prompt shape

Defaults: a chat or agent product at 300,000 requests a month, a 6,000-token input and a 700-token answer, with 60% of the input a fixed system prompt.

K requests
tokens
tokens

Chat answers usually run at 10 to 20% of input. Agent and coding traffic often writes more than it reads.

% of input

The part that is identical across requests: system prompt, tool definitions, a fixed document, a code repository. It must clear the vendor's minimum — 1,024 tokens on OpenAI's GPT-5.6-and-later models, 512 on the current Claude Sonnet, Opus, Haiku and Fable models, 4,096 on Claude Haiku 4.5.

% hit

Low-miss traffic inside the retention window runs 80 to 95%. Anything above the break-even rate shown under the result saves money; below it, the write premium loses money.

OpenAI prices 30-minute and 12-hour retention; Anthropic prices 5-minute and 1-hour. Google's implicit cache reads are the same either way and carry no write charge.

All three vendors price batch work at half rate for a slower, asynchronous turnaround (24 hours at Google). Right for backfills and nightly evals, wrong for anything a user waits on.

Anthropic documents that Claude 4.7 and later produce about 30% more tokens for the same text than earlier models. Switch it off to compare the raw per-token prices side by side.

Full price table

      
Cheapest monthly bill
—
—
✓ —
Input tokens / month
—
Output tokens / month
—
Caching saves, cheapest model
—
ModelMonthly
— Official vendor prices, Dec 4 2026 · USD per 1M tokens

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.

Standard prices · checked December 4, 2026 · USD per 1M tokens
VendorModel InputOutput Cache readCache write Batch in / outNotes
OpenAIgpt-6.2-sol$2.00$10.00$0.10$2.50 / $5.00$1.00 / $5.00Flagship. Long context $4 / $15
OpenAIgpt-6.2-astra$8.00$40.00$0.40$10.00 / $20.00$4.00 / $20.00Most expensive current tier
OpenAIgpt-6.1-terra$1.00$5.00$0.05$1.25 / $2.50$0.50 / $2.50Half the flagship at the same multipliers
OpenAIgpt-6-luna$0.10$0.50$0.01$0.125 / $0.25$0.05 / $0.25Smallest OpenAI tier
OpenAIgpt-5.4-mini$0.75$4.50$0.075$0.9375*$0.375 / $2.25*write price not listed; 1.25x applied
OpenAIgpt-4.1$2.00$8.00$0.50$2.50*$1.00 / $4.00Cached read is 25% of input
OpenAIgpt-4o-mini$0.15$0.60$0.075$0.1875*$0.075 / $0.30Cached read is 50% of input
AnthropicClaude Fable 5.2$8.00$40.00$0.20$10.00 / $16.00$4.00 / $20.00Cache hit 0.025x input; new tokenizer
AnthropicClaude Opus 5.5$4.00$20.00$0.20$5.00 / $8.00$2.00 / $10.00Cache hit 0.05x input; new tokenizer
AnthropicClaude Sonnet 5.5$2.00$10.00$0.10$2.50 / $4.00$1.00 / $5.00$2 / $10 is now the standard price
AnthropicClaude Sonnet 4.6$3.00$15.00$0.30$3.75 / $6.00$1.50 / $7.50Old tokenizer, so no +30%
AnthropicClaude Haiku 5.5$0.10$0.50$0.01$0.125 / $0.20$0.05 / $0.25Up to 100K-token prompts; $0.50 / $2.50 above
AnthropicClaude Haiku 4.5$1.00$5.00$0.10$1.25 / $2.00$0.50 / $2.50Ten times Haiku 5.5
GoogleGemini 4 Carbon$4.00$20.00$0.20none$2.00 / $10.00Doubled on December 1, 2026; implicit cache only
GoogleGemini 4 Neon$3.00$15.00$0.15none$1.50 / $7.501M-token window
GoogleGemini 4 Hydrogen$1.50$7.50$0.075none$0.75 / $3.75Free tier available
GoogleGemini 3.8 Flash$0.75$3.75$0.075none$0.375 / $1.875Doubles January 1, 2027
GoogleGemini 3.5 Flash-Lite$0.30$2.50$0.03none$0.15 / $1.2590% off cached reads
GoogleGemini 3.1 Flash-Lite$0.25$1.50$0.025none$0.125 / $0.75Previous 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