← All guides
Model guides · 9 min read

Claude Code Cost: Subscription vs API Billing, Calculated

What Claude Code really costs on Pro, Max, and Team plans versus pay-per-token API mode — with the numbers to decide which fits your usage.

Updated Aug 13, 2026 · Reviewed by PromptCostLab
A developer typing on a laptop during an outdoor coding session
Agentic coding tools consume tokens very differently from chat — caching decides the bill. Image: Jexo / Unsplash

Token and pricing information changes frequently. Use this guide for planning and verify model-specific limits and prices with the provider before production billing.

Two ways to pay for the same tool

Claude Code bills one of two ways. Subscription mode (Pro, Max 5x, Max 20x, Team Premium seats) grants weekly hour allowances of model usage — simplest for individuals. API mode attaches your own Anthropic API key or usage credits and bills every token at standard rates, which is what teams centralizing spend usually want.

The decision is a break-even question: how many tokens does your weekly coding actually consume, and does that number cost more or less than the plan price?

What the subscriptions include

Verified August 2026 from Anthropic's pricing and Claude Code cost documentation:

  • Pro: $17/month billed annually ($20 monthly) — about 45 hours per week of Sonnet-equivalent usage.
  • Max 5x: $100/month annual ($120 monthly) — about 140 Sonnet-hours or 35 Opus-hours per week.
  • Max 20x: $200/month annual ($240 monthly) — about 560 Sonnet-hours or 140 Opus-hours per week.
  • Team: Standard seat $25/month annual ($30 monthly); Premium seat $150/month includes Claude Code with higher limits.
  • Cache TTL matters: subscription sessions cache for 1 hour; API-key and usage-credit sessions default to 5 minutes.

What API mode costs

API billing uses the standard model rates: Claude Sonnet 5 at $2 input / $10 output per million tokens, Opus 5 at $5/$25, Fable 5 at $10/$50. The decisive lever is caching: cache reads cost 10% of input ($0.20 per million on Sonnet 5), and agentic coding re-reads the same project context constantly. A 5-minute cache write costs 1.25x input; the 1-hour write costs 2x and is usually worth it for long sessions.

Anthropic's published enterprise reference points: roughly $13 per active developer-day, $150–250 per developer-month, with 90% of users under $30 on an active day. Multi-agent teams consume about 7x the tokens of a solo session; background sessions run under $0.04 each.

A realistic break-even estimate

An active full-time developer using Claude Code on Sonnet 5 might drive 50–150M input tokens and 5–15M output tokens in a month, depending on caching. At list prices with a 90% cache-hit rate on the prefix-heavy share, that lands between roughly $150 and $450 — but the same usage with poor cache discipline can double. Against Max 5x at $100–120 or Max 20x at $200–240, subscriptions win for consistent heavy individual use; API mode wins for bursty, auditable, or team-pooled usage.

Use the PromptCostLab Claude Code cost calculator to plug in your own session hours, model mix, and cache assumptions — it compares plan tiers against projected API spend directly.

Why caching decides the bill

Claude Code re-sends your project context — instructions, opened files, conversation history — with nearly every request. When that prefix is stable, cache reads at one-tenth of input price apply to most of it. When something near the top changes, the cache invalidates and the full prefix re-bills at fresh-input rates.

Practical cache discipline: keep CLAUDE.md and tool configuration stable during a session, avoid churn in the earliest files you open, and prefer starting fresh contexts for unrelated tasks over dragging one giant context across everything.

Choosing a model inside Claude Code

Sonnet 5 is the workhorse for everyday edits and reviews. Opus 5 buys harder reasoning at 2.5x the input price and 2.5x output. Fable 5 — always-on extended thinking billed as output at $50 per million — is for genuinely hard architecture and debugging where thinking time pays for itself. Routing most work to Sonnet and escalating selectively is the standard cost-control pattern.

Frequently asked questions
How much does Claude Code cost?

On subscription: Pro is $17/month (annual) or $20 month-to-month with roughly 45 Sonnet-hours per week; Max 5x is $100/$120 for about 140 Sonnet-hours; Max 20x is $200/$240 for about 560 Sonnet-hours or 140 Opus-hours. On API billing you pay per token at standard rates — Sonnet 5 at $2/$10 per million — which suits heavy or team-metered usage.

Is Claude Code included in the Pro plan?

Yes. Claude Code is included in Pro, Max 5x, Max 20x, and Team Premium seats. Pro covers light daily use (~45 hours a week of Sonnet-equivalent work); heavier agentic use hits limits quickly and points to a Max plan.

How do I reduce Claude Code token costs?

Keep the reusable context — CLAUDE.md instructions, project files, and conversation prefix — stable so prompt caching applies (reads cost one-tenth of fresh input). Clear context between unrelated tasks, run focused sessions instead of marathon ones, prefer Sonnet for routine work, and reserve flagship models for hard problems.

Sources & further reading

Prices, token behavior, and model limits change. These primary provider docs are the right place to verify the details before shipping.

Put this into practice.Paste your own prompt into the calculator and see its context and cost tradeoffs.Open PromptCostLab calculator →