Skip to content
AI Dev Toolkit.
Esc
  • Loading…

Guide · Coding agents

Claude Code pricing: plans vs API, and which costs less

Claude Code is included in Anthropic’s paid Claude plans, from Pro at $20 a month to Max at $100 or $200, but not in the free plan. Or pay per token with a Console API key, Amazon Bedrock or Google Cloud. If you code with it most days, a plan usually costs far less than API rates.

By Tahir NazirUpdated 14 min read

On this page
  1. Is Claude Code free, and which plans include it?
  2. How much does Claude Code cost per month?
  3. How do Claude Code usage limits work?
  4. How much does Claude Code cost on the API?
  5. Is a Claude plan cheaper than the API for Claude Code?
  6. Claude Code Pro vs Max: which plan do you need?
  7. What would light, daily and heavy use cost?
  8. What extra costs can appear?
  9. How much do developers actually spend on Claude Code?
  10. Claude Code for teams: Team, Enterprise or the Console?
  11. Using Claude Code through Amazon Bedrock or Google Cloud
  12. Questions people ask

Is Claude Code free, and which plans include it?

Claude Code itself costs nothing to install, but it needs an account that pays for the model. Anthropic’s setup docs say it requires a Pro, Max, Team, Enterprise or Console account, and that the free Claude plan doesn’t include it. You can also run it through Amazon Bedrock, Google Cloud’s Agent Platform (formerly Vertex AI) or Microsoft Foundry.

Ways to pay for Claude Code
Plan or accountPrice (US)How usage is limited or billed
FreeNo chargeDoesn’t include Claude Code
Pro$20 a month, or $17 a month billed annuallyFive-hour session window plus a weekly limit, shared with Claude chat
Max 5x$100 a month5x Pro’s usage per session, plus a weekly limit
Max 20x$200 a month20x Pro’s usage per session, plus a weekly limit
TeamPer seat, Standard or PremiumPer-seat allowance; Premium seats get 5x the usage of Standard
EnterpriseSeat fee plus usage at API ratesUsage-based plans have no per-seat limit
Console (API key)Pay per tokenBilled per token at API list prices
Bedrock, Agent Platform, FoundryYour cloud’s per-token ratesBilled to your cloud account

Plan prices from data checked on 2026-10-08 (monthly billing; Max is monthly only). Team and Enterprise seat prices are on claude.com/pricing.

Your plan covers Claude Code in the terminal and in the VS Code and JetBrains extensions, and all of it draws on the same allowance as your chats. Max plans also come with monthly credits for the Claude API, but Anthropic’s help centre says those credits can’t be used in Claude Code or the Claude apps.

How much does Claude Code cost per month?

On a plan, Claude Code costs whatever the plan costs: Pro is $20 a month, or $17 a month billed annually, Max 5x is $100 and Max 20x $200 a month, and Max is billed monthly only. On a Console API key there’s no monthly fee at all: you pay for the tokens you use, so a quiet month can cost a few dollars and a busy one far more than a plan. The worked examples below put numbers on that, and Anthropic’s own average for enterprise developers is quoted further down.

How do Claude Code usage limits work?

Paid plans have two usage limits: a session limit that resets every five hours, and a weekly limit on top. Your activity in Claude on the web, desktop and mobile and in Claude Code all draws from the same pool. Anthropic doesn’t publish a fixed message or token count: how far a session goes depends on the length and complexity of the work, the model you choose and the features you use.

  • Max gives 5x or 20x Pro’s usage per five-hour session. Its weekly limit resets at a fixed time assigned to your account, shown in Settings > Usage.
  • Fable models run on pay-as-you-go usage credits on Pro and on Team Standard seats. On Max and Premium seats you can spend up to 50% of your weekly limit on them.
  • Opus or Sonnet limits apply only to that model family, so /model can switch you to another family. Session and weekly limits cover every model.

Run /usage to see your plan’s usage bars and when each window resets. When you hit a limit, you can wait for the reset (Claude Code can continue the interrupted task for you afterwards), upgrade, or turn on usage credits with /usage-credits. Usage credits are billed at standard API rates, and you can set a monthly spend limit. The usage limit reached page covers each message and fix, usage credits required for 1M context explains the one that isn’t a limit at all, and the errors index lists the other Claude Code messages.

How much does Claude Code cost on the API?

With a Console account or API key, you pay for every token at list price, with no plan limits. The first time you sign in with a Console account, Anthropic creates a “Claude Code” workspace for tracking, and you can set workspace spend limits. /usage shows an estimated cost for the session; the Console’s usage page is the authoritative bill.

The cost is easiest to judge per step. Claude Code works in a loop: each time Claude reads a file, runs a command or replies, it sends a new request carrying the whole conversation so far. Prompt caching bills the repeated part at a much cheaper rate, so a typical step is a large cache read, a small cache write and some output. Every figure below uses this moderate step:

  • 100,000 tokens of context read from the cache (a session that’s cleared between tasks)
  • 2,000 new tokens written to the cache (tool results and your message)
  • 1,200 output tokens, including thinking, which is billed as output
