Claude Code costs

How much does Claude Code cost, and how do you control it?

Claude Code costs around $13 per developer per active day across enterprise deployments, running between $150 and $250 per developer each month. Costs stay below $30 per active day for 90% of developers, but an unmonitored loop or a loose context window will run your bill up quickly.

You pay for Claude Code in one of two ways: through a flat Claude subscription starting at $20 a month, or by feeding it an API key and paying raw token costs as you build.

Subscription plans vs API billing

Claude Code isn't included in the free Claude tier ($0). If you want terminal access through a subscription, you need a paid account.

Subscribers get Claude Code bundled into their tier without per-token billing, but your terminal commands share the exact same usage pool as your browser chats on claude.ai. Pro costs $20 a month on a monthly cadence, or $17 a month when you pay annually ($200 up front). When you hit the ceiling on Pro, Max runs $100 a month for 5x Pro usage every 5 hours and every week, including Fable up to half your weekly limit and $100 in monthly API credits. Ultra costs $200 a month, which removes the 5-hour limit for verified accounts, pushes weekly volume to 10x Pro, and provides $200 in monthly API credits.

For groups, the Claude Team plan requires 2 to 150 members. Standard seats run $25 per seat monthly or $20 annually, while Premium seats run $125 monthly or $100 annually for 5x the Standard usage. Both seat types draw from a per-seat allowance and include up to $500 a month in pooled API credits. Claude Enterprise charges a base fee of $20 per seat per month on an annual contract with a 20-seat minimum, but all usage on Enterprise gets billed separately at raw API token rates.

PlanBase priceBilling modelIncluded usage limits
Free$0NoneClaude Code not included
Pro$20/mo ($17/mo annual)SubscriptionStandard shared limit
Max$100/moSubscription5x Pro limits every 5h and weekly, $100 API credits
Ultra$200/moSubscription10x Pro weekly, no 5h limit for verified, $200 API credits
Team (Standard)$25/seat/mo ($20 annual)SubscriptionPer-seat allowance, up to $500 pooled API credits
Team (Premium)$125/seat/mo ($100 annual)Subscription5x Standard allowance, up to $500 pooled API credits
Enterprise$20/seat/mo (20-seat min)Seat + APIPer-seat allowance plus usage billed at API token rates

If you authenticate Claude Code with an API key instead, you bypass subscription limits and pay directly for the tokens you burn. What does that look like on your card? Fable 5.1 runs $10 per million input tokens (MTok) and $50 per MTok output, with prompt caching reads at $0.25 and writes at $12.50. Opus 5.5 costs $4 per MTok input, $20 per MTok output, $0.20 for cache reads, and $5 for cache writes. Sonnet 5.5 cuts that down to $2 input and $10 output, with cache reads at $0.10 and writes at $2.50. Haiku 5.5 is the cheapest option: for prompts up to 100K tokens, you pay $0.10 per MTok input and $0.50 output, while prompts over 100K tokens rise to $0.50 input and $2.50 output. If your traffic requires US-only inference, Anthropic adds a 1.1x multiplier to input and output tokens, and running Opus 5.5 in fast mode doubles your token price to 2x for up to 2.5x faster speed. If you need standard model rates, review What does the Claude API cost per million tokens? for full breakdowns.

Tracking costs in your terminal: /usage and /insights

The primary way to see what you're spending while coding is the /usage command.

/usage

What you see depends on how you logged in. API users see a Session block with total tokens and an estimated dollar figure. Pro, Max, and Ultra subscribers don't see session dollar figures because their usage is covered by their subscription; instead, they see plan usage bars, activity stats, and a usage breakdown. Claude Code calculates the session dollar figure locally from token counts at list price, but an admin can deliver a modelPricing table via managed settings so the screen reflects your negotiated rates instead.

Keep in mind that session totals in /usage reset to $0 whenever you run /clear to start a fresh session. (Before v2.1.211, those totals kept climbing across clears until you killed the terminal process). If your API calls incur the 1.1x data residency rate, Claude Code applies that 1.1 multiplier directly to the session cost, the status line cost field, and your --max-budget-usd limit.

