Skip to main content

How Much Does Claude Code Cost? Subscription vs API, Priced From Our Real Sessions

We priced four real Claude Code sessions at Opus 5.5 API rates, from $2.47 to $131.83, found most of the bill is re-reading context, and worked out when a subscription beats pay-as-you-go

Dark illustration: a terminal window listing one Claude Code session's cache read, cache write and output tokens, with Estimated cost $84.28 in large type; two labels on the right read API per token and Pro · Max · Ultra per month
Share
On this page

On November 30 we used Claude Code to build a trial-to-paid checkout flow for our site: page, backend and tests, 2 hours 18 minutes start to finish, 828 requests to the model. Priced at Anthropic's API rates, that one session comes to $84.28.

We didn't pay that, because the session ran on a Claude subscription. Claude Code has no price of its own. You either get it with a Claude plan (Pro at $20 a month, Max at $100, Ultra at $200), or you point it at the API and pay for every token. The Free plan doesn't include it.

Which one is cheaper depends on how you work, so we pulled the logs from four of our own sessions.

  • Every paid plan includes Claude Code. Pro is $20 a month ($17 billed annually), Max $100, Ultra $200. On the API, Opus 5.5 costs $4 per million input tokens and $20 per million output tokens (Claude pricing).
  • Heavy use gets expensive on the API. Our four sessions ranged from $2.47 to $131.83 at API rates. A couple of hours of real feature work cost about $84.
  • You mostly pay for re-reading context. Cache reads were 54% to 66% of each session's cost. The code Claude actually wrote was 16% to 20%.
  • The break-even point is low. Anthropic puts the average at about $13 per developer per active day. At that rate, two days of Claude Code a month already costs more than Pro, as long as you stay inside the plan's limits.

Two ways to pay for Claude Code: a monthly plan or per-token API billing

On a subscription, you sign in to Claude Code with your Claude account. Usage comes out of the plan's allowance, which Claude Code shares with claude.ai, the desktop app and the mobile app. When you run out, you wait for the allowance to reset.

The four plan cards on Claude's pricing page: Free $0, Pro $17 billed annually or $20 monthly, Max $100, Ultra $200
claude.com/pricing, November 30, 2026

On the API, you add credit in the Claude Console and sign Claude Code in with that Console account or an API key. Every request is billed by the token. There's no 5-hour window and no weekly cap. There is a monthly spend cap that depends on your account's usage tier, $500 on the entry Start tier; once you reach it, the API pauses until next month unless you request a higher tier in the Console. Here are the official rates for the models you can pick in Claude Code, in US dollars per million tokens:

ModelInputCache write (5 min / 1 hour)Cache readOutput
Opus 5.545 / 80.2020
Sonnet 5.522.50 / 40.1010
Haiku 5.50.100.125 / 0.200.010.50
Fable 5.2810 / 160.2040

Haiku 5.5 rates are for prompts up to 100,000 tokens. Keep an eye on the two cache columns, because in Claude Code they turn out to be most of the bill. The pricing page in the Claude Platform docs has the authoritative numbers.

How we measured

Claude Code keeps a log of every session under ~/.claude/projects on your machine. Each response in that log records the tokens its request used: uncached input, cache writes, cache reads and output.

We took four sessions from our dev machine between November 28 and 30, all of them work on the AIMacMini website:

  • Changing one payment setting: 8 minutes, 68 requests
  • Adding a "purpose" column and a filter to the payment records page in our admin panel: 40 minutes, 184 requests, 1 subagent
  • Building the trial-to-paid checkout flow across page, backend and tests: 2 hours 18 minutes, 828 requests, 5 subagents
  • Auditing every rule document in the project: 2 hours 35 minutes, 1,340 requests, 12 subagents

Every session used Opus 5.5, and the counts include subagent requests. Duration runs from the first message to the last, including the time we spent reading results and replying. We de-duplicated responses by message ID and priced each one at the official rates above. Then we ran the community tool ccusage over the same logs: it came out with the same four totals to the cent.

Four real sessions cost $2.47 to $131.83 at API rates

SessionAt API ratesDurationCache readsCache writesOutput
Change a payment setting$2.478 min6.7M85K22K
Add a column and filter$10.3340 min31.0M323K92K
Trial-to-paid flow$84.282 h 18 min279.0M2.5M680K
Audit all rule docs$131.832 h 35 min394.4M4.8M1.35M

Uncached input was a few hundred to about a thousand tokens per session, less than a cent, so it's left out.

Small jobs are cheap. Asking a question or changing one setting stays under a few dollars. What costs money is handing Claude Code an afternoon's worth of work: reading lots of files, running tests, sending subagents off in parallel. That's tens of dollars to over a hundred per session.

Chart: four Claude Code sessions priced at API rates, $2.47, $10.33, $84.28 and $131.83, each bar split into cache reads, cache writes and output, with cache reads the largest share

Most of the money goes to re-reading the conversation

You'd expect to pay mostly for the code Claude writes. In our logs, output was only 16% to 20% of the cost. The biggest line was cache reads, at 54% to 66%.

