AI API cost calculator

The AI API cost calculator estimates a month of OpenAI or Anthropic API spend from your token counts, at each provider's list prices.

Prices checked Examples only

$2.00 input, $0.10 cached input, $10.00 output per 1M tokens.

Reused prompt prefixes billed at the cached input price.

Examples only, not a quote. Estimates use standard list prices checked October 27, 2026. Your bill depends on your contract, taxes, long context, cache writes, tools and any credits.

Estimated cost a month

$162.00

Estimated cost a year

$1,944.00

Uncached input
$60.00
Cached input
$2.00
Output
$100.00

Cost = uncached input tokens x input price + cached input tokens x cached input price + output tokens x output price, with prices per 1M tokens. Batch halves each price.

How is the estimate worked out?

Cost = uncached input tokens x input price + cached input tokens x cached input price + output tokens x output price, with prices per 1M tokens. Batch halves each price.

Model Input per 1M Output per 1M Example month
gpt-6-astra $10.00 $50.00 $200.00
gpt-6.1-sol $2.00 $10.00 $40.00
gpt-6.1-terra $1.00 $5.00 $20.00
gpt-6-sol $2.00 $10.00 $40.00
gpt-6-luna $0.10 $0.50 $2.00
gpt-5.6-sol $4.00 $20.00 $80.00
gpt-5.6-terra $2.00 $12.00 $44.00
gpt-5.6-luna $0.20 $1.20 $4.40
Claude Fable 5.1 $10.00 $50.00 $200.00
Claude Opus 5.5 $4.00 $20.00 $80.00
Claude Opus 5 $5.00 $25.00 $100.00
Claude Sonnet 5.5 $2.00 $10.00 $40.00
Claude Sonnet 5 $2.00 $10.00 $40.00
Claude Sonnet 4.6 $3.00 $15.00 $60.00
Claude Haiku 5.5, prompts up to 100K tokens $0.10 $0.50 $2.00
Claude Haiku 5.5, prompts over 100K tokens $0.50 $2.50 $10.00
Claude Haiku 4.5 $1.00 $5.00 $20.00
Example: 10M input tokens and 2M output tokens a month, no caching, standard processing. USD at list prices checked October 27, 2026.

Examples only, not a quote. Estimates use standard list prices checked October 27, 2026. Your bill depends on your contract, taxes, long context, cache writes, tools and any credits.

What does the estimate assume?

  • OpenAI prices are standard processing, short context (272K input tokens or fewer). Long context and Fast mode cost more.
  • For Anthropic, cached input uses the cache hit price. Cache writes cost 1.25x (5 minutes) or 2x (1 hour) base input and aren't included.
  • Batch halves input, cached input and output prices on both providers.
  • Taxes, data residency uplifts, tool charges and credits aren't included.

Questions

How accurate is the estimate?

It's an example at list prices, not a quote. Your provider's invoice is the final word, and contracts, taxes and credits change what you pay.

Why is cached input cheaper?

Both providers bill reused prompt prefixes at a lower rate. On Anthropic the cache hit price is 0.1x base input on most models and 0.05x on Claude Opus 5.5 and Claude Sonnet 5.5.

Does the Batch API halve the price?

Yes. OpenAI and Anthropic both list a 50% discount for batch requests. OpenAI batches complete within 24 hours, and Anthropic says most batches finish in less than 1 hour.

Where do the prices come from?

OpenAI's and Anthropic's own pricing pages, checked October 27, 2026. The OpenAI API pricing and Anthropic API pricing pages on this site list every rate with its source.

Where ernd fits

The ernd card is a charge card for US companies, with partners across the AI stack built in. Request your card.

Read next

Sources

ernd is run by Provenance Research Inc.

The ernd card

The ernd card is a charge card for US companies, with partners across the AI stack built in.

Request your card