Claude API Cost Calculator

3 min read

Estimate what a Claude API workload will cost. Pick a current model, enter how many input and output tokens you expect, and optionally account for prompt caching (up to 90% off cached input) and the Batch API (50% off). All maths runs in your browser — nothing is sent anywhere.

$4.00

Cached input is billed at ~10% of the input price (a 90% saving). Batch applies 50% off both directions. Sonnet 5’s $2 / $10 is introductory through 31 Aug 2026 (then $3 / $15).

Current Claude API prices

ModelInput /MtokOutput /MtokContextMax output
Claude Fable 5$10$501,000,000128,000
Claude Opus 4.8$5$251,000,000128,000
Claude Sonnet 5$2* (→ $3)$10* (→ $15)1,000,000128,000
Claude Haiku 4.5$1$5200,00064,000
Per million tokens. *Sonnet 5 introductory pricing through 31 Aug 2026, then $3 / $15. Source: platform.claude.com.

How the estimate works

  • Base cost = (input tokens ÷ 1M × input price) + (output tokens ÷ 1M × output price).
  • Prompt caching: the cached share of input is billed at ~10% of the input price (up to 90% off cached input).
  • Batch API: applies a flat 50% discount to both input and output for asynchronous jobs.
  • Estimates are pre-tax and exclude any plan credits or negotiated rates.

For plan (subscription) pricing rather than per-token API costs, see our Claude pricing guide. For model selection, see the current Claude models reference and the Claude API guide. Official pricing: platform.claude.com/pricing.

Prices verified: 2026-07-13. Independent guide — not affiliated with Anthropic.