Skip to content

Claude Code Cost and Limits: 7 Days of Real Usage Measured

We added up every Claude Code request one machine made in a week: 2,818 requests that would have cost $149.44 at API prices, 60% of it writing to the prompt cache. Here are the official plan prices and limits next to those numbers, plus seven tests on spending less.

By the RanThis team, written with AI10 min read

Why trust this: every result, number and screenshot comes from a real run on our own accounts, not from the AI. How we test

Claude Code costs $20 a month on Pro, from $100 on Max, or whatever your tokens add up to on an API key. To see what that means in practice, we added up every Claude Code request one of our machines made in a week: 2,818 requests to Claude models, which would have cost $149.44 at API list prices. This page puts those numbers next to the official prices and limits, and links to the seven tests where we measured ways to spend less.

Measured on 24 Oct 2026 from the session files Claude Code wrote between 17 and 23 Oct 2026 on one Windows 11 PC (WSL, Ubuntu 24.04), signed in with a Claude Max 20x plan. Prices are from Anthropic's pricing pages, read the same day.

At a glance

Key results

  • A week on one machine came to $149.44 at API prices. 2,818 requests across 246 sessions: Opus 5.5 $99.81, Sonnet 5.5 $47.73, Haiku 5.5 $1.91. Our Max 20x plan costs $200 a month, about $46 a week, and it also covers our laptop, which is not in these numbers.
  • Writing to the prompt cache was 60% of the bill. Cache reads were 28% and output 12%. Uncached input came to about 2 cents for the whole week.
  • 93% of all tokens were cache reads. Output was 0.43% of tokens. Claude Code re-sends the whole conversation every turn; the cache is what keeps that affordable.
  • The typical request is large. Median context per request: 111,000 tokens on Opus, 79,000 on Sonnet, 23,000 on Haiku.
  • Most sessions are cheap, a few are not. Median session $0.32, 90th percentile $1.29, most expensive $8.29. The busiest day cost $78.83, the quietest $3.07.

Hands-on test

Setup

  • Machine: one Windows 11 PC with WSL (Ubuntu 24.04) that runs Claude Code most of the day: scheduled claude -p jobs, a set of agents that pick up tasks on their own, and our own test runs. Every request in the week came from Claude Code 2.1.302.
  • Plan: Claude Max 20x. On a subscription nothing is billed per request; the "cost" below is what the same requests would cost on the API.
  • Data: every .jsonl session file under ~/.claude/projects/ on that PC, including subagent files. A script read the usage block of each reply, counted each reply once (Claude Code writes one line per content block), and kept 17–23 Oct 2026. It read token counts only, not the conversations.
  • Prices: Anthropic's API list prices per million tokens on 24 Oct 2026, with the cache-write price for the TTL each request reported (5 minutes or 1 hour) and Haiku 5.5's higher price above 100,000 tokens.
  • Left out: 456 requests from our DeepSeek test, which went to DeepSeek's API, not Anthropic's; our laptop; and anything on claude.ai.

What Claude Code costs: plans and API prices

Way to payPriceWhat you get
Pro$20 a month ($17 a month billed yearly)Claude Code included, with usage limits
Max 5x / Max 20xFrom $100 a month (we pay $200 for Max 20x)5x or 20x Pro's usage per 5-hour session, plus $100 or $200 a month in API credits
Team$20–25 a seat a month (Standard), $100–125 (Premium)Claude Code included; each member gets an allowance that resets on a five-hour and a weekly window
API keyPay per tokenOpus 5.5 $4 in / $20 out, Sonnet 5.5 $2 / $10, Haiku 5.5 $0.10 / $0.50 per million tokens

The API credits that come with Max do not pay for Claude Code: they cover the Claude API, the Agent SDK, Managed Agents and the Console Playground. We walk through claiming them, and the organization mistake we made, in Claude Max API credits.

For a sense of scale, Anthropic's Claude Code docs say enterprise deployments average about $13 per developer per active day and $150–250 per developer per month, with 90% of users below $30 per active day. Our machine averaged $21 a day, but it is not one developer: much of its work is unattended agents.

What a week of real use cost

ModelRequestsMedian context per requestCost at API pricesShare
Opus 5.51,302111,000 tokens$99.8167%
Sonnet 5.51,21879,000 tokens$47.7332%
Haiku 5.529823,000 tokens$1.911%
Total2,818$149.44

By day it ran $6.17, $18.27, $5.25, $4.11, $3.07, $33.75 and $78.83 (17 to 23 Oct). The two big days were when several agents worked in parallel on long tasks; the quiet days were mostly scheduled jobs. Haiku was cheap partly because its typical request was short (23,000 tokens), but 62 of its 298 requests went over 100,000 tokens and paid Haiku's higher long-prompt price.

Subagent requests, the ones Claude Code logs under a session's subagents/ folder, came to $7.46, or 5% of the week. Almost all the money went to main conversations.

Where the money goes: the prompt cache

Every turn, Claude Code sends the whole conversation again: system prompt, tool definitions, history and every file it has read. The prompt cache means the model reads most of that at a fraction of the input price, but writing it to the cache first costs more than plain input.

Illustration: a tall stack of identical sheets fed onto a conveyor turn after turn, ending in one small stamped cardAI-generated illustration
Part of the requestShare of tokensShare of cost
Cache reads93.1%27.8%
Cache writes6.5%60.0%
Output0.4%12.3%
Uncached inputunder 0.01%0.01%

