Token Cost Calculator

Claude Token Cost Calculator

Cost per token and monthly estimates for Claude Opus, Sonnet, and Haiku — with the Anthropic API.

Last updated: 2026-10-27

1,000
2,000
400
1,000 × 2,000in + 400out = 2,000,000 input,400,000 output tokens

Estimated cost across 4 models

Anthropic Cheapest

Claude Haiku 4.5

$4.00/ month
$48.00 / year
Input
$2.00
Output
$2.00400,000 tokens
Input
$1.00 / 1M2,000,000 tokens
Output
$5.00 / 1M
Context window
200,000Last updated: 2026-10-20
Anthropic

Sonnet 5

$8.00/ month
$96.00 / year
Input
$4.00
Output
$4.00400,000 tokens
Input
$2.00 / 1M2,000,000 tokens
Output
$10.00 / 1M
Context window
1,000,000Last updated: 2026-10-20
Anthropic

Opus 5.5

$16.00/ month
$192 / year
Input
$8.00
Output
$8.00400,000 tokens
Input
$4.00 / 1M2,000,000 tokens
Output
$20.00 / 1M
Context window
1,000,000Last updated: 2026-10-20
Anthropic

Fable 5.1

$40.00/ month
$480 / year
Input
$20.00
Output
$20.00400,000 tokens
Input
$10.00 / 1M2,000,000 tokens
Output
$50.00 / 1M
Context window
1,000,000Last updated: 2026-10-20

Prices verified 2026-10-27. Source: official provider pricing pages. · Machine-readable: /api/prices.json

Quick takeaways
  • 1Output tokens usually cost 2.7× to 8.3× more than input — keeping replies short is the highest-leverage cost saver.
  • 2Prompt caching drops repeat-input cost by 75–98% depending on provider and model — Anthropic 90–98% off, OpenAI 90–95% off, Google 90–95% off, DeepSeek 97–98% off the standard input rate.
  • 3DeepSeek off-peak hours bill at 50% less than peak — schedule batch jobs accordingly.
  • 4Long-context surcharges are real: a model with a long-context band bills 2× input above the band threshold (from 200K tokens) — check the model card before sending a huge context.
Token Cost Calculator

Claude.ai subscription vs API

Claude Pro ($20/mo) and Claude Max ($200/mo) include generous usage caps that are usually cheaper than the API up to a break-even point. Beyond that point, the API — or a third-party router like OpenRouter — is the right choice.

Claude Pro · $20/mo

Break-even: ~2.86M input + 1.43M output per month

Below this combined usage the Pro plan is cheaper; above it the API starts winning.

Claude Max · $200/mo

Break-even: ~28.6M input + 14.3M output per month

For sustained heavy usage, Max covers you up to roughly the API equivalent of $200/mo.

Sample reference: 1M input + 500K output tokens via the API costs $7.00 / month (at current Sonnet 5 rates).

Token Cost Calculator

How to bring the bill down

  1. 1Use a smaller model for routing / classification — Claude Haiku 4.5 costs 10× less than Claude Fable 5.1, and GPT-6 luna 100× less than GPT-6 astra on output.
  2. 2Cache repeat prefixes (system prompts, tool schemas) — Anthropic cached reads run 90–98% below the standard input rate, depending on the model.
  3. 3Set max_tokens explicitly — output is the expensive side; capping it prevents runaway replies.
  4. 4Batch non-urgent jobs into DeepSeek off-peak hours, which bill at 50% less than peak for both input and output.
  5. 5Trim long context — a long-context band bills 2× input rate above its threshold (from 200K tokens); chunk documents that don’t need the rest.
Token Cost Calculator

Frequently asked questions

