Claude Code API cost calculator
Era of Minds is an independent site, not affiliated with Anthropic, OpenAI or Google. Estimates only, based on public pricing pages; confirm on the vendor's site before you buy.
Short answer
On the API, Claude Code costs what your tokens cost. Under $20 a month, pay-as-you-go beats Pro. Above $100 or $200, Max 5x or Max 20x is cheaper if its limits cover you.
Claude Code cost per month: API vs. Pro and Max
Every paid Claude plan includes Claude Code. Pro is $20 a month ($17 a month billed annually), Max 5x is $100 and Max 20x is $200. Claude Code draws from the same usage pool as your chats, and limits reset on a rolling five-hour window with weekly caps on top. The API has no plan limits in that sense: you pay for each token. Max plans also come with $100 or $200 a month in API credits for the Claude Platform.
How the Claude API token cost calculator works
- Uncached input = input tokens × (1 − cache-hit %) × input price
- Cached input = input tokens × cache-hit % × cache read price
- Output = output tokens × output price
- Monthly cost = (sum of the three ÷ 1,000,000) × sessions per day × working days
- Break-even sessions per day = plan price ÷ (cost per session × working days)
It leaves out cache write charges (1.25x input for 5-minute caching, 2x for 1-hour), web search fees, Batch discounts and the 1.1x US-only inference multiplier. Treat the result as a floor. Claude 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text, so measure real sessions in the Claude Console if you can.
Claude API pricing calculator data (per million tokens)
| Model | Input | Cache read | Output |
|---|---|---|---|
| Claude Opus 5.5 | $4 | $0.2 | $20 |
| Claude Sonnet 5.5 | $2 | $0.1 | $10 |
| Claude Haiku 5.5 (prompts up to 100K tokens) | $0.1 | $0.01 | $0.5 |
| Claude Haiku 5.5 (prompts over 100K tokens) | $0.5 | $0.05 | $2.5 |
| Claude Fable 5.1 | $10 | $0.25 | $50 |
| Claude Opus 5 | $5 | $0.5 | $25 |
| Claude Sonnet 5 | $2 | $0.2 | $10 |
| Claude Opus 4.8 | $5 | $0.5 | $25 |
| Claude Sonnet 4.6 | $3 | $0.3 | $15 |
| Claude Haiku 4.5 | $1 | $0.1 | $5 |
Standard global rates in USD. The same numbers live in /data/ai-pricing.json. Prices last checked 2026-10-12.
Sources we used
- Claude API pricing (Anthropic docs)
- Claude plans and pricing
- What is the Max plan? (Claude Help Center)
Is Claude Max worth it?
Look at the break-even column. If you run more sessions per day than the Max 5x figure, Max 5x costs less than the API. The catch is the usage limits: a plan is only a bargain if you rarely hit them. If you mostly use Claude Code a few times a week, paying per token is usually cheaper. Projects can also burn through usage faster, since each thread is its own session; we covered that in What is Claude Code Projects?
Related reading
- What is Claude Code Projects? How parallel coding threads work
- Claude Dashboards and Motion: Anthropic's live dashboards and animations
- Codex composer predictions: OpenAI's next-message suggestions
- Is ChatGPT Pro or Claude Max worth it? Plan calculator with ChatGPT, Claude and Gemini limits
FAQ: Claude Code API cost calculator
How much does Claude Code cost per month?
On a subscription it costs $20 a month for Pro, $100 for Max 5x or $200 for Max 20x, and Claude Code shares the plan's usage limits. On the API you pay per token. A developer running 4 Sonnet 5.5 sessions a day with 1.5M input tokens, 30K output tokens and 85% cache hits pays about $77 a month over 22 working days.
Is Claude Max worth it for Claude Code?
Claude Max is worth it when your API estimate is above $100 (Max 5x) or $200 (Max 20x) and you would otherwise hit Pro's limits. Max also includes $100 or $200 a month in API credits for the Claude Platform. If your estimate stays under $20, paying per token is cheaper than any plan.
How does this Claude API token cost calculator work?
It multiplies your monthly sessions by the cost of one session. Each session costs uncached input tokens at the model's input price, cached input at the cache read price, and output tokens at the output price, all per million tokens from Anthropic's pricing page.
What do Claude API prices look like right now?
As of 2026-10-12, Opus 5.5 is $4 input and $20 output per million tokens, Sonnet 5.5 is $2 and $10, and Haiku 5.5 is $0.10 and $0.50 for prompts up to 100K tokens. Cache reads on Opus 5.5 and Sonnet 5.5 cost 5% of the input price.
Why is my real Claude Code bill different from the estimate?
The calculator ignores cache write charges (1.25x input for 5-minute caching), web search fees and US-only inference (1.1x). Claude 4.7 and later models also use a tokenizer that produces about 30% more tokens for the same text, so check token counts in the Claude Console.