The reason cache writes dominate is the cache lifetime. Claude Code's prompt-caching docs say that on a Claude subscription, within the plan's included usage, Claude Code asks for a one-hour cache for the main conversation; subagents and most other side requests get five minutes. On Anthropic's price list a one-hour cache write costs twice the base input price ($8 per million on Opus 5.5, against $4), while a cache hit on Opus 5.5 or Sonnet 5.5 costs 0.05 times the base price ($0.20 on Opus). In our files, 84% of Opus cache writes and 100% of Sonnet cache writes were one-hour writes.

So the expensive moments are the ones that force a rewrite: starting a session, switching model mid-session, coming back after the cache expired, compaction. A long session that keeps reading a warm cache is, per token, the cheapest thing Claude Code does.

How the limits work

On Pro and Max, Claude Code does not charge per token; it draws from your plan's usage, which Anthropic counts per 5-hour session and per week. Pro gives at least 5x Free's usage per 5-hour session; Max gives 5x or 20x Pro's. /usage shows how much is left. When we ran it on 16 Oct 2026 it showed two bars, the current session and the current week, and a breakdown of what was eating them: 94–95% of our usage happened at more than 150,000 tokens of context. That breakdown, what each line means and how to act on it are in Claude Code usage limits: what /usage shows.

Three things to know:

  • /usage counts only the machine you run it on. Claude Code on another computer and claude.ai are not in its numbers, though they share the same plan.
  • With an API key, /usage shows the session's token cost instead of plan bars.
  • Usage credits let you keep working past your plan's limit; /usage-credits opens the setting, and it is not available when you sign in with an API key.

Seven tests on spending less

What we testedResultWrite-up
Fork subagents vs general-purpose subagentsForks cost about 36% less on the same job ($0.138 vs $0.217 a run), mostly from writing less to the cache, but Claude used them only when askedFork subagents
Opus writing a workflow that Haiku 5.5 runs, on a 200-file auditAbout 3.7x cheaper than Opus alone ($0.68 vs $2.49), 40 s slower, missed 1 of 12 bugsHaiku workflow audit
DeepSeek V4.1 Flash inside Claude Code, same auditAbout 12x cheaper than Opus ($0.20 vs $2.49), 4–5x slower, less consistentDeepSeek in Claude Code
Haiku 5.5 vs Sonnet 5.5 on three office tasks via the APIBoth 15/15; Haiku 18x cheaper and fasterHaiku vs Sonnet
What /usage says is eating the plan94–95% of usage at more than 150K contextUsage limits breakdown
Gzip on Claude Code's requestsAbout 0.3 s faster to first token on a 342K-token request; no saving in tokens or usageGzip requests
Claiming the API credits that come with Max$200 a month on Max 20x, but only in the organization you linkMax API credits

Put together with this week's numbers, the order we would try things in:

  1. Keep sessions shorter. /clear between tasks and /compact in long ones. Context size drives both cost and limits, and our typical Opus request was carrying 111,000 tokens.
  2. Put bulk reading on a cheaper model. Haiku 5.5 for the scan stage of a workflow, or as the subagent model. Check the result on a sample first: it missed a subtle bug Opus caught.
  3. Ask for forks when subagents need the same context. They wrote less than half as much to the cache in our test.
  4. Don't switch model in the middle of a session unless you need to: the next request reads the whole history again with no cache hits. Changing effort is safe on the 5.5 models; Claude Code's docs say their cache stays intact.
  5. Claim the Max API credits for scripts and apps that call the API directly. They won't extend your Claude Code limits.

What worked

What worked

  • Reading the session files gave a full week of real usage, not a benchmark: every request, every model, with the exact token split the API reported.
  • Pricing each request with the cache lifetime it actually used explained the bill. Without the one-hour write price, the total would have looked much smaller.

Where it fell short

What didn't work

  • We could not read the plan's own meter per request. /usage gives percentages for the machine, not per-request numbers, so we can say what the week would cost on the API, not what share of the Max limit each request used.
  • One machine, one week, a workload heavy on unattended agents. A developer typing in one session all day would have a different mix: probably fewer short sessions and more Opus.
  • We did not test the five-minute cache against the one-hour cache on the same work, so we cannot say how much a different TTL would save.

Our verdict

For daily use, a subscription is far cheaper than paying per token: one of our machines alone used about three times the weekly share of a $200 Max 20x plan, at API prices. On either kind of plan the cost is mostly context, not answers. Output was under half a percent of tokens and 12% of the money; writing and re-reading the conversation was the rest. Keep sessions short, push bulk reading onto Haiku or forks, and use /usage to see where your limit goes before buying a bigger plan.

Frequently asked questions

How much does Claude Code cost per month?

Claude Code is included in Pro ($20 a month, or $17 billed yearly) and Max (from $100 a month for 5x Pro's usage; we pay $200 for 20x), with usage limits. With an API key you pay per token instead. Anthropic's docs put enterprise use at about $150–250 per developer per month on average.

Is the Claude Max plan worth it for Claude Code?

For heavy use, it was for us. One machine's week of Claude Code would have cost $149.44 at API prices; the Max 20x plan costs about $46 a week and also covered our second machine.

Why is Claude Code so expensive on the API?

Because it re-sends the whole conversation every turn. In our week 93% of tokens were cache reads and 60% of the cost was writing to the cache, much of it at the one-hour cache price, which is twice the base input price.

Do the Max plan's API credits pay for Claude Code?

No. They cover the Claude API, the Agent SDK, Managed Agents and the Console Playground, not Claude Code or extra usage in the Claude apps.

How do I see my Claude Code usage?

Run /usage. On Pro, Max, Team and Enterprise it shows your session and weekly bars and what is using them; with an API key it shows the session's token cost. It only counts the machine you run it on.