Claude Code costs $20 a month on Claude Pro, $100 on Max 5x, $200 on Max 20x, $20 to $125 per seat on Team, or per token with an API key. There is no free tier. The plan you buy is a Claude plan; Claude Code is what it unlocks in your terminal.

The reason every number here carries a check date is April 2026, when Anthropic’s pricing page briefly stopped listing Claude Code under Pro, then restored it. Simon Willison captured both public versions while the page was changing. Months later, pages written on both sides of that reversal are still in the search results, contradicting each other about whether $20 buys the tool at all.

Every figure below was re-read on 2026-08-05 against Anthropic’s pricing page, its plan comparison article, the Claude Code cost docs, and the Claude API pricing docs.

How much does Claude Code cost?

Claude Code costs $20 a month on the Claude Pro plan, or $17 a month if you pay $200 for the year up front, $100 on Max 5x, and $200 on Max 20x, checked 2026-08-29. The Free plan does not include it. With API authentication there is no Claude subscription fee; model usage is billed by token and remains subject to API rate and spend limits.

PlanPrice, checked 2026-08-05Claude Code
Free$0Not included
Pro$20/month, or $200 billed annually ($17/month)Includes Claude Code
Max 5x$100/monthIncluded, 5x Pro capacity per session
Max 20x$200/monthIncluded, 20x Pro capacity per session
Team, Standard seat$20/seat per month billed annually, $25 billed monthlyIncludes Claude Code and Claude Cowork
Team, Premium seat$100/seat per month billed annually, $125 billed monthlyIncludes Claude Code and Claude Cowork
Enterprise$20/seat plus usage at API ratesIncluded

Claude Code Pro vs Max is mainly a question about how much work fits inside the allowance, but capacity is not the only difference. Max adds 5x or 20x Pro usage per five-hour session, higher output limits, early access to advanced features, and priority access during high-traffic periods.

Two Team details decide whether Team is even an option for you. Anthropic’s pricing page sells Team for 2 to 150 people, checked 2026-08-05, so a larger org is an Enterprise conversation. And both seat types include Claude Code: several pricing round-ups say a Standard seat excludes it and only Premium includes it, which does not match the page today. The difference between the two seats is allowance size, not access.

The date on that table is the point. What happened in April was an experiment: Anthropic’s Amol Avasare described it as “a small test on ~2% of new prosumer signups,” and called it “a mistake that the logged-out landing page and docs were updated for this test.” The test was invisible to almost everyone. The pages written while the public docs disagreed with themselves are still ranking.

What annual billing saves, and where it is not offered

Pro is the only individual plan with an annual option: $200 billed upfront, which works out to $17 a month and saves $40 against twelve $20 payments. Anthropic’s plan comparison article lists Pro as monthly or annual and both Max tiers as monthly only, checked 2026-08-05, so there is no yearly Claude Code plan above Pro.

Team is where annual billing saves the most in absolute terms. A Standard seat drops from $25 to $20 a month, a Premium seat from $125 to $100, which is $60 and $300 per seat per year.

What 5x and 20x actually multiply

The multiple is against a Pro seat’s usage in the same window, not against a token count. Max 5x gives roughly five times Pro’s usage per five-hour session and Max 20x roughly twenty times, and the weekly limit scales with the plan the same way.

Anthropic publishes the multiple and not the base, so nobody outside Anthropic can turn “20x” into a number of tokens. Pricing round-ups that quote per-window token figures for each tier are inferring them, usually from one person’s screenshots. Treat the multiple as a ratio between plans and measure your own consumption with /usage.

Is Claude Code free?

Claude Code has no first-party free tier. The $0 plan includes Claude chat, while the “Includes Claude Code” line starts at Pro, $20 a month.

Guides that promise free Claude Code commonly install the CLI and route it through a third-party model or compatibility layer. That may reproduce part of the terminal workflow, but it is not a free Claude plan and the model is not Claude.

Looks free Actually free
Guides titled “run Claude Code for free”They may route the CLI through a third-party model or compatibility layer. Same interface, not a free Claude plan.
The free Claude plan, $0 a monthIt includes Claude the chat product. Claude Code starts on Pro at $20 a month.
The install costs nothingThe CLI is free. Every model call behind it is billed to a plan or to an API key.
Looks free
Guides titled “run Claude Code for free”
The free Claude plan, $0 a month
The install costs nothing
Actually free
Guides titled “run Claude Code for free”
They may route the CLI through a third-party model or compatibility layer. Same interface, not a free Claude plan.
The free Claude plan, $0 a month
It includes Claude the chat product. Claude Code starts on Pro at $20 a month.
The install costs nothing
The CLI is free. Every model call behind it is billed to a plan or to an API key.