How much does Claude Sonnet 5 cost per million tokens?
Claude Sonnet 5 is $2 per 1M input tokens and $10 per 1M output tokens via the Anthropic API. With prompt caching, cached reads drop to $0.20 per 1M (90% off). The 5-minute cache write is $2.50 per 1M.
How much do 10,000 tokens cost in Claude?
10,000 input tokens on Claude Sonnet 5 cost $0.02 (2 cents). 10,000 output tokens cost $0.10 (10 cents). On Opus 5.5 the same is $0.04 input and $0.20 output; on Haiku 4.5 it’s $0.01 input and $0.05 output.
How many tokens does $5 get you in Claude?
$5 buys you roughly 2.5M input tokens on Claude Sonnet 5 (or 500K output tokens). On Haiku 4.5 the same $5 buys 5M input / 1M output tokens. On Opus 5.5 it’s 1.25M input / 250K output tokens.
How much is 200,000 tokens in Claude?
200,000 input tokens on Claude Sonnet 5 cost $0.40; on Opus 5.5 it’s $0.80; on Haiku 4.5 it’s $0.20. The same 200K output tokens cost $2 on Sonnet 5, $4 on Opus 5.5, and $1 on Haiku 4.5.
Is Claude Pro or Max cheaper than the API?
Up to a point, yes. Claude Pro ($20/mo) is cheaper than the API below roughly 2.86M input + 1.43M output tokens per month (Claude Sonnet 5 rates). Max ($200/mo) covers up to roughly 28.6M input + 14.3M output. Beyond those thresholds, the API wins on pure cost.
How does Claude prompt caching work?
Anthropic caches prompt prefixes for 5 minutes or 1 hour. A cached read costs 90% less than fresh input ($0.20 per 1M on Sonnet 5). Cache writes carry a premium: $2.50 per 1M for the 5-minute window on Sonnet 5, $1.25 (5-minute) and $2 (1-hour) per 1M on Haiku 4.5. Caching is the single biggest cost saver for repeat-system-prompt workloads.
Which Claude model is cheapest?
Claude Haiku 4.5 is the cheapest at $1 / $5 per 1M tokens. Sonnet 5 ($2 / $10) is the mid-tier and the sweet spot for most production work. Opus 5.5 ($4 / $20) is the flagship, and Fable 5.1 ($10 / $50) sits at the top of the line.
How accurate is this calculator?
Token counts are approximated (the Claude tokenizer is not bundled with this tool — counts use a CJK-aware character heuristic, accurate to within ~10% for English, ~5% for Chinese). Prices are sourced from claude.com/pricing and re-verified regularly. Always check the source link on each card before relying on a number for billing.
More calculators

Pick the right page for your use case

Token Cost Calculator

Compare prices across OpenAI, Claude, Gemini, DeepSeek, MiniMax, and Grok. Real tokenizer for OpenAI, accurate estimates for the rest.

Compare every LLM price →

OpenRouter Pricing Calculator

See what your tokens actually cost after the OpenRouter markup — and when going direct to the provider is cheaper.

Calculate OpenRouter markup →

DeepSeek API Pricing

V4-Pro and V4.1-Flash per-token rates, off-peak hours, and prompt-cache savings — compared to Claude, GPT, and Gemini.

View DeepSeek API pricing →

ChatGPT API Pricing

GPT-6 and GPT-5 per-token rates, Batch API 50% off, and prompt-cache savings — compared to Claude, Gemini, and DeepSeek.

View ChatGPT API pricing →

Gemini API Pricing

Google Gemini rates per 1M tokens — Gemini 4 Argon, Gemini 3.1 Pro, Gemini 3.8 Flash and the Flash-Lite tier — with the long-context band, the cache rate and the service tiers, priced against every other model.

View Gemini API pricing →

Grok API Pricing

xAI Grok rates per 1M tokens — Grok 4.7 with its long-context band and cached-input rate, plus the retired Grok 4 row — priced against every other model.

View Grok API pricing →

MiniMax API Pricing

MiniMax M3.1 Flash and M3 rates per 1M tokens — a flat rate, the priority lane, the long-context doubling and the cache rate — priced against every other model.

View MiniMax API pricing →

Kimi API Pricing

Moonshot Kimi rates per 1M tokens — K3.1 Pro, the Highspeed twin and the still-sold K3, with the million-token window and the separately billed cache writes.

View Kimi API pricing →