API cost of one moderate step
ModelCached inputCache writeOutputCost per step
Claude Opus 5.5$0.20$5$20$0.054
Claude Sonnet 5.5$0.10$2.50$10$0.027
Claude Haiku 5.5 (long-context rates)$0.05$0.625$2.50$0.00925

Prices per million tokens. API list prices as of 2026-11-12; US plan prices checked on 2026-10-08. Best case: a warm cache on every step; a request that misses the cache pays the full input price for all of its context. Haiku 5.5 charges its long-context rates once a prompt passes 100,000 tokens, as this step’s does.

Opus 5.5 is Claude Code’s default model on Pro, Max, Team, Enterprise and the API, and its output costs twice as much as Sonnet 5.5’s. Switching to Sonnet for routine work, with /model sonnet, is the quickest way to cut an API bill.

Is a Claude plan cheaper than the API for Claude Code?

Yes, unless you use it rarely. A plan is a flat price, while the API grows with every step. With our moderate step on Opus 5.5, the API passes Pro’s price at about 17 steps a working day. At the pace we measured (about 112 steps per active hour), that’s roughly 9 minutes of agent work a day.

Each crossing is the daily usage at which paying per token costs the same as the plan. To the right of it, the plan is cheaper, as long as its limits let you do that much work.

That last condition matters. Anthropic describes plan limits in relative terms (“5x or 20x more usage than Pro”), not tokens, so nobody outside Anthropic can say exactly how many steps a plan allows. What the chart shows is the price of the same work at API rates. If you regularly hit Pro’s limit, the useful comparison is Max against the API, not Pro against the API.

Free toolSubscription vs API calculatorCompare Claude, ChatGPT and Google AI plans with API prices for your own usage. Its “Coding agent” example (300 steps a day over a 30,000-token context) comes to about $496.85 a month on Sonnet 5.5, or $88.90 with caching.

Claude Code Pro vs Max: which plan do you need?

Max doesn’t add different Claude Code features; it raises the limits. Max 5x gives 5 times Pro’s usage per five-hour session and Max 20x gives 20 times, for 5 times and 10 times Pro’s monthly price. Anthropic’s advice is to consider Max 5x if you consistently hit Pro’s limits.

  • Pro suits focused sessions a few times a week, especially if you clear context between tasks and use Sonnet for routine work.
  • Max 5x suits most working days in Claude Code, or long agent runs that keep hitting Pro’s five-hour window.
  • Max 20x suits all-day use, several sessions at once or heavy use of subagents, each of which draws on the same allowance.

Which model you run matters as much as the plan: choosing a model for coding agents covers when Sonnet is enough. For a general Claude plan comparison beyond Claude Code, use the subscription vs API calculator.

What would light, daily and heavy use cost?

Here are three usage levels, priced with the moderate step above. A step is one request, and a single task can take many of them. Daily use works out to about 2.7 hours of active agent work a day at our measured pace.

Monthly API cost for three usage levels
UsageSteps a monthOpus 5.5Sonnet 5.5
Light: 40 steps a day on 8 days a month: a few small fixes twice a week320$17.28$8.64
Daily: 300 steps on each of 22 working days6,600$356.40$178.20
Heavy: 940 steps on each of 22 working days, the pace of our measured day20,680$1,117$558.36

For comparison: Pro $20, Max 5x $100, Max 20x $200 a month. API list prices as of 2026-11-12; US plan prices checked on 2026-10-08.

  • Light use costs $17.28 a month on Opus 5.5, less than Pro. On Sonnet 5.5 it’s $8.64. If you code with Claude a couple of times a week and don’t use Claude chat, the API is a fair choice.
  • Daily use costs $356.40 on Opus 5.5, 3.6 times the price of Max 5x, and $178.20 on Sonnet 5.5. If a plan’s limits cover this much work, it costs a fraction of the API.
  • Heavy use at a full working day’s pace costs $1,117 a month on Opus 5.5. This is the kind of all-day use Max 20x is aimed at.

Real sessions are often bigger than our moderate step. The session we measured on 2026-10-08 was never cleared, so its median request carried 426,571 tokens of context. Its 940 requests would cost about $121.52 for that single day at Opus 5.5 list prices, and $1,792 without prompt caching. Keeping context small is the subject of our guide to reducing Claude Code token usage, and a lean project file from the CLAUDE.md generator helps too, since it’s re-sent with every step.

What extra costs can appear?

A few things use tokens beyond the prompts you type. On a plan they spend your allowance; on the API they add to the bill:

  • Subagents and parallel work. Every subagent sends its own requests on top of your main conversation, so fanning out to many at once finishes sooner but spends more.
  • Agent teams. Each teammate is a separate Claude Code instance with its own context window. Anthropic’s costs docs put teams at roughly 7 times the tokens of a standard session when teammates run in plan mode.
  • Cache misses. The first message after a break longer than the cache lifetime re-sends your whole context at the full input price. Prompt caching explained covers how the cache works.
  • Thinking. Extended thinking is billed as output tokens, and on the current Opus, Sonnet and Haiku models it can’t be turned off; lower the effort level for simple tasks.
  • Background and scheduled work. Scheduled tasks and idle check-ins send your full context each time they fire, and Claude Code spends a small amount on background jobs such as summarising sessions for --resume.

