How much Claude Code costs per month — and what actually drives the number

Claude Code has no subscription fee on top of the API. Your bill is token spend, and it is driven by one thing almost nobody tracks: how much context each turn resends. Understand that and the bill becomes predictable.

In short: Claude Code has no subscription fee, the bill is pure token spend. The dominant factor is not message count but how much context each turn resends: a long thread resends the whole conversation on every request. Compacting threads and matching the model to the task are the two levers that move the number most.

The three numbers that decide your bill

  1. Context size per turn. Claude Code sends the accumulated conversation on every request. This is the dominant factor, not message count.
  2. Turns per session. An agent loop that runs 40 tool calls is 40 billed requests, each carrying the context.
  3. Model rate. The per-million-token input and output price of the model you selected.
Cost note. Output tokens usually cost several times more than input. A model that writes long explanations before acting is more expensive than one that acts directly This is a real, measurable difference between models, not a style preference.

Current rates

Claude models commonly used with Claude Code — gateway rate vs official list
ModelGateway rate
in / out per 1M tokens
Official list
in / out per 1M tokens
Diff
claude-haiku-4-5$0.5 / $2.5$1 / $550%
claude-sonnet-5$1 / $5$2 / $1050%
claude-opus-5$2.5 / $12.5$5 / $2550%

Rates checked 2026-11-01. Gateway rates move with upstream promotions, verify the current number in your dashboard before committing to a budget.

What that means in practice

Take a realistic working day: 15 sessions, each with about 30 turns, averaging 40k tokens of context per turn. That is roughly 18M input tokens a day. At the rates above the difference between model classes is not marginal It is the difference between a coffee and a dinner, every single day.

Use the Claude Code cost calculator with your own session length rather than trusting a generic figure. Two developers can differ by 10x on the same model purely because of how they manage context.

Six ways to cut the bill without slowing down

LeverWhat it doesTypical effect
Compact long threadsRuns /compact to summarise history instead of resending itLargest single saving on long sessions
Start fresh per taskOne thread per task instead of one thread per dayHigh — avoids unrelated context being resent
Model per taskCheap model for mechanical edits, expensive one for hard reasoningHigh
Scope the repoKeep unrelated large files out of contextMedium
Cap output lengthLimit long explanations where you only need the diffMedium — output is the expensive side
Batch mechanical workOne well-specified request instead of ten exploratory onesMedium

See the full walkthrough in how to reduce Claude API cost.

How to verify your own number

Do not estimate from the CLI. Read the usage log on the provider dashboard, filter to a single day, and divide by the number of sessions you ran. That gives a per-session figure you can actually act on, and it is the only number worth optimising against.

Where the rate comes from

The rate you pay is whatever your provider charges per token It is not fixed by the tool. Comparing that per-token number across models is the highest-leverage check you can do, and it takes a minute in the cost calculator.

Check current rates → Free to sign up · $1 minimum top-up · No prepayment

How the bill is actually computed

Two numbers are metered separately and added: input tokens (everything you send, system prompt, conversation history, retrieved documents, tool results) and output tokens (what the model generates). Per-token, output is the expensive one (across the 226 models we track), the median output-to-input ratio is 4.0×, and the widest is 12.0×.

And yet on agent-shaped workloads the input side dominates the invoice. That is not a contradiction, it is arithmetic: an agent re-sends its entire context on every turn, so a turn that produces 800 output tokens may carry 60,000 input tokens. At a 4× unit price ratio, the input still accounts for roughly 95% of that turn's cost. Optimising output length on this workload is optimising the wrong end.

One agent turn priced at 60k input / 800 output, gateway rates, checked 2026-11-01
ModelInput / 1MOutput / 1M Output ÷ inputOne agent turnInput share of that turn
claude-haiku-4-5-20251001$0.500$2.505.0×$0.03294%
claude-sonnet-5$1.00$5.005.0×$0.06494%
claude-opus-5$2.50$12.505.0×$0.16094%

The practical reading: unit price decides, but token shape decides harder. A model that costs twice as much per token can still be cheaper end to end if it needs half as many turns to finish the task, and a prompt that carries 40k tokens of irrelevant history costs the same as one that carries 40k tokens of useful context. Before switching models, measure which side of the sum your workload actually lives on.

