AI & TECHNOLOGY / NO. 010 FREE ONLINE TOOL

AI token cost
calculator.

Estimate what an AI API workload costs per request and per month. Separate uncached input, cache writes, cache reads and output, apply batch discounts, and see how much prompt caching saves.

01 / YOUR INPUTSUPDATES AS YOU TYPE

Loading inputs…

02 / YOUR RESULT LIVE

CALCULATED ANSWER
$720.00

$720.00 for 100,000 requests ($0.0072 each).

Per request
$0.0072
Per 1,000 requests
$7.20
Uncached input
$200.00
Cache writes
$0.00
Cache reads
$20.00
Output
$500.00
HOW IT WAS CALCULATEDrequests × (uncached × input + writes × write + reads × read + output × output price) ÷ 1,000,000
THE EXPLANATION / 01

Tokens in,
dollars out.

THE RULES WE USE
  • Cost = tokens × price per million tokens ÷ 1,000,000, calculated separately for each token type.
  • Input tokens are split into uncached input, cache writes and cache reads; these three must add up to no more than the total input.
  • Long prompts: Claude Haiku 5.5 over 100,000 prompt tokens and OpenAI models over 272,000 input tokens are billed entirely at their higher long-prompt prices. The calculator switches tiers automatically.
  • Batch processing is modelled at half price, as Anthropic publishes for its batch API. Any other multiplier (such as Anthropic’s 1.1× US-only inference) is applied on top.
  • Preset prices are a dated snapshot (7 November 2026) from each provider's pricing page, not a live feed. Choose “Custom prices” to enter your own.
  • Taxes, minimum charges, tool-use fees, cache-storage hours and free tiers are not included.

How is AI API cost calculated?