In Claude Code v2.1.251 or later, the Session block includes a Prompt cache (main) line that shows your request count, cache misses, whether the cache is warm, and the share of input tokens served straight from cache. On Pro, Max, Ultra, Team, or Enterprise plans, the breakdown shows attribution for subagents, skills, plugins, and MCP servers. You can press d or w to toggle between the last 24 hours and the last 7 days of local session history. If you're on v2.1.305 or later and notice recommendations for behaviors taking up 10% or more of your usage, you can simply press f to have Claude Code run /effort tweaks or show suggested fixes automatically.

When the usage endpoint gets rate limited or fails, Claude Code won't crash; it displays the last usage bars loaded on your machine within the past 60 minutes with a Showing last-known usage label, and you can hit r to retry.

Want to spot longer trends across projects? Run /insights.

/insights

Claude Code analyzes up to 200 recent local sessions, skips the very short ones, and writes an HTML report to ~/.claude/usage-data/report.html highlighting friction points and heavy routines. It cleans up after itself by deleting reports older than cleanupPeriodDays (which defaults to 30 days) on startup. If you're on a subscription and hit your cap, you can run /usage-credits after signing in via /login to manage extra credits, but that command won't work if you authenticate with an API key.

Workspaces, spend caps, and cloud deployments

When you first authenticate Claude Code with your Claude Console account, Anthropic automatically spins up a dedicated workspace called "Claude Code" inside your console. You cannot create API keys inside this workspace; it exists exclusively to isolate terminal usage so you can set spend limits and track development bills separately from your production pipelines. For help setting those caps, read How do I cap my Claude API spend?.

On Team and Enterprise plans, each seat draws from an allowance that resets across two distinct cycles: a rolling 5-hour window and a weekly window. That allowance covers Claude Code, Cowork, and browser chats combined. If you manage an Enterprise org, the Primary Owner can generate an API key with the read:analytics scope at claude.ai/analytics/api-keys and pull per-user spend data directly through the Enterprise Analytics API.

For organizations on contracted API rates, admins can push a modelPricing block using server-managed settings, an MDM policy, a policy helper, or managed-settings.json. Claude Code ignores modelPricing if you try to put it in user, project, or local settings files. You need v2.1.242 or later for custom pricing, and v2.1.271 or later if you apply markups higher than 1.

If you deploy Claude Code across a team, Anthropic recommends sizing your rate limits according to head count:

  • 1 to 5 users: 200k to 300k TPM and 5 to 7 RPM per user
  • 5 to 20 users: 100k to 150k TPM and 2.5 to 3.5 RPM per user
  • 20 to 50 users: 50k to 75k TPM and 1.25 to 1.75 RPM per user
  • 50 to 100 users: 25k to 35k TPM and 0.62 to 0.87 RPM per user
  • 100 to 500 users: 15k to 20k TPM and 0.37 to 0.47 RPM per user
  • 500+ users: 10k to 15k TPM and 0.25 to 0.35 RPM per user

What if you run your workloads on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry? In those setups, Claude Code bills per token directly to your cloud provider invoice. Spend controls stay inside your AWS, GCP, or Azure console, and Claude Code sends no metrics back to Anthropic. To track per-user spend on third-party clouds, you'll need OpenTelemetry, a self-hosted Claude apps gateway, or an LLM gateway such as LiteLLM.

Five practical ways to cut token waste

Most inflated Claude Code invoices come from unpruned context or background processes running wild. Here is how to keep daily usage tight:

First, rein in extended thinking. Thinking tokens are billed as output tokens, which get expensive when a model generates tens of thousands of reasoning steps for trivial edits. You can dial down thinking with /effort, configure it in /model, disable thinking inside /config, or export MAX_THINKING_TOKENS=8000 in your environment for models with fixed thinking budgets. But you can't turn off thinking on Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable models; those models always use extended thinking.