That comes from how Claude Code works. Every step (reading a file, running a command, editing code) is a new request, and every request carries the whole conversation so far: your instructions, the project's CLAUDE.md, every file it has read, every command's output. The longer the session, the more each step drags along. Anthropic's docs say the same thing: a one-line question in a session that has been open all day still draws usage for the whole conversation.

Prompt caching makes that resend cheap per token. On Opus 5.5 a cache read costs $0.20 per million tokens, one twentieth of normal input. But the trial-to-paid session read 279 million tokens from cache, $55.80 on its own.

So if you're paying per token, the habits that save money are all about context. Anthropic's cost guide lists the same ones:

  • Run /clear when you switch to an unrelated task instead of letting one session grow all day.
  • Use Sonnet for simple work, or turn the effort level down with /effort.
  • Disable MCP servers you aren't using and keep CLAUDE.md short, so every request carries less.

Anthropic's average is $13 per developer per active day

Anthropic publishes one benchmark in the Claude Code docs: across enterprise deployments, the average is about $13 per developer per active day, $150 to $250 per developer per month, and 90% of users stay under $30 per active day.

Claude Code docs, Manage costs effectively: across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users
Claude Code docs, November 30, 2026

Our two big sessions came to roughly 6 and 10 times that average. The difference is how we use it: Opus all the time, several subagents at once, sessions that run for two or three hours. If you mostly ask Claude Code to fill in a function or explain some code, $13 a day is believable.

Treat $13 as the number for typical use. Your own number depends on your habits, and the last section shows how to get it.

At $13 a day, Pro beats the API in two days

Here's Anthropic's average set against the three plans:

PlanMonthly priceAPI days at $13 per dayAPI days at $30 per day
Pro$20about 1.5under 1
Max$100about 8about 3
Ultra$200about 15about 7

If you use Claude Code on more than two days a month, Pro costs less than the API. Max takes about 8 days to pay for itself and Ultra about 15. Use it every working day and $13 a day comes to about $286 over 22 days, close to three times the price of Max.

That only holds while you stay inside the plan's limits. Plans have a 5-hour window and a weekly cap, and Anthropic doesn't say how many tokens either one is worth. When you hit one, you wait for the reset. How the limits work is in How Claude usage limits work. If Pro keeps cutting you off, Is Claude Max worth it? walks through when to move up.

When the API makes more sense

  • You only use it a day or two a month. If you fix a script now and then and otherwise leave it alone, pay-as-you-go may not reach $20.
  • You can't afford to stop during a crunch. The API has no 5-hour window or weekly cap, so you can keep going and pay for every token. Check your monthly spend cap beforehand and request a higher tier if it won't cover the week.
  • It runs unattended on a server. For Claude Code in CI or scheduled jobs on an API key, billing goes to a Console workspace, and you can set a spend limit per workspace.
  • A team needs per-person numbers. The Console dashboard shows each member's spend and accepted lines of code, which helps when you report costs or keep to a budget.

Work out your own number with /usage and ccusage

There are two quick ways to see what your usage would cost at API rates.

The first is /usage inside Claude Code. The Estimated cost in its Session block is the current session priced at API list rates. On the API, that's what you'll be billed; on a subscription, nothing is charged for it. Subscribers also get their plan's usage bars on the same screen, a breakdown of recent usage by skills, subagents and MCP servers, and suggestions for using less.

The second is ccusage, for history. It reads the Claude Code logs on your machine and prices them at API rates, per day, month or session. It doesn't need a login and doesn't send your conversations anywhere:

npx ccusage@latest daily
npx ccusage@latest session

ccusage is an open-source community tool, not something Anthropic ships. Claude Code deletes session logs older than 30 days by default, so you'll see about a month of history. We checked its numbers against our own per-response calculation and they matched.

If you're on a plan and ccusage says your month is worth a few hundred dollars, the subscription is doing its job. If it says $15, pay-as-you-go might be the cheaper option.

Getting a Claude plan when you can't subscribe directly

Subscribing on claude.ai at list price is the cheapest way in, if it works for you. It often doesn't from outside the countries Anthropic supports: you need a card it accepts, and the network, device and card you sign up with all feed into its risk checks. Once you have a plan, How to install Claude Code covers signing in with it.

AIMacMini sells all three plans as ready accounts on the Claude plans page. A US resident subscribes with a physical credit card in their own name and opens the account on US home broadband and a real device, and each account goes to one customer. Pro is $69.90, Max $249.90 and Ultra $399.90 for one month, above Anthropic's list price; the difference pays for making each account that way. By the math above, that makes sense if you use Claude Code most days. If you only use it now and then, run your own numbers first. Delivery is within 7 days of payment. Plans don't auto-renew, so if you want a different tier next month, buy that one.

Share

The official AIMacMini blog. Every price, rule and number in our articles links to its source and check date, and we update them when they change.

Start here

Ordered separately and delivered in order after payment.

Get a Claude subscription

Opened with a US physical card, one account per customer.

From $69.90/mo

Not sure which to pick? Talk to support