Those guides can solve a real problem for people who want a similar agent loop without a subscription. The result measures the model and gateway they configured, not Claude’s output or Anthropic’s included usage.

What the monthly price actually buys: the five-hour window and the weekly one

Claude Code on Pro, Max, Team, and seat-based Enterprise plans runs against two limits at once: a rolling five-hour window and weekly limits. Both are per seat, and the allowance is shared with Claude chat and Cowork, so a heavy chat morning can eat into the afternoon’s coding. New and self-serve usage-based Enterprise plans work differently: they have no per-seat included usage limit, and consumption is billed at API rates.

These windows are shared across models. Switching with /model does not restore access after a session or weekly limit, though it does keep you working after the narrower “You’ve hit your Opus limit” message. The two messages look alike in a terminal and mean different things.

On an included-usage subscription the monthly price buys a rate of work. When that allowance ends, you can wait for the reset, move to a higher plan, or, where the account owner has enabled it, draw on paid usage credits at standard API rates. Usage-based Enterprise starts on metered billing instead of switching to it after an included allowance. What each window actually allows, when it resets, and what to do the first time you hit one is a separate question from what the plan costs.

Claude Code API key vs subscription: which one are you actually on?

A Claude Code subscription buys a capped allowance for a flat monthly price. API authentication bills tokens directly and uses API rate and spend controls. Anthropic’s prompt-caching documentation sets the default lifetime at one hour on a subscription and five minutes with an API key, though API users can opt into the one-hour cache at its higher cache-write rate.

Subscription (Pro, Max, Team)API key or cloud provider
What you payFlat monthly seat pricePer token, no flat fee
What stops youFive-hour and weekly windowsYour own spend limit
Prompt cache lifetimeOne hour by defaultFive minutes by default; one hour is optional
What /usage showsPlan usage bars and a breakdownA dollar figure computed locally at list rates

Cache lifetime sounds like trivia until your day takes this shape: an hour on the app, an hour on something else, back to the app. On a subscription that second hour often still hits a warm cache. On an API key the five-minute lifetime expired long ago, so identical work reprocesses your full context from scratch. The subscription hour also drops to five minutes once you draw on usage credits.

On an API key you can price that. Anthropic’s API pricing sets a cache read at 0.1x the base input rate, a five-minute cache write at 1.25x, and a one-hour cache write at 2x, checked 2026-08-05. So the five-minute cache pays for itself after a single read, and the one-hour cache after two. A gap longer than the lifetime costs more than time: the next request is a fresh full-price pass over your whole conversation.

What setting ANTHROPIC_API_KEY does to your bill

If ANTHROPIC_API_KEY is set in your environment, Claude Code uses that key instead of your Pro, Max, Team, or Enterprise subscription, even while you are logged in. Your work is then billed per token to the API account that owns the key, and none of it draws on the plan you are already paying for.

There is one guardrail and one gap, checked 2026-08-05 against Anthropic’s Claude Code authentication docs. Interactively, Claude Code asks you to approve the key once before it overrides the subscription, and it remembers the answer. In non-interactive mode (the -p flag, so scripts, CI jobs, and hooks) the key is always used when present, with no prompt. That is how a founder who pasted an API key into a shell profile months ago ends up with an API invoice for work a $20 plan already covered.

Two commands settle it. /status shows a Login method row for your subscription and adds an API key row when a key is in use. unset ANTHROPIC_API_KEY puts you back on the subscription. Claude Code on the Web is the exception: it always uses your subscription credentials, and setting the variable in that sandbox does not override them.

Claude Code API pricing: what a token actually costs

On an API key you pay Anthropic’s published per-model rates. Everything below is dollars per million tokens (MTok), checked 2026-08-05 against Anthropic’s API pricing docs.

ModelBase input5m cache write1h cache writeCache readOutput
Claude Opus 5$5$6.25$10$0.50$25
Claude Sonnet 5$2$2.50$4$0.20$10
Claude Sonnet 4.6$3$3.75$6$0.30$15
Claude Haiku 4.5$1$1.25$2$0.10$5