Second, slim down your CLAUDE.md. Claude Code injects CLAUDE.md into the context window at the start of every session, so a giant file burns tokens on every single prompt. Anthropic advises keeping CLAUDE.md under 200 lines and offloading project-specific checklists into on-demand skills that load only when called.

Third, know the difference between /compact and /clear. The /compact command reads your existing conversation to produce a summary, so compacting an enormous context window is itself a massive, expensive request. If you're switching to an unrelated task and don't need prior context, /clear resets your session immediately and costs nothing.

Fourth, disable idle goal check-ins. In Claude Code v2.1.236 or later, the CLI triggers up to 3 idle check-ins per goal while waiting for background tasks to complete, sending the entire context window with each check. If you leave goals waiting often, shut check-ins off entirely by setting the environment variable:

export CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0

Fifth, avoid agent teams unless you genuinely need them. Multi-agent swarms are turned off by default, and enabling them via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 causes teammates in plan mode to consume roughly 7x more tokens than standard sessions because every teammate spins up a separate Claude instance with its own context window.

Automated cost monitoring with Costbrake

If you use API keys to run Claude Code across your team, Anthropic won't kill your keys automatically when someone kicks off a runaway script.

Costbrake connects to Anthropic, AWS, Google Cloud, Azure, and 19 other providers to track live spend across your infrastructure. The platform runs usage checks hourly on the Free plan ($0 for 2 connections and 3 budgets) and every 5 minutes on the Pro ($12/mo) and Team ($39/mo) plans, stepping up to 1-minute checks during an active spike. You can check Costbrake pricing for seat limits and features.

Costbrake triggers a spike alert when an hour costs more than 3x your 7-day baseline and at least $5 above normal, alongside automated warnings at 50%, 80%, and 100% of your budget. If your monthly run rate is climbing too fast, a forecast alert flags that your last 72 hours of activity will blow past your budget by month-end. Alerts deliver via email on all tiers, with Slack, Discord, and webhooks on Pro, and PagerDuty on Team.

For Anthropic, Costbrake uses an Admin key (sk-ant-admin) to monitor the Usage and Cost report APIs. If an engineer leaves an agent loop burning tokens overnight, you don't have to wait for your monthly invoice: Costbrake includes opt-in brakes on Pro and Team that let an admin disable an individual compromised key or shut down all active keys in a workspace with a single click. A brake never runs on its own; it requires an admin confirmation, logs the prior state, and has an immediate undo.

Every new workspace gets a 14-day Pro trial with no credit card required. You can tell your coding assistant to handle agent setup or connect your Anthropic workspace manually at https://app.costbrake.com/signin. For credit replenishment mechanics, see How do Claude API credits work, and what happens when they run out?.

Questions and answers

Is Claude Code included in Claude Pro?

Yes. Claude Code is included in all paid Claude subscriptions (Pro, Max, Ultra, Team, and Enterprise) and draws from your normal plan usage allowance. It isn't available on the Claude Free tier.

How much does Claude Code cost per developer on average?

Across enterprise deployments, average spend runs around $13 per developer per active day and $150 to $250 per developer per month. About 90% of active developers stay below $30 per day.

Why did my session cost in /usage reset to zero?

Session cost totals in /usage reset to $0 whenever you run /clear to start a new session. If you want to review local usage across the last 24 hours or 7 days, check the usage breakdown in /usage, or run /insights to generate a report on work patterns and friction points across up to 200 recent sessions.

Can I turn off extended thinking to save money in Claude Code?

You can lower thinking effort using /effort, turn thinking off in /config, or set MAX_THINKING_TOKENS on supported legacy models. But extended thinking cannot be disabled on Opus 5.5, Sonnet 5.5, Haiku 5.5, or Fable models.

Does /compact cost tokens?

Yes. Compacting reads your conversation history to summarize it, which makes /compact a large API request when run against a heavy context window. When you don't need conversational history, running /clear starts fresh at zero cost.

Sources

Updated