Claude Code pricing comes down to one choice: a flat Claude plan or per-token API billing. Pro includes it at $20 a month, Max costs $100 or $200 for 5x or 20x Pro usage, and an API key bills every token. The free Claude plan does not include Claude Code at all.
How much does Claude Code cost? Claude Code pricing by plan
Claude Code comes with the Pro, Max, Team and Enterprise plans: Pro at $20 a month, or $17 a month billed annually, and Max at $100 for 5x Pro usage or $200 for 20x. The free plan does not include it, and an API key replaces the plan fee with per-token billing.
Each Claude Code plan below carries its price, its billing interval and its usage against Pro, as Anthropic’s pricing page and its Help Center listed them on 2026-10-05.
| Plan | Price and billing | Claude Code | Usage per session against Pro | Checked |
|---|---|---|---|---|
| Free | $0 | Not included | Less: Pro gives more usage per session than Free | 2026-10-05 |
| Pro | $20 a month billed monthly, or $17 a month billed annually ($200 up front) | Included | 1x (the baseline) | 2026-10-05 |
| Max 5x | $100 a month, monthly only | Included | 5x | 2026-10-05 |
| Max 20x | $200 a month, monthly only | Included | 20x | 2026-10-05 |
| Team, Standard seat | $25 a seat a month billed monthly, $20 billed annually | Included | 1.25x | 2026-10-05 |
| Team, Premium seat | $125 a seat a month billed monthly, $100 billed annually | Included | 6.25x | 2026-10-05 |
| Enterprise | $20 a seat a month billed annually, plus usage at API rates | Included | Usage billed at API rates | 2026-10-05 |
| API key (Console account) | No plan fee; every token at the model’s rate | Usable | Not measured against Pro; capped by your own spend limit | 2026-10-05 |
A Claude Code subscription is a Claude plan: the plan buys a Claude account, and Claude Code is one of the tools that account unlocks, in the terminal and in supported IDEs such as VS Code and JetBrains. So on Pro and Max the Claude subscription price on that page is the whole bill, before tax, unless you turn on usage credits, and how much Claude Code work fits into it is set by the usage column. Team needs at least two members and stops at 150 seats, past which Anthropic points organizations to Enterprise. Anthropic adds that price and plans are subject to change at its discretion, which is why every row carries a date. If you are also weighing OpenAI’s agent, read how Codex pricing differs before you compare monthly totals.
Is Claude Code free?
Claude Code has no free tier. The command-line tool installs at no cost, but it needs a Pro, Max, Team, Enterprise or Console account, and the free Claude plan does not include Claude Code access.
Installing the CLI is free: Anthropic’s setup docs give a one-line install command, and you log in the first time you run claude. From then on each request is paid for by a plan, by a Console account billed per token, or by a cloud provider. Amazon Bedrock, Google Cloud’s Agent Platform and Microsoft Foundry are paid routes too: Claude Code is billed per token to your cloud account there. A setup sold as free Claude Code has to send the CLI’s requests somewhere other than a paid Anthropic account, for example through ANTHROPIC_BASE_URL, the variable that points Claude Code at a gateway. Anthropic’s gateway docs say it does not support routing Claude Code to non-Claude models through any gateway, and that requests sent with a gateway credential are billed per token to whoever owns that credential, outside the subscription’s usage limits. For students, the pricing page lists only the Education plan, a university-wide plan an institution buys for its students, faculty and staff.
Annual billing, and why there is no lifetime plan
Pro is the only individual plan with annual billing, so a Claude Code yearly plan means Pro at $200 billed up front, which the pricing page shows as $17 a month. Against twelve monthly payments of $20, that saves $40 a year. There is no Claude Code annual plan above Pro: both Max tiers bill monthly only. Team seats can be paid annually, at $20 instead of $25 for a Standard seat and $100 instead of $125 for a Premium seat, and Enterprise is sold only on annual terms.
A Claude lifetime subscription at any price is not offered on Anthropic’s pricing page as of 2026-10-05, so a lifetime or deep-discount deal sold elsewhere is not one of Anthropic’s plans. Anthropic’s Max article says it does not offer standard discounted pricing on its paid plans and has no standing discounts available on request, so outside the annual saving a Claude discount means one of the limited-time promotions it occasionally runs.
Claude Code usage limits: the five-hour session and the weekly cap
Claude limits on a paid plan work in two layers: a per-session allowance that resets every five hours and a weekly limit across all models. Max raises the session allowance to 5x or 20x Pro’s; usage-based Enterprise has no specific usage limits and is charged on consumption.
| Plan | Per-session allowance against Pro | Weekly limit | What you can do at the limit |
|---|---|---|---|
| Pro | 1x | Yes, on top of the session limit | Wait for the reset, move to Max, or turn on usage credits billed at standard API rates |
| Max 5x | 5x | Yes, across all models | Wait, move to Max 20x, or turn on usage credits |
| Max 20x | 20x | Yes, across all models | Wait for the reset or turn on usage credits |
| Team, Standard seat | 1.25x, per member | Yes, across all models | Wait for the reset or keep working on prepaid usage credits |
| Team, Premium seat | 6.25x, per member | Yes, across all models | As Standard: the reset, or prepaid credits |
| Usage-based Enterprise | No specific usage limits | None | Charged on consumption |
The limits belong to the account, not to the tool: your Claude chats and Claude Code in the terminal or an IDE all draw on the same pool, so a long chat leaves less of the same five-hour session, and of the week, for coding. Anthropic’s article on how Claude Code usage works on Pro and Max adds a fourth way out to the three in the table: switch to a Claude Console account and buy API usage credits for a heavy coding stretch. Settings > Usage on claude.ai shows how much of the five-hour session and of the weekly limit you have used.
Switching models does not bring back a session or weekly limit, because both windows are shared across all models; /model only helps after a model-specific message such as “You’ve hit your Opus limit”. Claude usage also moves with what you ask for: Anthropic names message length, tool use, model choice and effort level among the factors. A daily token number for any plan is not stated in Anthropic’s docs (checked 2026-10-05): each allowance is given as a multiple of Pro, and the pricing page says “there’s no fixed message count”.
API key or subscription: how Claude Code decides who pays
Claude Code bills one of two ways. Logged in with a Claude plan, work draws on the plan’s allowance for a flat fee. With an API key it is billed per token at the model’s published rate, and the ceiling is the spend limit you set on your Console workspace.
| Claude plan (Pro, Max, Team, seat-based Enterprise) | API key (Console account) | |
|---|---|---|
| What you pay | A flat monthly price per seat | Every token at the model’s rate |
| What stops you | The five-hour and weekly limits | The workspace spend limits you set |
| Prompt cache lifetime | One hour; five minutes once you draw on usage credits | Five minutes by default |
What /usage shows | Plan usage bars, activity stats and a usage breakdown | A session cost estimated locally from token counts |
| Where spend is reported | Settings > Usage on claude.ai | The Console usage page |
Claude Code API pricing starts the moment the tool runs on a key: each request is charged at the per-token rates in Anthropic’s API pricing, so a day’s API cost is the tokens it used times those rates. Cache lifetime decides how often you pay full price for the same context. A cache read costs 0.1x the base input rate on most models (0.05x on Opus 5.5 and 0.025x on Fable 5.1), a five-minute cache write 1.25x and a one-hour write 2x, so the five-minute cache pays off after one read and the one-hour cache after two. After a break longer than the cache lifetime, the next message reprocesses your full context: on a key that happens after five minutes, on a plan after an hour. If your app itself calls Claude with a key, how to cap each user’s API spend is the other half of this question.
What setting ANTHROPIC_API_KEY does to the bill
When ANTHROPIC_API_KEY is set, Claude Code uses that key once you approve it, even while you are logged in to a Pro, Max, Team or Enterprise plan, and the work is billed as API usage rather than drawn from the plan’s included usage. In an interactive session it asks once and remembers your answer, which you can change later with the “Use custom API key” toggle in /config. In non-interactive mode (the -p flag that scripted runs use) the key is always used when present, with no question asked.
Two commands settle which account pays. /status marks the credential that is not in use, and unset ANTHROPIC_API_KEY sends you back to the subscription, as Claude Code’s authentication docs describe. Claude Code on the web is the exception: cloud sessions always use your subscription credentials, and a key set in the cloud environment does not override them. A key pasted into a shell profile months ago is, in our view, the usual reason a Pro or Max subscriber finds an API invoice.
Charges billed per action: web search, code execution and agent sessions
On the Claude API, a few server tools and Managed Agents sessions are billed per action on top of tokens.
| Charge | Rate on the API | Notes |
|---|---|---|
| Web search | $10 per 1,000 searches | Plus standard token costs for the results; a search that errors is not billed |
| Web fetch | No additional charge | Standard token costs for the fetched content |
| Code execution | 1,550 free hours per organization per month, then $0.05 per hour per container | Free when used with web search or web fetch; billed by execution time, five-minute minimum |
| Managed Agents session runtime | $0.08 per session-hour | Counts only while the session’s status is running |
These are API prices. On a Claude plan, Anthropic lists tool use such as web search among the factors that count against the plan’s limits, so the same work comes out of the seat allowance instead of an invoice line. MCP servers cost context: only tool names and server instructions enter the session until Claude uses a tool, and what running several MCP servers costs in context adds that up for a heavier setup.
Claude Code token cost per model
Claude token cost on an API key depends on the model: Sonnet 5.5 is $2 per million input tokens and $10 per million output tokens, a cache read on it costs a tenth of that input rate, and the Message Batches API halves standard rates for work that can wait.
Claude Code’s price per token is the model’s API rate, so the table below is the whole of Claude Code model pricing on a key, in dollars per million tokens (MTok), from Anthropic’s API pricing on 2026-10-05.
| Model | Base input | 5-minute cache write | 1-hour cache write | Cache read | Output |
|---|---|---|---|---|---|
| Claude Fable 5.1 | $10 | $12.50 | $20 | $0.25 | $50 |
| Claude Opus 5.5 | $4 | $5 | $8 | $0.20 | $20 |
| Claude Sonnet 5.5 | $2 | $2.50 | $4 | $0.20 | $10 |
| Claude Haiku 4.5 | $1 | $1.25 | $2 | $0.10 | $5 |
Older models stay on the list: Claude Sonnet 5 keeps $2 input and $10 output with the same cache rates as Sonnet 5.5, Opus 5 and Opus 4.5 to 4.8 are $5 and $25, and Sonnet 4.5 and 4.6 are $3 and $15. The Claude token price increase scheduled for Sonnet 5, to $3 and $15 from September 1, 2026, did not occur.
How much a token costs in Claude Code turns on the model and on whether it is input, output or a cache read. Sonnet is priced below Opus, and in the current pair Opus 5.5 charges twice Sonnet 5.5’s input and output rates, while a cache read costs $0.20 per million on both. The Message Batches API is priced at 50% of standard rates, but we read it as a tool for queued, asynchronous requests, which an interactive agent session is not. A coding agent reads far more than it writes, so input and cache reads usually decide an API day more than the output rate does; that is our reading, and it is why the cache lifetime above matters more than which model’s output price is lower.
What Claude Code costs on the web and in cloud environments
Claude Code on the web runs each session in a cloud virtual machine with no separate compute charge: the session draws on the same plan allowance as the terminal, and parallel sessions use it up faster.
Claude Code cloud environment pricing is therefore your plan price: the docs state there is no separate compute charge for the cloud VM. Claude Code on the web and other cloud sessions are available on Pro, Max and Team plans, and for Enterprise users with premium seats or Chat + Claude Code seats, so pricing for Claude Code on the web is the plan you already hold. A cloud environment is the saved configuration a session runs under, covering network access, environment variables and setup scripts. Each session runs in an isolated VM that Anthropic manages, unless your organization routes it to a self-hosted environment on its own infrastructure.
What a Claude cloud session does cost is allowance. Cloud sessions share rate limits with all your other Claude and Claude Code usage, and several tasks running in parallel use them up proportionately faster. They also need an Anthropic account and are not available when Claude Code is configured for Amazon Bedrock, Google Cloud’s Agent Platform or another third-party provider, so moving Claude Code’s billing to a cloud provider gives up cloud sessions. Anthropic’s Claude Code and pricing pages list no $250 cloud session credit as of 2026-10-05.
Reading your own spend: /usage, /cost and total duration
The /usage screen is the place to read Claude Code spend, but its dollar figure is meant for API users. On a Pro or Max plan, the plan bars and the usage breakdown show what is consumed; the dollar line is not a bill.
/cost is an alias for /usage, so both open the same screen. This is the sample Session block from Claude Code’s cost docs, copied as the docs print it, not a session of ours:
Total cost: $0.55
Total duration (API): 6m 20s
Total duration (wall): 6h 33m 10s
Total code changes: 0 lines added, 0 lines removed
Usage by model:
claude-sonnet-4-6: 1.2k input, 5.3k output, 940.0k cache read, 50.0k cache write ($0.55)
Claude Code computes Total cost locally from token counts at list price, unless an administrator has set your organization’s contracted rates, so it is an estimate, and for an API account the Console’s Usage page is the authoritative bill. The totals reset when /clear starts a new session.
In Claude Code’s Session block, Total duration (API) counts only the time spent waiting for API responses, and Total duration (wall) counts how long the session has been running, the same two clocks the status line docs define. The sample’s six minutes of API time inside six and a half hours of wall time means the model was working for a small part of the day the session sat open. Neither line is what Claude Code charges for: billing follows tokens, which is why the session cost sits next to the token counts.
On a subscription, the usage cost worth watching is the share of your limits. /usage breaks recent usage down by skills, subagents, plugins and individual MCP servers, and flags behaviors such as long context or cache misses once one accounts for 10% or more of recent usage. For Claude Code billing on an API account, the ceiling is a setting rather than a plan: workspace spend limits in the Console cap what a key can run up.
Why the same fix costs more in an app with no tests
Work on an app with no tests costs more of any plan, because the agent cannot check its own fix and re-reads the code instead. At least 23 of the 26 apps we audited had zero working automated tests, so in our audits it was the common case.
Those 26 are the apps from our June and July 2026 audits, 21 third-party apps plus 5 founder apps, a selected set rather than a random sample of AI-built software. Anthropic’s own average comes with a qualifier: “Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users.” The docs do not describe those codebases, so the figure is no forecast for an app with no tests.
As we see it, the difference is the loop. With a test command, the agent changes a file, runs the tests, reads a few lines of output and moves on. Without one, “did that work?” costs another trip over the code, and because Claude Code sends the full conversation with every request, each extra trip spends more of the window. Anthropic’s cost guidance makes the same point from its side: “When Claude can verify its own work, it catches issues before you need to request fixes.” In the same audits, at least 17 of the 21 third-party apps had no deploy gate, and neither did any of the 5 founder apps: every push ships straight to production with nothing checking it first.
Four fixes cut the cost of each change without a plan change:
- 01 Clear the session between unrelated tasks with /clear. Stale context costs tokens on every later message, and /compact on a large context is itself a large request because it reads the conversation it summarizes.
- 02 Give the repository a project instructions file so the agent stops rediscovering it each session, and keep it short: Anthropic suggests under 200 lines.
- 03 Use Sonnet for routine work, Haiku for simple subagent tasks, and a lower effort level where deep reasoning is not needed.
- 04 Add one test the agent can run on the path that takes money: signup, login and payment, run in CI on every change.
The instructions file earns its keep as a rules file plus the checks behind it, and the fourth item starts with smoke tests for signup, login and payment. Agent teams multiply all of this: each teammate runs its own context window, and token usage scales with the number of active teammates and how long each one runs. A test the agent can run and a rules file it reads are two of the engineering standards for teams that build with AI.
Which Claude Code plan fits your work
Claude Code is included in all paid plans, so the choice is mostly about how much work fits in a window. Two neighboring questions are what Claude Code and Cursor each cost and, for any plan that will touch a live app, whether Claude Code is safe on production code.
When Pro is enough
Pro fits a few Claude Code sessions a week next to ordinary chat use, at the Pro price in the plan table. We’d start there and watch the plan bars in Settings > Usage for about two weeks before moving up. Claude Code Pro pricing stops making sense when the five-hour session runs out before the work does, week after week.
When Max 5x or Max 20x pays for itself
We’d move to Max 5x once the session limit interrupts work more than about once a week, and to Max 20x for full-day or parallel agent sessions. How much session allowance each dollar of the Claude Code Max price buys rises at the top tier: Max 20x gives 20 times Pro’s per-session allowance at ten times Pro’s monthly price, while Max 5x scales usage and price together. Beyond usage, Claude Max pricing buys higher output limits for all tasks, early access to advanced Claude features and priority access at high traffic times. Max does not fit work that is idle most of the month, which is the API key’s case below.
When Team or Enterprise seats make sense
Team fits when two or more people need Claude Code and someone needs admin tools, central billing and spending caps at organization and user level. On the Claude Team plan, limits are per member, so one heavy user does not use up a colleague’s allowance. Enterprise fits when usage-based billing or the security controls are the reason, such as SCIM, audit logs and custom data retention; Enterprise pricing is the seat-plus-usage row in the plan table.
When an API key is cheaper than a plan
An API key fits scripted, scheduled or bursty work that sits idle most of the month, including CI jobs, which run Claude Code non-interactively anyway. Whether the key is cheaper than a plan is your own sum: run a representative week on a key, read the session cost in /usage, and compare it with the plan price. We don’t give a break-even number because context size and cache hits move it for every project. Keep the cache trade from the API section in mind: five minutes on a key against an hour on a plan.
How the sprint handles this choice
If Claude Code is now fixing an app that has paying users, the plan is rarely the cost that matters; the repeated fixes are. When you would rather hand the fixes to a team than keep tuning prompts and plans yourself, start with a free audit: a video call where we talk through with you where the repeated fixes come from. In the sprint, we give the repository CLAUDE.md, AGENTS.md, Cursor rules, or equivalents describing conventions and protected patterns, add CI checks for the rules that can be enforced, and automate smoke tests for signup, login, the core product action and payment flows. The handover includes guidance and automated checks for future AI-assisted changes. Hosting, paid tools, and API usage remain in your accounts, and your Claude plan is one of those tools.
Common questions about paying for Claude Code
How much do 1000 tokens cost?
On Claude Sonnet 5.5, 1,000 input tokens cost $0.002 and 1,000 output tokens cost $0.01, from its rates of $2 and $10 per million. Other models scale with their row in the token table: on Opus 5.5 the same thousand cost $0.004 in and $0.02 out.
How much is 200,000 tokens for Claude?
On Sonnet 5.5, 200,000 input tokens cost $0.40 and 200,000 output tokens cost $2.00, which is 0.2 million tokens times $2 and times $10. Read from the cache, the same 200,000 input tokens cost $0.04.
Why is Claude so expensive?
Claude gets expensive inside a coding agent for three reasons: an output token costs five times an input token on Sonnet 5.5, Claude Code sends the full conversation with every request, and Opus costs more than Sonnet. Thinking tokens are billed as output too. Anthropic’s cost guidance points to /clear between tasks and Sonnet for routine work, and a warm cache cuts the price of re-reading the conversation.
Can I get unlimited usage on Claude?
No individual Claude plan is unlimited. Max 20x raises the per-session allowance to 20 times Pro and still carries a weekly limit across all models, and Anthropic says it may limit usage in other ways at its discretion. A usage-based Enterprise organization has no specific usage limits and is charged on consumption.
Does plan mode use tokens in the Claude code?
Yes. In plan mode Claude still explores the codebase and proposes an approach for your approval, and that work uses tokens on a key, or plan allowance on a subscription, like any other request. Anthropic recommends it for complex tasks because it prevents expensive rework when the first direction is wrong; agent teams are the case to watch, at approximately 7x the tokens of a standard session when teammates run in plan mode.
How hard is it to cancel a claude.ai subscription?
Not hard: on the web or desktop app it is Settings > Billing, then Cancel, and on iOS or Android it is Billing, then Manage subscription, inside the app you subscribed through. The cancellation takes effect at the end of the current billing period, and Anthropic advises canceling at least 24 hours before the next billing date to avoid the next charge.
Spending more on AI fixes than you expected?
When an app has no tests, every fix gets retried and checked by hand, so the bill keeps climbing. In an audit, we walk through how your app is built and where the fixes keep breaking, then tell you what to put in place so each change costs less.
Book a free audit →
Free · 30 minutes · No code access needed