Claude Code cost: plans vs API tokens, /usage and 9 ways to spend less, with three usage bars and the commands /usage, /clear and --max-budget-usd 5
All articles

Claude Code cost: what you pay and how to spend less

Claude Code cost explained: plan prices vs API tokens, average spend per developer, /usage, --max-budget-usd, team spend limits and 9 ways to cut tokens.

Claude Code cost depends on one question before any other: are you paying through a Claude subscription or per token through the API? The same coding session can be "included" on one path and cost real dollars on the other. This guide explains both billing paths with current prices, how to see what a session costs with /usage, how teams cap spend, and the habits that cut token use the most.

Stop juggling terminal tabs.VibeiDE puts every agent in one Grid you can actually read.Try free

Every price, command and number below was checked against the official Claude Code cost documentation, the Claude pricing page and the CLI reference as of October 2026. Prices change, so check those pages before you budget.

How Claude Code is billed

Claude Code charges by token consumption, but who pays for those tokens depends on how you signed in.

Animated diagram: tokens from a subscription flow into a plan allowance meter with 5-hour and weekly windows, while tokens from an API key flow into a per-token bill where every request counts
A subscription draws from a plan allowance; an API key turns every request into a per-token charge. Usage credits add per-token spend past a plan limit.

On a subscription (Pro, Max, Team or Enterprise), your usage draws from a plan allowance. On Team and Enterprise the cost docs describe a per-seat allowance that resets on a rolling five-hour window and a weekly window, shared with Claude chat. You do not get a per-token bill until you turn on usage credits to keep working past the allowance.

On the API (a Claude Console account, Amazon Bedrock, Google Cloud or Microsoft Foundry), every token is billed to your organization. Here a long session is a direct line item.

If you sign in with claude auth login --console, you choose API billing instead of your subscription, so check which method you are using with claude auth status.

Subscription prices as of October 2026

These are the plans that include Claude Code, from claude.com/pricing:

PlanPriceClaude Code
Pro$20 per month, or $17 per month billed yearly ($200 up front)Included
MaxFrom $100 per month (5x and 20x tiers)Included
Team Standard seat$25 per seat per month, $20 billed yearlyIncluded
Team Premium seat$125 per seat per month, $100 billed yearlyIncluded
Enterprise$20 per seat per month billed yearly, 20 seat minimum, plus usage at API ratesIncluded

The Free plan does not include Claude Code. When you hit a plan limit, the docs list three options: wait for the window to reset, continue the interrupted task automatically after the reset, or use usage credits. Our guide to Claude Code usage limits covers the session and weekly windows in detail.

API token prices as of October 2026

On the API, cost is tokens multiplied by the model's rate. Per million tokens, from the same pricing page:

ModelInputOutputCache readCache write
Opus 5.5$4$20$0.20$5
Sonnet 5.5$2$10$0.10$2.50
Haiku 5.5 (prompts up to 100K tokens)$0.10$0.50$0.01$0.125

The cache columns matter more than they look. Claude Code resends your conversation with every request, and prompt caching lets most of it come back at the cache read rate. On Sonnet 5.5 that is $0.10 per million tokens instead of $2.

What a developer typically spends

The cost docs give enterprise averages for API-billed use: about $13 per developer per active day and $150 to $250 per developer per month, with 90% of users staying below $30 per active day. Your number depends on the model, the codebase size and how many instances or automations you run.

The docs recommend starting with a small pilot group and measuring a baseline before a wider rollout. That advice applies to individuals too: measure a normal week before you pick between Pro, Max or API billing.

Check what a session costs with /usage

Type /usage inside Claude Code. The Session block shows the estimated cost, API and wall time, code changes and tokens per model:

Total cost:            $0.55
Total duration (API):  6m 20s
Total duration (wall): 6h 33m 10s
Usage by model:
   claude-sonnet-4-6:  1.2k input, 5.3k output, 940.0k cache read, 50.0k cache write ($0.55)

That example from the docs shows the pattern most sessions follow: cache reads dwarf everything else. A few details worth knowing:

  • The dollar figure is computed locally at list price, so treat it as an estimate. Authoritative API billing lives on the Claude Console usage page.
  • On Pro and Max the session cost is not what you pay. Subscribers also get plan usage bars and a breakdown that attributes recent usage to skills, subagents, plugins and MCP servers. Press d or w to switch between 24 hours and 7 days.
  • The totals reset when /clear starts a new session.

To keep the cost visible all the time, the status line exposes the same cost field. Our Claude Code statusline guide shows a script that prints it.

Cap spend in scripts with --max-budget-usd