How much do developers actually spend on Claude Code?

Anthropic publishes one figure, for organisations on API-style billing. Its cost documentation says: “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.” It adds that costs vary widely with the model, codebase size and habits such as running several instances, and suggests a small pilot to set a baseline.

Our daily example works out to $16.20 per working day on Opus 5.5, within the $30 a day that Anthropic says 90% of users stay below. To price your own token mix with caching and batch discounts, use the LLM cost calculator; for the method behind estimates like these, see how to estimate LLM API costs. Current per-token rates for every Claude model are on our models page.

Claude Code for teams: Team, Enterprise or the Console?

Anthropic’s docs recommend Claude for Teams or Enterprise for most organisations, with the Console for teams that prefer API billing. What differs is how usage is capped and reported:

  • Team: Claude Code is included with every seat. Each member’s allowance resets on a five-hour and a weekly window and is shared with Claude chat. Standard seats give more usage than Pro; Premium seats give 5x Standard.
  • Enterprise: a seat fee plus usage billed at API rates, billed annually. On usage-based plans there are no per-seat limits; admins set spend limits for the organisation, groups or members.
  • Console: per-token billing to your API organisation, workspace spend limits, and per-user spend and accepted lines in the Console dashboard or the Claude Code Analytics API. Pinning a default model for everyone in Claude Code settings keeps costs predictable.

On Team and seat-based Enterprise plans, admins can also turn on usage credits so members keep working past their allowance. Anthropic’s consumption guide tells admins to budget more for a coding seat than a chat seat, because each Claude Code turn carries file contents, tool calls and multi-step reasoning.

Using Claude Code through Amazon Bedrock or Google Cloud

Claude Code can also run on your company’s AWS or Google Cloud account. You pay per token at your cloud provider’s rates, and spending shows in your cloud billing console. Anthropic’s analytics dashboards don’t cover this usage, so per-user costs come from OpenTelemetry or a gateway. Run claude, choose 3rd-party platform at the login prompt, and a wizard sets it up. Or set the variables yourself:

Environment variables from the Claude Code docs
# Amazon Bedrock
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1

# Google Cloud's Agent Platform (formerly Vertex AI)
export CLAUDE_CODE_USE_VERTEX=1
export CLOUD_ML_REGION=global
export ANTHROPIC_VERTEX_PROJECT_ID=YOUR-PROJECT-ID
  • Pin your models. On both clouds the default primary model is Opus 5.5, so an unpinned setup is billed at Opus rates. Set ANTHROPIC_MODEL, or the ANTHROPIC_DEFAULT_OPUS_MODEL and ANTHROPIC_DEFAULT_SONNET_MODEL variables, to the model IDs your account has enabled.
  • Expect shorter caching. The prompt cache lives with your cloud provider and lasts five minutes by default. ENABLE_PROMPT_CACHING_1H=1 requests an hour, at a higher cache-write price.
  • Some features differ. For example, the web search tool isn’t available on Bedrock.

FAQ

Questions people ask

Is Claude Code free?

The software is free to install, but using it isn’t. You need a paid Claude plan (Pro, Max, Team or Enterprise), a Console account that pays per token, or a cloud account on Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry; the free Claude plan doesn’t include it. Some guides route Claude Code to other providers’ free models through compatible endpoints, but that’s unofficial, uses different models and can break with updates.

How much does Claude Code cost per month?

On a subscription it costs your plan’s price: Pro at $20 a month, or $17 a month billed annually, or Max at $100 or $200 a month. On the API there’s no monthly fee; you pay per token, so a month can cost a few dollars or hundreds depending on how much agent work you run. Anthropic publishes an average per developer in its Claude Code costs docs.

Is Claude Max worth it for Claude Code?

It is if you regularly hit Pro’s five-hour or weekly limits, run long agent sessions or use Claude Code most of the working day. Max raises those limits 5 or 20 times over; it doesn’t add coding features. If you code with it a few times a week, Pro is usually enough. /usage shows how close you get to each limit.

Is Claude Pro enough for Claude Code?

For occasional, focused tasks, often yes. Pro’s allowance is shared between Claude chat and Claude Code and resets every five hours, with a weekly cap on top. Anthropic’s own advice is to consider Max 5x if you consistently hit Pro’s limits. Run /usage in Claude Code to see how much of each window you’ve used.

Why am I being charged API rates when I have a subscription?

Claude Code is probably using an API key instead of your subscription. A set ANTHROPIC_API_KEY environment variable takes precedence over a claude.ai login once you approve it. Run /status to see which credential is active, unset the variable, and run /login with your subscription account.

What happens when I hit my Claude Code limit?

Claude Code stops sending requests until the time shown in the message. You can wait, and Claude Code can continue the task after the reset. If only an Opus or Sonnet limit was hit, switch model family with /model. You can also turn on usage credits, billed at API rates, with /usage-credits, or upgrade your plan.

Try it

Tools from this guide

Keep reading

Keep exploring