Claude Code pricing confuses people for one simple reason: there is no Claude Code price. The terminal-based coding agent is bundled with Claude subscriptions and also runs on pay-per-token API billing, so what you pay depends entirely on which door you walk through. This page lays out both paths with current 2026 numbers – flat plans, per-model token rates, and the crossover point where one becomes cheaper than the other.
How Claude Code pricing works: two ways to pay
Claude Code authenticates two ways, and each has its own billing model:
- Subscription login – sign in with a Claude Pro, Max, or Team account and Claude Code draws on that plan’s usage allowance. Flat monthly cost, no per-token metering, hard usage ceilings.
- API key – authenticate with an Anthropic API key and pay per token at the model’s rates. No usage wall, no monthly fee, and costs scale directly with how much the agent works.
Most individual developers should start on a subscription. The API path is for automation, CI pipelines, and teams metering usage centrally – or very light users who would not spend $20 of tokens in a month.

Claude Code subscription plans in 2026
| Plan | Price | Claude Code access |
|---|---|---|
| Free | $0 | Not included |
| Pro | $20/month ($17/mo annual) | Included – the cheapest way in |
| Max 5x | $100/month | Included, 5x Pro usage allowance |
| Max 20x | $200/month | Included, 20x Pro – for all-day agent work |
| Team Standard | $25/seat/month | Chat only – no Claude Code |
| Team Premium | $125/seat/month | Included – Claude Code for teams |
| Enterprise | Custom | Included, custom limits |
There is no separate Claude Code subscription and no per-seat Claude Code add-on for individuals – the tool itself is identical on every tier. What you buy with the higher tiers is usage headroom: agentic coding burns through allowances quickly because every file read, edit, and test run consumes tokens under the hood. Our full Claude pricing guide covers the chat-side tiers in more detail.
Claude Code API pricing: token rates by model
On API billing, Claude Code costs whatever the model it runs costs. Current per-million-token rates:
| Model | Input / 1M | Output / 1M | Notes |
|---|---|---|---|
| Claude Fable 5 | $10 | $50 | Top tier, 1M context window |
| Claude Opus 4.8 | $5 | $25 | Current flagship, Claude Code default tier |
| Claude Opus 4.7 | $5 | $25 | Previous flagship |
| Claude Sonnet 5 | $2 intro / $3 | $10 intro / $15 | Introductory rate through Aug 31, 2026 |
| Claude Sonnet 4.6 | $3 | $15 | Previous balanced tier |
| Claude Haiku 4.5 | $1 | $5 | Fast, cheap tier |
Two mechanics matter more than the sticker rates. First, prompt caching: Claude Code reuses your codebase context across turns, and cached input bills at roughly a tenth of the normal rate – automatically. Second, output-heavy workloads: agent sessions generate a lot of output tokens (code, diffs, reasoning), and output costs 5x input on every tier, which is why long Opus sessions add up fast.
Subscription or API: which is cheaper for you
- A few short sessions a month: API billing usually wins – you might spend $5-15 in tokens.
- Daily coding: Pro at $20 wins comfortably. One long day of Opus-level agent work can exceed $20 in raw token costs on its own.
- Heavy daily agent use: Max 5x or 20x – the flat rate acts as a cost ceiling that API billing simply does not have.
- CI, automation, and headless runs: API only – subscriptions are for humans in the loop, and per-token billing with a spend limit is the right control for machines.
How to keep Claude Code costs down
- Match the model to the task. Sonnet 5 at its introductory $2/$10 rate handles most day-to-day coding; save Opus for the hardest problems.
- Track spend with /cost. On API billing, the /cost command inside Claude Code shows the current session’s spend in real time.
- Let caching work. Long-running sessions in the same project reuse cached context; scattered one-off sessions re-pay for it.
- Set a spend limit on API billing. A monthly cap in the Anthropic console turns a runaway-agent risk into a bounded number.
Claude Code vs the alternatives on price
The head-to-head most developers run is Claude Code against Cursor: both anchor at $20 a month for their entry paid tier, and both charge $200 at the top ($200 Max 20x vs Cursor Ultra). The difference is philosophy – Claude Code is terminal-native and model-first, Cursor is IDE-native with a credit system. Our Cursor pricing breakdown covers that side, including its spend limits and overage mechanics. For what is changing on the model side – releases, deprecations, and price moves – the Claude updates hub tracks it monthly.
Our take
Claude Code pricing is genuinely simple once you see the two doors: subscriptions buy predictability, the API buys flexibility. Start with Pro at $20 – it is the cheapest way to find out how much you will actually use it. If you hit limits weekly, the upgrade to Max pays for itself in uninterrupted work. And if you are wiring Claude Code into automation, go straight to API billing with a spend limit and let per-token economics do their job.
How much does Claude Code cost?
Claude Code has no separate price – it is included with every paid Claude subscription. The cheapest way in is Claude Pro at $20 a month. Heavier users move to Max at $100 or $200 a month, teams use Premium seats at $125 per seat, and automation or CI workloads pay per token on the API instead.
Is the $20 Claude Code worth it?
For most individual developers, yes – Pro at $20 a month is the best value entry point and includes the same Claude Code tool the higher tiers use. The catch is the usage allowance: daily agentic coding sessions can hit Pro’s limits, at which point Max 5x at $100 becomes the practical tier.
Can you use Claude Code for free?
Not on the free Claude plan – Claude Code requires a paid subscription (Pro or above) or an API key with credits. If you only want to trial it, the $20 Pro month is the lowest-cost way, or a few dollars of API credit with pay-as-you-go billing.
Is it worth paying for Claude for coding?
If you code daily, the productivity case is strong: Claude Code runs multi-step tasks – reading a codebase, editing files, running tests – from a single instruction. The honest comparison is against your alternatives: Cursor Pro also costs $20 a month, so the real question is which workflow fits you, not which is cheaper.
Does Claude Code use API credits if I have a Pro subscription?
No. When you log in with a Pro, Max, or Team account, Claude Code draws on your subscription’s usage allowance, not per-token billing. API billing only applies when you authenticate with an API key instead – useful for CI pipelines and automation where a personal subscription does not fit.
Which models does Claude Code use?
Claude Code defaults to the current Opus-tier model (Opus 4.8) with the Claude 5 family available, and you can switch models per session. On the API side, cost then follows the model’s token rates – Opus 4.8 at $5/$25 per million tokens, Sonnet 5 at $2/$10 introductory pricing, Haiku 4.5 at $1/$5.
What happens when I hit my Claude Code usage limit?
On subscription plans, usage allowances reset on a rolling basis – you wait for the window to reset or upgrade a tier. Nothing is billed extra without your action. On the API, there is no usage wall; you simply keep paying per token, which is why runaway agent sessions are a cost risk on API billing but not on subscriptions.
Is Claude Max worth it for Claude Code?
Max 5x at $100 a month makes sense once you hit Pro’s limits more than a couple of times a week – it is cheaper than the interrupted workflow. Max 20x at $200 is for genuinely all-day agentic use. If you are unsure, upgrade one step at a time; you can change tiers monthly.
Is Claude Code cheaper on the API or a subscription?
Light users can be cheaper on the API – a few short sessions a month may cost under $20 in tokens. Daily users are almost always cheaper on a subscription, because agentic sessions consume a lot of tokens; a single long day of Opus-level agent work can exceed $20 in API costs on its own.
Does Claude Code pricing include prompt caching?
Yes – Claude Code uses prompt caching automatically, which serves repeated context at roughly a tenth of the normal input price on the API. It is one of the main reasons real-world API costs run lower than naive token math suggests, and it requires no configuration.











