# Claude Code cost calculator

See what your Claude Code use costs on the API each month, and whether Pro ($20), Max 5x ($100) or Max 20x ($200) is cheaper. Paste your token counts from /usage or ccusage, or start from an estimate. It runs in your browser and stores nothing.

Use the tool: https://agentshandbook.com/tools/claude-code-cost-calculator (runs in the browser).

## How to use it

1. **Add your usage.** Paste the Usage by model lines from /usage in Claude Code, or the JSON from ccusage monthly --json. No numbers yet? Pick an estimate and the days you code each month.
2. **Set the model mix.** Say how your tokens split across Opus, Sonnet, Haiku and Fable. Pasted numbers keep their own split per model.
3. **Read the verdict.** Compare the monthly API cost with each plan and check the break-even line. The price table shows the date we checked Anthropic's prices.

## Questions

### Is Claude Max worth it for Claude Code?

Max is worth it when the same work would cost more than its price on the API: $100 a month for Max 5x, $200 for Max 20x. Anthropic's Claude Code docs put the average API cost at about $13 per developer per active day, or $150 to $250 a month, so a full-time user often passes $100. Paste your own numbers above to check. Each plan also has session and weekly limits, and Anthropic does not publish them as token counts.

### How much does Claude Code cost?

Claude Code is included in every paid Claude plan: Pro at $20 a month ($17 a month with $200 billed yearly), Max 5x at $100 and Max 20x at $200. With an API key you pay per token instead. On Opus 5.5 that is $4 per million input tokens, $20 per million output tokens and $0.20 per million tokens read from cache.

### Is the API cheaper than a Max plan for Claude Code?

The API is cheaper while your monthly token cost stays under the plan price. Under $20 a month, pay as you go wins. Over $100 a month, Max 5x costs less for the same work as long as you stay inside its limits. Cache reads are about 94% of the tokens in Anthropic's own /usage example, so the cache read price drives most of the bill.

### What is the difference between Max 5x and Max 20x?

Max 5x costs $100 a month and gives five times Pro's usage per five-hour session. Max 20x costs $200 a month and gives 20 times. Both reset the session limit every five hours and add a weekly limit across all models. Both include Claude Code, and Anthropic's plan table lets Fable use up to half of the weekly limit on both.

### How do I see how many tokens Claude Code uses?

Run /usage in Claude Code. The Session block lists input, output, cache read and cache write tokens for each model, and you can paste those lines into this calculator. For a whole month, the open source ccusage tool reads your local Claude Code logs: run bunx ccusage monthly --json and paste the output.

### What happens when I hit my Claude plan limit?

Claude Code pauses until the limit resets, unless you turn on usage credits. Usage credits let you keep working at standard API rates. The session limit resets every five hours, and paid plans also have a weekly limit.

### Does Claude Pro include Fable?

Pro runs Fable on usage credits at API rates, so this calculator adds your Fable cost to the Pro price. Max 5x and Max 20x include Fable for up to 50% of the weekly limit, per Anthropic's plan table. Fable 5.1 costs $10 per million input tokens and $50 per million output tokens on the API.

## Sources

- [Claude API pricing (Anthropic docs)](https://platform.claude.com/docs/en/about-claude/pricing) (checked 2026-10-30)
- [Claude plans and pricing](https://claude.com/pricing) (checked 2026-10-30)
- [What is the Max plan? (Claude Help Center)](https://support.claude.com/en/articles/11049741-what-is-the-max-plan) (checked 2026-10-30)
- [Claude Code: manage costs effectively](https://code.claude.com/docs/en/costs) (checked 2026-10-30)
- [Claude Code: how Claude Code uses prompt caching](https://code.claude.com/docs/en/prompt-caching) (checked 2026-10-30)
- [ccusage: JSON output](https://ccusage.com/guide/json-output) (checked 2026-10-30)

## Related playbooks

- [Run a weekly SEO agent that checks your site and opens fixes for you to review](https://agentshandbook.com/p/run-a-weekly-seo-agent-that-proposes-fixes.md)
- [Turn small tracker issues into reviewed pull requests with cloud coding agents](https://agentshandbook.com/p/turn-issues-into-pull-requests-with-cloud-agents.md)
- [Run a deep research report and check that every citation supports its claim](https://agentshandbook.com/p/run-a-deep-research-report-and-verify-its-citations.md)

## Lessons

- [Sales agents drift from their rules unless someone keeps sampling the output](https://agentshandbook.com/lessons/agent-quality-drifts-without-sampling.md)

More free tools: https://agentshandbook.com/tools.md