Blog

Claude Code cost per month: plans vs API pricing

Claude Code is free to install. You pay either a flat Claude subscription (Pro, Max 5x, Max 20x, Team or Enterprise) with usage limits, or per token through an API key with no ceiling. On the API, re-sent context drives the bill: one real 938-turn session cost $154 on Sonnet and $771 on Opus at list prices.

$154
938-turn session on Sonnet, list prices
$771
the same session on Opus
72.3%
less through condense

Two ways to pay for Claude Code

A subscription caps your spend but can stop you mid-task. An API key never stops you but never caps you. More in subscription vs API key.

Claude subscriptionAnthropic API key
What you payFlat monthly plan pricePer token, per request
What limits you5-hour window and weekly capYour budget and rate limits
How you check it/status/cost and the Console
Cost of a heavy dayNothing extra, until you hit the limitGrows with every turn
Fits bestOne person coding most daysLight, bursty or automated use

Claude Code pricing on a subscription

Pro, Max 5x and Max 20x include Claude Code; prices vary by region, so check Anthropic's pricing page. What you buy is an allowance shared with claude.ai, metered over a five-hour window and a weekly cap.

  1. 1
    Pro

    The base allowance. Opus draws it down faster than Sonnet.

  2. 2
    Max 5x and Max 20x

    Named for usage relative to Pro. See is Claude Max worth it.

  3. 3
    The limits

    How the windows work: weekly and 5-hour limit explained.

Claude Code cost per token on the API

The API bills four token types at different rates. Claude Code caches automatically, so almost everything it reads is a cache write or read (full breakdown).

Token typeWhat it isRelative price
InputNew context not read from cacheBase rate
Cache writeContext stored for reuse on later turnsSlightly above input
Cache readContext re-read from the cacheSteep discount to input
OutputThe model's reply, including tool callsSeveral times input

What real Claude Code sessions cost

The first ten steps of a 200-turn session cost about a dollar; all 200 cost about thirty times that, because each step carries everything before it.

Cost at list prices, cache tiers included
Real sessions, replayed and priced from provider usage
200 turns, first 10 steps, Opus
$1.06
200 turns, Opus
$33.61
938 turns, Sonnet
$154
938 turns, Opus
$771
Treat these as the shape of a bill, not a quote. From the agent quality evaluation (200 turns) and the anatomy of a token bill (938 turns).

What drives the Claude Code bill

Session length matters most, then context size, and model choice multiplies both. The replies people price in their heads are a minority.

Where the money went
12 real sessions, 18,333 assistant turns
  • cache read67.7%
  • cache write18.9%
  • output13.2%
  • uncached input0.2%
Old context re-read every turn is two thirds of spend. From the anatomy of a token bill.

Claude Code tokens to dollars: estimating your own cost

  1. 1
    Price each tier

    Tokens per tier times its rate, or just read /cost on an API key.

  2. 2
    Scale to a month

    Typical task cost times tasks per day times working days, plus retries.

  3. 3
    Count per finished task

    A cheaper model that needs more turns can cost more. See cost per task vs cost per token and cost per developer.

How to lower Claude Code cost

/clear between tasks, lean CLAUDE.md and MCP, Sonnet for routine work (full list). condense compresses the re-read history those habits miss.

SessionList priceThrough condense
938 turns, Sonnet$154$43 (72.3% less)
938 turns, Opus$771$214 (72.3% less)
200 turns, Opus$33.61$18.53 (45% less)

Under roughly 20 turns there is little to gain; on a subscription it means up to 3× more work from your plan. Free tier with 25M saved tokens a week, paid tiers from $5 a month, 15% of savings on the API (pricing). Install with curl -fsSL https://cli.condense.chat/unix | sh and run dense claude.

Frequently asked questions

How much does Claude Code cost per month?

On a subscription, the plan price on Anthropic's pricing page. On an API key it depends on usage; one long session we measured cost $154 at Sonnet list prices.

Is Claude Code free?

The CLI is free, but it needs a paid Claude plan or an API key with credit to do any work.

How do I see what a Claude Code session cost?

Run /cost on an API key. On a subscription, /status shows plan usage instead of dollars.

Why is my Claude Code bill so high when the answers are short?

Each turn re-sends the whole session. Across twelve sessions, cache reads were 67.7% of spend and output only 13.2%.

Is Opus much more expensive than Sonnet in Claude Code?

Yes. The same 938-turn session cost $154 on Sonnet and $771 on Opus at the list prices of the time.

All posts