Providers price models per million tokens, with different rates for input (your prompt) and output (the model's reply). Output is usually several times more expensive. For a request with 1,000 uncached input tokens at $2 per million and 500 output tokens at $10 per million, the cost is 1,000 × 2 ÷ 1,000,000 + 500 × 10 ÷ 1,000,000 = $0.007. Multiply by your monthly request count for a budget.

per request = (uncached × input + cache writes × write + cache reads × read + output × output rate) ÷ 1,000,000
monthly     = per request × requests × (0.5 if batch) × other multiplier

How does prompt caching change the price?

When many requests share the same long prefix, such as a system prompt or a document, providers can cache it. Reading from the cache costs far less than normal input: 5% of the input price on Claude Opus 5.5, Claude Sonnet 5.5, gpt-6.1-sol and gpt-6.1-terra, 2.5% on Claude Fable 5.1, and 10% on Claude Haiku 5.5, gpt-6-luna, gpt-6-astra and Gemini 3.8 Flash. Writing to the cache costs more than plain input: 1.25× input for Anthropic’s 5-minute and OpenAI’s 30-minute caches, 2× for Anthropic’s 1-hour cache and 2.5× for OpenAI’s 12-hour cache. Google instead charges for cache storage by the hour. Caching therefore pays off only when a cached prefix is read again several times before it expires; the calculator compares your cost with and without caching and warns when caching costs more.

Published prices on 7 November 2026

Standard prices per million tokens (input / cache read / output): 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 $0.10 / $0.01 / $0.50 for prompts up to 100,000 tokens and $0.50 / $0.05 / $2.50 above that; gpt-6-astra $10 / $1 / $50; gpt-6.1-sol $2 / $0.10 / $10; gpt-6.1-terra $1 / $0.05 / $5; gpt-6-luna $0.10 / $0.01 / $0.50 (OpenAI prices are for inputs up to 272,000 tokens and rise above that); Gemini 3.8 Flash $0.75 / $0.075 / $3.75 until 31 December 2026, doubling from 1 January 2027.

Count tokens, not words

A token is a chunk of text; in English it is often about three-quarters of a word, but every model family has its own tokenizer, so the same text can produce noticeably different token counts on different models. For an accurate estimate, measure real requests with the provider's token counter or usage reports, and include reasoning or “thinking” tokens if the model bills them as output.

Keeping prices current

AI prices change often, sometimes with notice of future increases. Google's page, for example, lists higher Gemini 3.8 Flash rates from 1 January 2027. The preset prices here were checked on the providers' official pages on 7 November 2026 and the calculator warns when that snapshot is more than 45 days old. Always confirm on the provider's pricing page before committing to a budget.

WORKED EXAMPLES / 02EACH ONE IS CHECKED BY OUR TEST SUITE

Worked examples.

01

A support chatbot with caching

100,000 requests a month on Claude Sonnet 5.5. Each request has 3,000 input tokens, 2,000 of them read from cache, and 500 output tokens.

$720.00 a month ($0.0072 per request). Without caching it would be $1,100, so caching saves $380.

Load this example
02

Bulk classification in batch

1,000,000 short classification requests on Claude Haiku 5.5 via the batch API: 800 input and 20 output tokens each.

$45.00 in total.

Load this example
03

Long documents with cache writes

10,000 requests on Claude Opus 5.5 with 50,000 input tokens each: 40,000 cache reads, 5,000 cache writes and 5,000 uncached, plus 2,000 output tokens.

$930.00 ($0.093 per request).

Load this example
04

A high-volume small model

1,000,000 requests on OpenAI gpt-6-luna with 500 input and 200 output tokens each.

$150.00.

Load this example
05

Before and after a price change

50,000 requests on Gemini 3.8 Flash with 4,000 input and 1,000 output tokens each, at the rates listed through 31 December 2026.

$337.50. At the doubled rates Google lists from 1 January 2027, the same usage would cost $675.

Load this example
LIMITS / 03

What this calculator
does not do.

  • It is not a live price feed. Preset prices are a dated snapshot and may be out of date.
  • It does not count tokens in your text. Use the provider's tokenizer or usage reports for real counts.
  • It does not include taxes, minimum spend, free tiers, rate-limit tiers, tool or search fees, image/audio pricing, or hourly cache-storage charges.
  • Discounts negotiated with a provider are not included unless you enter them as rates or a multiplier.
QUESTIONS / 04SHORT ANSWERS

Common questions.

How much does 1 million tokens cost?

It depends on the model and token type. On 7 November 2026 standard input prices among the presets ranged from $0.10 (Claude Haiku 5.5, gpt-6-luna) to $10 (Claude Fable 5.1, gpt-6-astra) per million tokens, and output from $0.50 to $50. Some models charge more for very long prompts.

Does batch processing really halve the cost?

Anthropic publishes batch prices at half its standard prices, in exchange for asynchronous processing within 24 hours. Other providers run their own batch tiers; check their pricing pages before relying on a 50% saving.

What are cache reads and cache writes?

A cache write stores a reusable prompt prefix and costs more than normal input on Anthropic and OpenAI models. Cache reads reuse it later for 2.5–10% of the input price. Google charges hourly storage instead of a write fee.

Why does my bill differ from the estimate?

Real token counts vary per request, providers change prices, and some features are billed separately. Compare with your provider's usage dashboard.

Why is a long prompt so much more expensive on some models?

Claude Haiku 5.5 bills a whole request at five times its base prices once the prompt passes 100,000 tokens, counting cached tokens. OpenAI models charge about double for input above 272,000 tokens. Most other Anthropic models bill their full context window at one price.

SOURCES & METHOD / 05REVIEWED
  1. Anthropic — Claude API pricing — checked 7 Nov 2026
  2. OpenAI — API pricing — checked 7 Nov 2026
  3. Google — Gemini API pricing — checked 7 Nov 2026, including scheduled changes

Each token type is multiplied by its rate and summed; batch and other multipliers apply to the total. Preset rates were read from each provider's official pricing page on 7 November 2026 and independently re-checked the same day. Tests check every component, batch and multiplier stacking, caching savings, linearity in request count, and that cached plus written tokens cannot exceed total input.

Built and reviewed by CalculatorLab against the sources above; every worked example on this page is re-checked by our automated test suite before each release. How we build and check calculators. Found a problem? Tell us.