Two lines on that table are worth reading twice. Sonnet 5’s $2 in and $10 out was announced as introductory pricing through 31 August 2026, and Anthropic has since made it the standard price: the scheduled increase to $3 and $15 on 1 September did not happen, so an API budget built on those rates holds. And the Batch API takes 50% off both input and output, but batching is for asynchronous request queues, not for an interactive terminal agent, so it is not a lever Claude Code itself can pull.

The shape of an agent’s bill is different from a chatbot’s. Output is five times input on every model here, but a coding agent reads far more than it writes, so most sessions are dominated by input and cache reads rather than output. That is why cache behavior, not model choice, is usually the biggest single line on an API-billed day.

Costs that sit outside the subscription

Some of what Claude Code does is billed by the action rather than by the token. On the API side, checked 2026-08-05:

ChargeRateNotes
Web search$10 per 1,000 searchesPlus normal token cost for the results. One search is one use whatever it returns, and failed searches are not billed.
Code execution1,550 free hours per organization per month, then $0.05 per hour per containerFree when used alongside web search or web fetch. Billed by execution time with a five-minute minimum.
Managed Agents session runtime$0.08 per session-hourMetered only while the session status is running. Idle and terminated time does not count.
Web fetchNo extra chargeYou pay only for the fetched content that lands in context.

None of these appear as a separate line if you authenticate with a Claude subscription. On Pro, Max, Team, and seat-based Enterprise plans the work draws on your seat allowance instead, and there is no per-search or per-container invoice. They matter when the same workload moves to an API key or a cloud provider, which is exactly the move people make when they start scripting Claude Code.

The cloud-environment question has a shorter answer than people expect. Claude Code on the Web runs against your subscription credentials, so a session there spends plan allowance rather than dollars.

What Claude Code costs on the web and in cloud environments

Claude Code on the web costs nothing beyond the plan you already pay for. Anthropic’s Claude Code on the web documentation states there is no separate compute charge for the cloud VM, checked 2026-08-16, so a cloud session draws on the same allowance a terminal session does.

Access is the first gate. Claude Code on the web is in research preview for Pro, Max, and Team users, and for Enterprise users with premium seats or Chat plus Claude Code seats, checked 2026-08-16. There is no cheaper web-only tier to buy.

A cloud environment is the saved configuration a cloud session runs under: network access, environment variables, and setup scripts. Every session runs in an isolated virtual machine Anthropic manages, unless your organization routes sessions to a self-hosted environment, in which case they run on your own infrastructure, where isolation is your deployment’s responsibility.

What does cost you is the thing people forget to count. Claude Code on the web shares rate limits with all other Claude and Claude Code usage on your account, and running several tasks at once consumes more of that allowance proportionately. That, not the VM, is why a web-heavy day ends early.

One authentication rule has a billing consequence. Cloud sessions 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, checked 2026-08-16. A team that moved to a cloud provider to put model spend on an existing cloud bill gives up the web surface in that trade.

What Claude Code costs when an agent builds a real app

Anthropic’s published Claude Code figure is the one every pricing round-up quotes: around $13 per developer per active day and $150 to $250 per developer per month, with 90% of users staying under $30 a day. What the round-ups drop is the three words in front of it: “Across enterprise deployments.”

“Across enterprise deployments” is doing more work in that sentence than the $13. Anthropic never says what those codebases looked like, and enterprise deployments are where a test suite and a deploy gate are already standard equipment.

Across the 26-app AxonBuild audit corpus, audited in June and July 2026, at least 23 had zero working automated tests. Among the 21 third-party apps in that set, reliability averaged 31 out of 100, the worst of twelve scored pillars. At least 17 of those 21 had no deploy gate, and so did all 5 of the founder-built apps.

What stuck with me reading those repos was how expensive the question “did that work?” becomes when nothing can answer it. In a repo with a test command, the agent makes a change, runs it, reads three lines of output, and either moves on or fixes it. Without one, the same question costs a fresh round trip: re-read the files, re-reason about the flow, produce a confident answer nobody has checked. The docs describe the billing side of this, noting that the full conversation rides every request.

Enterprise deployments are the environments where verification is usually three lines of test output. In at least 23 of those 26 apps, verification means re-reading more of the codebase and relying on reasoning instead of a test result. That consumes more context and leaves the answer less falsifiable.

Watch your own number instead of inheriting anyone’s average. /usage prints the session block:

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)

One caveat the docs put right above that block: the session cost is intended for API users. On Pro or Max your usage is already included in the subscription, so that dollar figure is not a bill you will ever receive. What subscribers read on the same screen are the plan usage bars, plus a breakdown attributing recent usage to skills, subagents, plugins and individual MCP servers, flagging anything that accounts for 10% or more, such as long context or cache misses. On a subscription that breakdown is the number worth watching, not the dollars.

