Claude Code pricing explained: plans, token costs, and limits (2026)
Claude Code has no free tier. Pro starts at $20/month with a 5-hour rolling window, Max gives 5x-20x more usage, and the API lets you skip the subscription entirely - here's the full breakdown.
TL;DR: Claude Code requires a paid plan: Pro at $20/month (5-hour rolling usage window), Max at $100/month (5x usage) or $200/month (20x), or direct API billing at $3-$5 per million input tokens with no subscription needed.
Claude Code has no free tier. The plan you choose determines how many tokens Claude can consume in a session and which models you get access to. Most guides list the prices but skip the mechanics - specifically how the rolling window and Max plan's dual weekly limits work in practice.
What plans include Claude Code access?
Three paths give you Claude Code access:
| Plan | Price | Usage | Models |
|---|---|---|---|
| Pro | $20/month ($17/mo annual) | Standard (5-hour rolling window) | Sonnet 4.6 |
| Max 5x | $100/month | 5x Pro per session | Sonnet 4.6 + Opus 4.8 |
| Max 20x | $200/month | 20x Pro per session | Sonnet 4.6 + Opus 4.8 |
| API | Pay per token | Unlimited (rate-limited) | Any available model |
Free plan users cannot run Claude Code - there is no free tier for it. The Team plan is a business product with a 5-seat minimum and custom billing; it includes Claude Code access at seat pricing.

How do Claude Code usage limits actually work?
Pro uses a 5-hour rolling window, not a daily cap. If you exhaust your allocation at 2:00 PM, you can send the next request at 7:00 PM. The window moves forward with each session, which means heavy morning use doesn't reset at midnight - it resets five hours from when you first hit the ceiling.
Anthropic does not publish the exact token count for the Pro window. In practice, it handles several focused Claude Code sessions per day at moderate codebase complexity before throttling.
Max plans have two separate weekly caps that many users miss. According to the Max plan help article: "Max plans also have two weekly usage limits: one that applies across all models and another for Sonnet models only." Both limits reset seven days from when your session starts - not on Monday, not on a calendar date. Hitting the Sonnet-only cap means Opus is still available, and vice versa. This two-cap structure is the main source of confusion when Max users feel they ran out earlier than expected.
What does Claude Code cost on the API?
The Anthropic API route bypasses the subscription system entirely. You connect Claude Code to your own API key (set ANTHROPIC_API_KEY) and pay per token consumed. Current API pricing from the Anthropic pricing docs:
| Model | Input | Output | Batch (50% off) |
|---|---|---|---|
| Opus 4.8 / 4.7 / 4.6 | $5 / MTok | $25 / MTok | $2.50 / $12.50 |
| Sonnet 4.6 | $3 / MTok | $15 / MTok | $1.50 / $7.50 |
| Haiku 4.5 | $1 / MTok | $5 / MTok | $0.50 / $2.50 |
MTok = one million tokens. A typical Claude Code session editing a few files consumes 20,000-80,000 tokens depending on the codebase size and task complexity, putting per-session API cost at $0.06-$1.20 on Sonnet. Heavy all-day use can push past $20/month in API costs, making the Pro subscription cheaper at that volume.
Prompt caching significantly reduces API costs for Claude Code because the system prompt and file context repeat across calls. The first write to a 5-minute cache costs 1.25x the base input rate; subsequent reads within the window cost 0.1x. For a large codebase loaded at the start of a session, caching can cut total token cost 60-80%.
Which plan is right for your usage pattern?
The choice comes down to volume and model preference:
- Occasional use (1-2 hours/day): Pro at $20/month is sufficient. The rolling window rarely triggers for light workloads.
- Half-day developer use: Max 5x at $100/month. The 5x ceiling comfortably handles a standard workday of coding tasks on a medium codebase.
- Full-time or large codebase: Max 20x at $200/month, or API with prompt caching enabled.
- CI/CD or scripted workflows: API only. Subscriptions are per-user interactive products; automated pipelines must use an API key.
For a detailed model-to-model breakdown of what Claude Code can do compared to other AI coding tools, see Cursor vs Claude Code in 2026 and Codex vs Claude Code: OpenAI and Anthropic Coding Agents Compared.
FAQ
How much does Claude Code cost per month?
The minimum subscription cost for Claude Code is $20/month (Pro). Max plans are $100/month (5x usage) and $200/month (20x usage). API usage has no monthly fee - you pay per token consumed, starting at $1/MTok input on Haiku 4.5 up to $5/MTok on Opus.
Is there a free version of Claude Code?
No. Claude Code requires a paid Pro, Max, or Team plan, or an Anthropic API key with a funded account. The Free plan does not include Claude Code access.
What does "5x usage" on Max 5x actually mean?
Max 5x gives 5 times more usage per session than the Pro rolling window. Anthropic does not publish the raw token count for either plan. In practice, Max 5x handles a full workday of continuous Claude Code use on large codebases without throttling under normal conditions.
How does the 5-hour rolling window work on Claude Code Pro?
The window moves forward continuously rather than resetting at midnight. If you reach your limit at 2:00 PM, the earliest you can send the next request is 7:00 PM. Heavy use in the morning does not free up capacity at midnight - the timer starts from when you first hit the ceiling.
Should I use the API or a subscription plan for Claude Code?
Use the API if you run automated workflows, CI/CD pipelines, or scripted tasks - subscriptions are per-user and not designed for machine use. Use a subscription if you're doing interactive development; Pro at $20/month is cheaper than API costs once you exceed a few focused coding hours per day. Enable prompt caching on the API to cut costs 60-80% on sessions that repeatedly load the same files.
What happens when I hit my Claude Code usage limit?
On Pro, Claude Code stops responding and tells you when the 5-hour window resets. On Max, you may hit either the all-models weekly cap or the Sonnet-specific cap. Hitting the Sonnet cap does not affect Opus availability, and vice versa. Both reset seven days from when your current session started.