QUICK ANSWER
● Solo dev, light use (<10 hrs/week): Pro at $20/month — covers focused sessions comfortably
● Full-time daily use: Max 5x at $100/month — 5x quota, priority access, fewer rate-limit interruptions
● Multi-agent / heavy Opus use: Max 20x at $200/month — one developer saved 93% vs API billing ($800 vs $15,000 over 8 months)
● Teams: Team Premium at $100/seat for pooled admin + usage visibility
● CI/CD pipelines at scale: API directly — Sonnet 4.6 at $3/$15/M, Opus 4.8 at $5/$25/M + 50% Batch discount
Every Claude Code Plan - Full Breakdown
| Plan |
Monthly price |
Annual price |
Usage vs Pro |
Agent SDK credit |
| Free |
$0 |
— |
No Claude Code access |
— |
| Pro |
$20/month |
$17/month ($204/yr) |
1x baseline |
$20/month |
| Max 5x |
$100/month |
$85/month |
5x Pro quota |
$100/month |
| Max 20x |
$200/month |
$170/month |
20x Pro quota |
$200/month |
| Team Standard |
$25/seat/month |
$20/seat/month |
Shared pool |
Limited |
| Team Premium |
$100/seat/month |
$85/seat/month |
Max 5x per seat |
$100/month per seat |
| API (pay-per-token) |
No subscription |
— |
Unlimited scale |
Billed per token |
API Token Pricing - Every Model
| Model |
Input (per M tokens) |
Output (per M tokens) |
Cache read (per M) |
| Claude Haiku 4.5 |
$1.00 |
$5.00 |
$0.10 |
| Claude Sonnet 4.6 |
$3.00 |
$15.00 |
$0.30 |
| Claude Opus 4.8 |
$5.00 |
$25.00 |
$0.50 |
| Batch API (50% off) |
$0.50 - $2.50/M |
$2.50 - $12.50/M |
Half standard |
The Hidden Cost Nobody Talks About - The 5-Hour Session Window
This is the detail that surprises almost every new Claude Code user. Usage on Pro and Max plans is governed by a 5-hour rolling window plus weekly limits — not a simple monthly token bucket. On Pro and Max, Claude Code and Claude.ai chat draw from the same quota: one five-hour session limit plus weekly limits. Heavy chat use during the day leaves fewer Claude Code turns in the evening. The practical impact: if you run a long autonomous Claude Code session in the morning and use Claude.ai for chat work in the afternoon, both draw from the same pool.
Two tools to check your current usage at any time: run /usage or /status inside a Claude Code session. Do this before starting a long task — if you are near the window limit, the session will be interrupted partway through. Max plans have substantially higher per-window limits, which is the primary reason to upgrade beyond Pro.
The June 15 Agent SDK Change - What It Actually Means for Your Bill
From June 15, 2026, Agent SDK and headless claude -p usage bills against a separate API-rate credit pool: $20/month of credits on Pro, $100 on Max 5x, $200 on Max 20x. This is a separate pool from your interactive Claude Code quota — not additive to your session limits, but a separate meter for automated/headless usage specifically.
What counts as automated usage (Agent SDK credit pool):
- Claude Code GitHub Actions (CI/CD triggered runs)
- Headless
claude -p commands (non-interactive)
- Agent SDK API calls from your own applications
- Third-party integrations calling Claude Code programmatically
What does NOT count (stays on your session quota):
- Interactive terminal Claude Code sessions
- Claude.ai web and desktop chat
- Claude Code VS Code extension interactive use
Once your Agent SDK credit is exhausted, further automated usage bills at standard API rates with no rollover. For teams with heavy CI/CD usage, audit your automated pipeline token consumption before the end of the billing cycle to avoid surprise charges.
The Prompt Caching Math - Why Max Beats API for Heavy Users
Over 90% of tokens in heavy Claude Code sessions are cache reads. When you are working on a large project, Claude repeatedly reads your codebase context. On the API, cache reads still cost $0.50/MTok for Opus. On the Max plan, they are included in the flat rate.
This is why the subscription beats API billing at heavy use. One developer tracked 8 months of intensive Claude Code usage and found their peak month alone would have cost $5,623 at API rates — more than 4.5 years of the Max 5x subscription. The codebase context that Claude Code reads at the start of every task — your file structure, relevant source files, previous conversation — accumulates into enormous token counts that are all cache reads. Flat-rate subscriptions absorb this cost; API billing charges it at full rates.
Subscription vs API breakeven (Opus 4.8, heavy use)
API (pay-per-token)
$300-500/mo
Full-time Opus heavy use, before caching
Max 20x subscription
$200/mo
All cache reads included
Which Plan Is Right for You
Solo dev, focused sessions, <10 hours/week → Pro at $20/month
Solo developer, under 10 hours per week: Pro at $20. Upgrade to Max 5x only after consistently hitting limits for 2 weeks. Annual billing saves $36/year. Run /usage regularly to track where you stand before starting long sessions.
Daily use, regularly hitting Pro limits → Max 5x at $100/month
The clear signal to upgrade: if you hit rate limit interruptions more than once or twice per week, Max 5x will pay for itself in recovered productivity immediately. 5x quota means the same sessions that interrupted you on Pro complete without stops.
Multi-agent workflows, Opus-heavy, full-day sessions → Max 20x at $200/month
A 3-agent session for an hour can consume what a single-agent session consumes in a full day. Estimated API cost: $20-60+/day → $400-1,200+/month. Recommended plan: Max 20x at $200/month. At this usage level the subscription is 2-2.5x cheaper than API billing.
Team of 10, steady usage → Team Premium at $1,000/month total
10-person engineering team with steady usage: Team Premium at $1,000/month total. Governance and pooled admin beat 10 individual Max plans at $2,000. Team Standard ($25/seat) works for lighter users who need admin controls but do not need Max-level quotas.
Spiky or unpredictable usage / CI-heavy pipelines → API directly
For teams with very uneven usage — big sprints followed by quiet periods — API billing with a centralized workspace and spend limits avoids paying for unused flat-rate quota. Apply the 50% Batch API discount for non-time-sensitive CI tasks. Common pattern: Pro/Max subscription for interactive work + API key for CI batch jobs.
5 Ways to Reduce Your Claude Code Bill
1. Use annual billing — saves 20% on all plans ($36/year on Pro, $180 on Max 5x, $360 on Max 20x). Commit only after using the plan for at least one month.
2. Use Sonnet 4.6 not Opus 4.8 for routine tasks — Opus costs $5/$25/M vs Sonnet at $3/$15/M. Reserve Opus for the genuinely hard tasks where the quality difference matters. Many developers find Sonnet sufficient for 70% of their work.
3. Enable prompt caching — on the API, enable caching for your system prompt and large codebase context. Cache reads cost $0.50/M for Opus vs $5/M for full input. On a large project with frequent context reuse, caching can cut API costs 80%+.
4. Use Batch API for CI/CD — non-time-sensitive pipeline jobs (nightly test runs, documentation generation, code review passes) qualify for 50% Batch discount. Sonnet at $1.50/$7.50/M via Batch vs $3/$15/M standard.
5. Route routine tasks to Grok Build 0.1 — at $1/$2 per million tokens, Grok Build handles high-volume routine coding (test gen, docs, boilerplate) at 50x less cost than Opus. Use Claude Code for the hard 20% and Grok Build for the volume 80%. See our Grok Build vs Claude Code comparison.
Frequently Asked Questions
Is Claude Code free?
No. Claude Code requires at least a Pro subscription at $20/month or direct API access with paid credits. The free Claude.ai plan does not include Claude Code. Open-source maintainers may qualify for 6 months of Max 20x free — check Anthropic's open-source program page.
What's the difference between Max 5x and Max 20x?
Both include all Claude models and Claude Code. Max 5x gives 5x the Pro usage quota and $100/month Agent SDK credit. Max 20x gives 20x the Pro quota and $200/month Agent SDK credit. The 5-hour window limit also resets faster and allows more tokens per window on Max 20x. For single-agent daily use, Max 5x is usually sufficient. For multi-agent parallel workflows running most of the day, Max 20x pays for itself.
Why did my Claude Code bill spike after June 15?
The June 15, 2026 billing change moved automated Agent SDK usage (GitHub Actions, headless claude -p, third-party integrations) to a separate credit pool. If your automated pipelines exceeded the credit ($20 on Pro, $100 on Max 5x, $200 on Max 20x), the overage billed at API rates. Check your Anthropic billing dashboard and separate your interactive vs automated usage to understand which pool drove the spike.
How does Claude Code pricing compare to Cursor?
At entry level, both are $20/month. The key difference: Cursor's Pro includes $20 in monthly API credits for premium model requests, with unlimited Tab completions and Auto mode at no extra cost. Claude Code's Pro includes the full Claude Code terminal agent with session-based limits. For teams, Cursor Business is $40/seat vs Claude Code Team Premium at $100/seat. For the full comparison see our Cursor vs Claude Code vs Codex vs Windsurf comparison.