How to make Claude Code cheaper without changing plans: four fixes

None of these four need a plan change to fix. They decide how much of a five-hour window a given day of work eats, which is the only lever you control without paying more.

1. Leaving one session open all day

Every request carries the full conversation, so an afternoon of unrelated tasks in one session means each new question pays for the morning’s context. Anthropic’s guidance is to /clear between unrelated tasks. And /compact reads the whole conversation in order to summarize it, so compacting a large context is itself a large request, while /clear costs nothing.

2. No CLAUDE.md, so the agent re-derives your project every session

Without a project file, the same facts get rebuilt from scratch at the start of every session: which directory holds the API routes, which command runs the tests, which table nobody touches. Anthropic suggests keeping that file under 200 lines so it does not become the cost it was meant to remove. The rest of that file is a maintainability question, covered in what belongs in a CLAUDE.md file and what to leave out.

Connected tooling has the same shape. MCP tool definitions are deferred by default now, but the docs still recommend preferring CLI tools like gh or aws where they exist, because those add no per-tool listing to context at all. What a server costs you is a separate question from which MCP servers Claude Code connects to and what they reach. Picking which servers are worth running at all is a third question, and for most projects the honest answer is fewer than are currently installed.

3. Using a higher-cost model or effort level for routine work

Sonnet’s per-token rate sits below Opus 5’s on both input and output, and on a subscription the same gap shows up as how fast the model eats your window. Use the least expensive model that reliably completes the task, then move up for work that actually needs deeper reasoning. The rate table above is the size of that decision on an API key.

Current Claude Code model configuration primarily controls adaptive reasoning through /effort. A nonzero MAX_THINKING_TOKENS value is ignored on adaptive-reasoning models unless fixed-budget mode is explicitly enabled, so copying an old token-budget setting may change nothing.

4. No test the agent can run

This is the expensive one. It does not need to be a real suite on day one; one script that starts the app, logs in, and hits the path that takes money already changes the economics of every fix after it. The same absence shows up first in what a launch-ready AI-built app has to answer for, long before anyone asks what the tooling costs.

Anthropic’s current agent-team cost guidance says each teammate runs its own context window, so token use grows roughly with team size and runtime. It no longer gives one universal multiplier. Keep teams small, make spawn prompts focused, and shut teammates down when their work is complete.

Whether $20 a month is the right number is a separate question from whether the tool is safe to point at your production repo, which has its own answer about what Claude Code can reach. If the price is what has you looking around, the Claude Code alternatives compared on cost structure and review surface sets this flat subscription against the plan-bundled and provider-metered pricing of four alternative agents. Other tool families price differently again: what Lovable credits actually buy you meters generated code instead of developer days. Cursor comes up in this decision often enough to deserve its own comparison, and the useful axis there is cost structure and what runs out, not which sticker price is lower.

Which Claude subscription do you need?

Claude Pro at $20 a month is the subscription most solo users need, Max 5x at $100 once you hit the five-hour window more than once a week, and Max 20x at $200 for full-day or parallel agent sessions. A team of 2 to 150 buys seats at $20 or $100 each, billed annually.

The honest routing, given everything above:

  • A few sessions a month, alongside Claude chat: Pro at $20. Nothing cheaper includes Claude Code at all.
  • Daily solo coding on one project: start on Pro and watch the /usage bars for two weeks. Most people who assume they need Max do not, and the two weeks cost $20 to find out.
  • You hit the five-hour window more than once a week: Max 5x at $100. This is the tier that buys back interrupted afternoons rather than new features.
  • Full-day agent sessions, long context, or parallel agents: Max 20x at $200. Agent teams multiply token use by roughly the number of teammates, and that is what exhausts a smaller plan.
  • A team of 2 to 150: Team seats, $20 a seat per month billed annually for Standard or $100 for Premium. Both include Claude Code; the seat tier sets the allowance.
  • Scripted, scheduled, or bursty workloads: an API key. You pay for what runs and nothing when it does not, which beats a flat seat that sits idle for three weeks a month.
Claude Code pricing decision ladder matching work patterns to Pro, Max 5x, Max 20x, or API billing.

If you are choosing between the last two, decide on whether anyone needs the usage reporting and spend caps that come with seats, since the prices are close.

