How much does Claude Code cost?
Claude Code costs $20 a month on Pro, $100 or $200 on Max, or per token with API credits. Prices as of August 2026, with a worked monthly estimate.
How much does Claude Code cost?
Claude Code costs $20 a month on the Claude Pro plan, $100 or $200 a month on the two Max tiers, or a per token rate if you pay with API credits from the Claude Console. There is no free version. A subscription buys a usage allowance that Claude Code shares with Claude chat. API credits buy tokens, billed at a published rate per million tokens, with no monthly ceiling unless you set one. Every figure on this page is as of 2 August 2026.
Which path is cheaper depends on how many hours a day you run it, and on whether you need a hard spend cap. The numbers for both paths are below, along with a worked estimate for one developer working alone.
Is Claude Code free?
No. Claude Code has no free tier. Anthropic's setup documentation says it directly: Claude Code requires a Pro, Max, Team, Enterprise, or Console account, and the free Claude.ai plan does not include Claude Code access. You can install the command line tool without paying anything, and claude --version will print a version number, but the login step refuses a free account, so no session starts.
Two things get mistaken for a free tier. The first is the free Claude.ai plan, which covers chat on the web and in the apps and stops there. What the free Claude plan actually includes walks through where that boundary sits. The second is the small trial credit Anthropic gives a new Claude Console account for testing the API. That is a one time credit, not a monthly allowance, and when it runs out the requests stop.
The cheapest real entry point is Pro at $20 a month, or $17 a month if you pay for a year up front.
Subscription prices as of August 2026
The data behind this chart
[
{
"plan": "Free",
"price_usd": 0
},
{
"plan": "Pro",
"price_usd": 20
},
{
"plan": "Pro, billed annually",
"price_usd": 17
},
{
"plan": "Max 5x",
"price_usd": 100
},
{
"plan": "Max 20x",
"price_usd": 200
},
{
"plan": "Team, standard seat",
"price_usd": 25
},
{
"plan": "Team, premium seat",
"price_usd": 125
}
]Pro at $20 a month is the entry plan that includes Claude Code. Max comes in two sizes. Max 5x at $100 a month gives five times the per session usage of Pro, and Max 20x at $200 gives twenty times. Team is billed per person, $25 a month for a standard seat and $125 for a premium seat, both cheaper on annual billing. Enterprise is a seat price plus usage charged at API rates, quoted by sales.
What you buy on a subscription is an allowance, not a token budget you can inspect. Usage resets on a rolling five hour window, and the Max tiers add two weekly windows, one that applies across all models and one for Sonnet models only. That allowance is shared with Claude chat and Claude Cowork, so a morning spent in chat reduces what is left for coding in the afternoon. The full Claude tier chooser compares the plans against each other in detail.
What API credits cost per token
If you sign Claude Code in with a Claude Console account instead, there is no monthly fee. You buy credits and the tool spends them per token. MTok below means one million tokens.
The data behind this chart
[
{
"label": "Opus 5",
"input_per_mtok_usd": 5,
"output_per_mtok_usd": 25,
"cache_read_per_mtok_usd": "0.50"
},
{
"label": "Sonnet 5, to 31 Aug 2026",
"input_per_mtok_usd": 2,
"output_per_mtok_usd": 10,
"cache_read_per_mtok_usd": "0.20"
},
{
"label": "Sonnet 5, from 1 Sep 2026",
"input_per_mtok_usd": 3,
"output_per_mtok_usd": 15,
"cache_read_per_mtok_usd": "0.30"
},
{
"label": "Haiku 4.5",
"input_per_mtok_usd": 1,
"output_per_mtok_usd": 5,
"cache_read_per_mtok_usd": "0.10"
}
]Opus 5 costs $5 per million input tokens and $25 per million output tokens. Sonnet 5 is on introductory pricing of $2 and $10 through 31 August 2026, then moves to $3 and $15 on 1 September 2026. Haiku 4.5 is the cheapest row at $1 and $5.
The headline rate is not the whole bill. Claude Code re-sends your entire conversation with every request, so most of your input tokens arrive as cache reads, which cost a tenth of the base input price: $0.50 per MTok on Opus 5. Writing to the cache costs more than base input, 1.25 times the input rate for the five minute cache and 2 times for the one hour cache. Extended thinking is billed as output tokens, which is the expensive column above, so a model left on a high effort setting costs real money on every turn.
Model choice is the biggest lever you hold. Choosing which Claude model to run changes the same piece of work by a factor of five.
Which billing path costs less for your usage shape
A subscription fits interactive work. You sit at the terminal, you code for a few hours, you stop. The bill is fixed, and the ceiling you run into is a usage window rather than an invoice you did not expect.
API credits fit everything that is not a person typing. Scheduled jobs, continuous integration runs, scripted agents and per user cost reporting all need token billing, because a personal subscription allowance is tied to one human account and reports nothing per project. API credits are also the only path with a real spend cap, since workspace spend limits in the Claude Console stop spending at a number you choose.
The full comparison of API billing against a Claude subscription works out where the crossover sits, so this page will not repeat the argument. The short answer: if one person uses Claude Code on most working days, a subscription wins, and the decision is only close for light or very bursty use. If you are still choosing a tool at all, how Claude Code compares with the other coding agents puts the subscription prices next to each other.
A worked monthly estimate for a solo developer
Take one developer working alone, about three hours a day, 20 active days a month, Sonnet as the default model and Opus for the hard parts. Anthropic publishes two figures for token billed deployments as of August 2026: an average of about $13 per developer per active day, and spend staying below $30 per active day for 90% of users. Multiply each by 20 active days to get a month.
The data behind this chart
[
{
"label": "Pro subscription",
"price_usd": 20
},
{
"label": "Max 5x subscription",
"price_usd": 100
},
{
"label": "Max 20x subscription",
"price_usd": 200
},
{
"label": "API credits, published average",
"price_usd": 260
},
{
"label": "API credits, heavier tenth of users",
"price_usd": 600
}
]On token billing that developer pays around $260 a month at the published average, and about $600 if they land in the heavier tenth. Pro at $20 and Max 20x at $200 both sit under that.
Read the gap carefully, because it is not free money. Pro does not hand you $260 of tokens for $20. It gives you an allowance, and three hours a day of Sonnet with Opus on the difficult parts will reach the five hour window on busy days. The honest reading of this table is that Max 5x at $100 a month is the plan that matches this usage shape without stopping you mid task, and it still costs less than the average token bill. If you keep hitting limits on Pro, upgrading costs less than the tokens would have.
How to see what you are actually spending
Run /usage inside a Claude Code session. On a subscription it shows plan usage bars plus a breakdown of which subagents and MCP servers your recent usage went to, and it flags any behaviour responsible for 10% or more of that usage. Press d or w to switch between the last 24 hours and the last 7 days.
On API billing, the Session block at the top of /usage prints a dollar figure:
Total cost: $0.55
Total duration (API): 6m 20s
Total code changes: 0 lines added, 0 lines removedThat figure is computed locally from token counts priced at list rates, so it does not know about promotional pricing or a negotiated discount, and it can differ from your invoice. The authoritative number is the usage page in the Claude Console. The session totals also reset when /clear starts a new session, so a small number after a clear does not mean a cheap day. Reading Claude Code token usage line by line explains what each counter is counting.
When you reach a plan limit, /usage-credits opens the billing settings where you can turn on usage credits and keep working past the allowance at token rates. On a Team or Enterprise plan, the same command sends a request to whoever holds billing access.
What pushes the bill up
A long session costs more than the work in it suggests, because every request carries the whole conversation. Four habits move the number more than anything else:
- Run
/clearbetween unrelated tasks. Stale context is re-sent on every message that follows it, so an afternoon of unrelated work in one session pays for the morning again and again. - Switch models with
/model. Sonnet handles most coding work, and its output rate is well below Opus, which is where thinking tokens land. - Watch the cache lifetime. Returning to a session after a long break reprocesses your full context at the base input price. The cache lasts an hour on a subscription and five minutes on an API key.
- Keep agent teams small. Each teammate runs its own context window, roughly seven times the tokens of a standard session when teammates run in plan mode.
Keeping the Claude Code context window small is the same skill as keeping the bill small. If you run agents unattended, capping what an AI agent can spend on a VPS matters more still, because nobody is watching the session while it burns tokens.
Does running it on a VPS cost extra?
Yes, and it arrives as a separate bill. Running Claude Code on a server instead of a laptop costs you the server. Claude Code needs 4 GB of RAM or more and a supported operating system such as Ubuntu 20.04 or later, so a small VPS is enough. Install it the same way you would locally:
curl -fsSL https://claude.ai/install.sh | bash
claude --versionA working install prints a version string such as 2.1.211 (Claude Code). If the command reports command not found, the installer put the binary in ~/.local/bin, which your shell has not picked up yet: open a new shell and try again. Then run claude in your project directory and log in through the browser prompt, using the paid account you already have. Your plan follows the account, not the machine, so a VPS session draws on the same allowance as your laptop.
The reason to move to a server is not cost. It is that a server session survives your laptop closing. Running Claude Code on a VPS inside tmux covers that setup, and the permissions to set before you leave an agent running covers what to lock down first. Budget the server on top of your plan, and what a VPS actually costs per month gives the current range.
FAQ
Is Claude Code free to use?
No. Claude Code requires a paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account with API credits. Anthropic's setup documentation states that the free Claude.ai plan does not include Claude Code access, so the login step fails on a free account even though the install itself works. New Console accounts receive a small one time trial credit for testing the API, which is not a recurring free tier.
Does a Claude Pro subscription include Claude Code?
Yes. Pro costs $20 a month, or $17 a month billed annually, and it includes Claude Code alongside Claude chat. The usage allowance is shared between them and resets on a rolling five hour window. Coding for several hours a day will reach that window, which is what the Max tiers at $100 and $200 a month exist for.
Is a subscription or API billing cheaper for daily coding?
For one person coding on most working days, a subscription is almost always cheaper. Anthropic's published average for token billed deployments is about $13 per developer per active day, which is roughly $260 across 20 active days, against $100 a month for Max 5x. API billing wins when you need a hard spend cap and per user cost reporting, neither of which a personal subscription provides.
How do I check what Claude Code is costing me?
Run /usage in a session. On a subscription it shows how much of your plan window you have used and which parts of the session consumed it. On API billing the Session block shows a dollar total computed locally at list prices, which can differ from your actual invoice, so treat the usage page in the Claude Console as the real number. The session total resets when you run /clear, so check it before clearing.
What happens when I hit my Claude Code usage limit?
Claude Code tells you which window you reached and when it resets. Switching models with /model does not restore access, because the session and weekly windows are shared across models, although it does keep you working after a model specific message such as an Opus limit. Run /usage-credits to turn on usage credits and continue past the allowance at token rates. Without credits, you wait for the window to reset.