Where the money actually goes, ranked

Cost advice tends to be a list of tricks with no ordering. These five are ordered by how much they typically move a real bill, and each one names the number that tells you whether it worked.

LeverWhy it worksWhat to measure to know it worked
Switch to a cheaper modelUnit price drops across every token you send.Output quality on your actual task (not on a benchmark).
Cut context per requestInput is re-sent every turn on agent workloads; trimming it compounds.Tokens per task, before and after.
Cache the stable prefixA cached prefix is billed below the uncached rate where the provider supports it.Cache-hit rate in the usage response.
Move non-urgent work to batchBatch tiers trade latency for a lower rate; the work is identical.Nothing changes in quality, only in when it finishes.
Cap output lengthOnly helps when output genuinely dominates, which it does on generation tasks.Whether output is actually the larger half of your bill.

Concretely: one day at 1200k input / 16k output costs $3.20 on claude-opus-5 and $1.28 on claude-sonnet-5 (a difference of $1).92 per day, or $38.40 over a 20-day month.

The ordering is not universal, it depends on your token shape. On agent loops, context size outranks model choice; on bulk generation, model choice wins because there is no context to trim. Work out which half of the sum your workload sits on before spending effort on the wrong lever. Our output vs input pricing breakdown covers how to tell.

Why the estimate and the invoice disagree

SymptomWhat is actually happeningHow to confirmFix
A session that should cost pennies costs dollarsThe agent is resending a large context every turn, and input is billed each time.Divide total input tokens by number of turns If it matches the context size, this is it.Narrow the files in scope, or restart the session so the history resets.
Cost is flat but output quality droppedA cheaper model is being used for work that needed the expensive one.Check which model ID appears in the usage log for the failing sessions.Route mechanical tasks to the cheap model and keep hard reasoning on the strong one.
The bill jumps on days with no unusual workA retry loop, a failing test loop, or an unattended long-running session.Group usage by hour in the log, spikes usually align with one runaway session.Set a spend ceiling, and cap retries on failing tool calls.
Estimates never match the invoiceEstimates usually assume one pass; real sessions retry, branch and re-read files.Compare assumed turns per task against actual requests per task.Model cost per task, not per message, and measure it once before extrapolating.

FAQ

How much does Claude Code cost per month?

It is pure token spend There is no seat fee on top. A light user (a few sessions a day, short threads) lands in the low tens of dollars. A heavy user running long agent sessions every working day can reach several hundred. The multiplier is not the number of messages, it is how much context each turn resends.

Why does the cost grow so fast in long sessions?

Every turn sends the accumulated conversation back to the model. Input is billed per token each time, so a 200k-token context resent 50 times costs the same as sending 10M input tokens, even though you typed a few hundred words.

Does a cheaper model actually work for Claude Code?

For mechanical tasks, renaming, formatting, running tests, applying a described change, yes, and it is the single biggest saving available. Reserve the expensive model for the parts where a wrong answer costs you an hour.

How do I find out what I am actually spending?

Check the usage log on your provider dashboard rather than inferring it from the CLI. For a forward-looking estimate, use the Claude Code cost calculator with your real session length.

Is there a way to cap the bill?

Set a top-up ceiling on the account and keep conversations short. There is no per-request hard cap inside the CLI itself, so the account-level limit is the reliable brake.

How much does Claude Code cost per token?

Whatever your model's published rate is (Claude Code adds no per-token markup of its own). It bills input and output separately at the model's own rates, and the reason the number feels opaque is that the CLI decides how many tokens to send, not you: every turn resends the working context. That is also why output tokens dominate the bill on agent workloads.

Does Claude Code cost more in agent mode?

Yes, materially. Each agent turn re-reads the files in scope plus the accumulated history before it writes anything, so a session that looks like a handful of edits can consume a large multiple of the final diff in tokens. Narrowing what is in scope, fewer files, shorter sessions, a smaller CLAUDE.md (usually saves more than switching to a cheaper model).

Related

Get API access

Claude rate card