Common questions about Claude Code pricing

How does Claude Code pricing work?

Claude Code pricing is the price of the Claude plan you sign in with: $20 a month on Pro ($17 billed annually), $100 on Max 5x, $200 on Max 20x, $20 to $125 per seat on Team, or per-token billing on an API key with no monthly fee, checked 2026-08-29. There is no free tier, and the plan you buy sets both the price and the usage window Claude Code runs inside.

How much does Claude Code cost per month?

Claude Code costs $20 a month on Claude Pro, or $17 a month billed annually, $100 on Max 5x, and $200 on Max 20x, checked 2026-08-29. Team seats are $20 or $100 per seat per month billed annually ($25 and $125 monthly), and Enterprise is $20 a seat plus usage at API rates. On an API key there is no monthly fee at all; you pay per token.

Does Claude Code cost money on top of Claude Pro?

No. On Pro, Max, Team, and seat-based Enterprise plans, Claude Code usage draws on the allowance your subscription already includes, so there is no second bill. The exception is your own doing: if ANTHROPIC_API_KEY is set in your environment, Claude Code bills that API account per token instead of using the plan you are paying for.

Is Claude Code free if I only use it a few times a month?

No first-party Claude plan includes Claude Code for free, checked 2026-08-29. The lowest listed plan that includes it is Pro at $20 a month. A third-party model routed through a compatible CLI setup is a different service, not a Claude Code free tier.

Does the $20 Claude Pro plan include Claude Code, or is it Max only?

Pro includes Claude Code, checked 2026-08-05 on Anthropic’s pricing page. The Max-only claim traces back to April 2026, when the public pricing page briefly dropped Claude Code from the Pro column before restoring it. Pages written during that change still rank, which is why this question keeps returning contradictory answers.

Is there a Claude Code yearly plan?

Pro is the only individual tier with annual billing: $200 upfront, which is $17 a month and saves $40 against twelve monthly payments. Both Max tiers bill monthly only, checked 2026-08-05 on Anthropic’s plan comparison article. Team seats do bill annually, at $20 for Standard and $100 for Premium per seat per month.

Does Claude Code count against my Claude chat usage limits?

Yes. On Pro, Max, Team, and seat-based Enterprise plans the allowance is per seat and shared across Claude Code, Claude chat, and Cowork, so a heavy chat morning leaves less room for an afternoon of coding. It runs against two windows at once: a rolling five-hour session window and a weekly one. Usage-based Enterprise plans work differently, with no per-seat included usage and consumption billed at API rates.

What is the Claude Max 20x token limit?

Anthropic does not publish one. It publishes a multiple: Max 20x gives roughly twenty times a Pro seat’s usage in the same five-hour session window, with the weekly limit scaling the same way. Per-window token figures quoted in pricing round-ups are inferred, not official, so the only reliable number for your own work is what /usage reports.

Can I run Claude Code for free by pointing it at another model?

Some compatibility layers route the Claude Code CLI to another provider. You may keep parts of the terminal workflow, but the model, billing, support, and behavior come from that other setup. It is not a free Anthropic plan.

What does the /cost output actually mean?

/cost is an alias for /usage in Anthropic’s Claude Code command reference, checked 2026-08-16, and the Session block it prints reports a total cost for the session, two duration lines, a code-changes line, and a per-model token breakdown. That dollar figure is computed locally from token counts priced at standard list rates, so it ignores promotional pricing and contracted discounts and may not match your invoice.

The two duration lines are different clocks. Total duration (API) is time spent inside model requests; Total duration (wall) is elapsed real time since the session started. Six minutes of API time under six hours of wall time just means most of the day went to reading and typing. Neither line is billed. The money comes from the token counts underneath them.

One behavior change is worth knowing about, because it explains confusing screenshots. Those totals reset when /clear starts a new session, so the next session’s total cost starts at $0. Before Claude Code v2.1.211 they kept accumulating across /clear for the lifetime of the process.

Is Claude Code cheaper on an API key or on a Max 20x subscription?

Neither option is universally cheaper. Max 20x gives one predictable $200 subscription with included usage and a one-hour cache by default. API billing can cost less for occasional work and more for long, context-heavy sessions. Anthropic’s $150 to $250 monthly figure describes enterprise deployments, so it is a planning reference rather than a break-even promise for an individual app.

Your own cost depends on model choice, context size, cache behavior, task complexity, and how often you run parallel sessions. Watch the usage bars in /usage for two representative weeks before you pick a tier.