For headless runs, --max-budget-usd stops the run once estimated API spend reaches your amount. It works in print mode only:

claude -p --max-budget-usd 5.00 --max-turns 20 "fix the failing tests in src/auth"

Spend from subagents counts toward the cap, but the docs warn that spend can pass the cap, so leave headroom. --max-turns adds a second limit on agentic turns. See our Claude Code headless mode guide for the rest of the -p flags.

Where team spend is controlled

The right control depends on how your organization reaches Claude Code:

SetupSee spendCap spend
Team or Enterprise planSpend report in org analyticsSpend limits in admin settings, on top of the seat allowance
Claude Console (API)Console usage pageWorkspace spend limits
Bedrock, Google Cloud, FoundryYour cloud billing consoleYour cloud's budget controls

Console users get an automatic "Claude Code" workspace for tracking. For per-user numbers on any setup, the docs point to OpenTelemetry export. Admins who pay contracted rates can set the modelPricing managed setting so /usage and the status line report those rates instead of list price.

Nine ways to cut Claude Code cost

The cost docs list the habits that reduce token use. These have the largest effect in practice:

Animated bar chart: in one long session the tokens sent per message grow with every message because the history is resent, while with /clear between tasks each task starts small and stays flat
Claude Code resends the conversation with every request, so a long session costs more per message. /clear starts small again; /compact itself reads the whole conversation.
  1. Clear between tasks. Stale context is resent with every message. Use /rename, then /clear, and /resume later if you need the old session back. A /clear costs nothing; /compact reads the whole conversation it summarizes.
  2. Match the model to the job. Sonnet handles most coding work for half the Opus rate. Switch with /model, and give simple subagents model: haiku. See Claude Code models.
  3. Lower the effort level with /effort for simple tasks. Thinking tokens bill as output tokens.
  4. Watch the context. Run /context to see what fills the window. Our context window guide explains what survives compaction.
  5. Prefer CLI tools over MCP servers where one exists (gh, aws, gcloud), and disable unused servers in /mcp.
  6. Move workflow instructions out of CLAUDE.md into skills. CLAUDE.md loads every session; skills load on demand. The docs suggest keeping CLAUDE.md under 200 lines.
  7. Delegate verbose work to subagents. Test runs and log processing stay in the subagent's context; only a summary returns. See Claude Code subagents.
  8. Filter output with hooks. A PreToolUse hook can trim test output to failures before Claude reads it.
  9. Write specific prompts and use plan mode. "Improve this codebase" triggers broad scanning; a named file and function does not. Press Escape early and use /rewind when the direction is wrong.
Animated bar chart of API output prices per million tokens as of October 2026: Opus 5.5 $20, Sonnet 5.5 $10, Haiku 5.5 $0.50 for prompts up to 100K tokens
Output price per million tokens on the API, as of October 2026 (claude.com/pricing). Sonnet costs half of Opus; Haiku suits simple subagents.

Also watch for background usage. The docs name scheduled tasks, goal check-ins, agent teammates and cache misses after a break as reasons usage climbs in an idle session. Agent teams can use about 7 times more tokens than a standard session when teammates run in plan mode.

Where VibeiDE fits

VibeiDE is a desktop app that coordinates the Codex, Claude Code and OpenCode CLIs you already installed, and each user signs in to their own provider accounts, so subscriptions, usage and costs stay separate from the VibeiDE license. Its usage display shows provider-reported usage, remaining runway and reset countdowns where the provider reports them. Each project has its own task queue with a parallel limit per provider; those slots control how many processes run at once and do not raise a provider allowance. Read more about Claude Code rate limits in VibeiDE or Claude Code orchestration.

Takeaways

  • Claude Code is included in Pro ($20 per month), Max (from $100) and Team and Enterprise seats; on the API every token is billed, as of October 2026.
  • Enterprise averages are about $13 per developer per active day and $150 to $250 per month on API billing.
  • /usage shows a local, list-price estimate per session; the Claude Console shows the bill.
  • --max-budget-usd caps headless runs, but leave headroom.
  • The biggest savings come from /clear between tasks, Sonnet as the default model and lower effort for simple work.

Share this article

Post on XShare on LinkedIn

Related articles

Necessary cookies support sign-in, security, your language and this choice. Optional categories stay off until accepted.

First-party page views and acquisition measurement, plus Google Analytics 4 (Google Ireland, data may reach the US). Advertising personalization stays off.

With Analytics enabled, retain Google, Microsoft and Reddit ad click identifiers and share download, signup, activation and purchase conversions with the relevant ad provider. No personalized advertising.

Privacy · Cookie inventory