Explainer
Claude Code Pricing, Explained
How you pay for Claude Code depends on whether you run it under a Claude subscription or an API key. Under a Claude Pro, Max, or Team plan it is included (within the plan's usage limits); with an API key you pay the API's per-token rates directly. This page explains how it is billed, what actually drives your cost, and how to estimate it — with pointers to confirm the live numbers.
01 / Definition
Claude Code is Anthropic's terminal coding agent, and what you pay for it depends on how you authenticate it. Run it under a Claude Pro, Max, or Team subscription and it is included as part of that plan; run it with an ANTHROPIC_API_KEY (Claude Console, pre-paid credits) and you pay the API's per-token rates directly. Either way the real cost driver is the same: the Claude model tokens your sessions consume.
As of 2026-06-23, Anthropic's pricing page lists Claude Code as included with Claude Pro (about $20/month, or roughly $17/month billed annually), Max (from $100/month, with higher 5× and 20× usage tiers), and Team (around $20–25 per seat/month for a standard seat). Those plans carry usage limits rather than being unlimited, so very heavy users can still hit a cap and continue via an API key. Anthropic sets and adjusts these rates, so confirm current plan prices and any usage limits on Anthropic's pricing page before you budget.
02 / What it does
-
What you pay under
Two paths. Subscription: Claude Pro / Max / Team include Claude Code within the plan's usage limits — best for steady daily use at a predictable monthly price. API key: you pay the API's per-token rates directly through Claude Console, with no subscription and no cap — best for pay-as-you-go control. The underlying driver is the same model-token usage either way.
-
What drives the cost
Tokens. A run that reads many files loads a large input context; a long agentic task generates a lot of output; and a high-capability model (Opus) costs several times more per token than Haiku. Longer sessions and bigger context windows mean more tokens, which means more cost.
-
How to estimate it
Use the API per-token rates as the yardstick even on a subscription, since usage credits track model consumption. Roughly: cost ≈ tokens used × the model's rate. Opus is the priciest tier, Haiku the cheapest — so the model you run and how much context you feed it set the bill. See our Claude API pricing page for the exact rates.
-
Ways to cut it
Run a cheaper model for routine work, keep context lean (focused prompts, subagents instead of dumping the whole repo each turn), and let prompt caching reuse stable context. Avoid re-reading the entire codebase on every turn — that is the most common source of surprise cost.
03 / How it works
Whether you are billed through a subscription or an API key, Claude Code's cost tracks the same thing: the Claude model tokens consumed across your sessions, at that model's input and output rates. A subscription bundles that usage into a flat monthly price (up to the plan's limits); an API key bills it per token with no cap. That is why estimating with the API per-token rates works as a yardstick in both cases — on a plan it tells you how much headroom your usage leaves, and on an API key it is the bill directly.
Run Claude Code with an API key and it is raw per-token billing — see the Claude API pricing page. Run it under a Claude Pro, Max, or Team plan and it is included in your monthly subscription (within the plan's usage limits). Same token driver underneath.
04 / Who it's for
- Developers deciding between a Claude subscription and an API key for running Claude Code.
- Anyone trying to put a budget on Claude Code before committing to heavy use.
- Users who want to understand whether Claude Code is included with their plan or billed per token.
05 / Getting started
Pick your billing path first: a Claude subscription (Pro, Max, or Team) if you also use Claude chat and want a predictable monthly price with Claude Code included, or an API key for pay-per-token control with no cap. Then keep cost down with model choice, lean context, and caching. See the install guide to set up auth, and the Claude API pricing page for the per-token rates that drive the bill either way.
Our AI agents
From the team behind AI Coding Hub — agents that pick up where the code ends:
- AI document agentDraftlizeTurn rough notes, specs and transcripts into clean, structured docs with an AI doc agent.Try Draftlize →
- AI presentation agentDecklizeGenerate editable slide decks from a prompt or an existing doc with an AI presentation agent.Try Decklize →
- AI data agentTablizeQuery, clean and chart spreadsheets and CSVs in plain English with an AI data agent.Try Tablize →
FAQ
- How much does Claude Code cost?
- It depends on how you run it. Under a Claude Pro, Max, or Team subscription it is included in your plan (Pro is about $20/month, Max from $100/month, as of 2026-06-23) within that plan's usage limits; with an API key you pay per token at the model's rate, with no cap. The underlying driver is token usage, so cost scales with the model you pick and how much context your sessions use. Confirm current plan prices and limits on Anthropic's pricing page.
- Is Claude Code free?
- No. Claude Code runs under a paid Claude subscription or an API key — there is no separate free tier beyond whatever your plan includes. The CLI itself is free to install, but the model usage it drives is billed (bundled into your subscription, or per token on an API key).
- What changed about Claude Code pricing on June 22, 2026?
- In practice, less than expected on the subscription side. As of 2026-06-23, Anthropic's pricing page still lists Claude Code as included with Claude Pro, Max, and Team plans rather than billing it as separate usage credits. Those plans do carry usage limits (Max offers higher 5× and 20× usage tiers), and beyond a plan you can keep running Claude Code with an API key billed per token. Anthropic sets these terms and can change them — confirm the current details on their pricing page.
- Is Claude Max worth it for Claude Code?
- It depends on your volume. Max (from $100/month, as of 2026-06-23) suits heavy daily users who would otherwise run up large per-token bills on an API key, and it includes higher usage tiers (5× or 20×) than Pro. Lighter users may do better on Pro or paying per token via an API key. Compare your expected token consumption against each plan's usage limits — confirm current numbers before deciding.
- Should I use a subscription or an API key?
- Use a subscription (Pro, Max, or Team) if you also use Claude chat and want a predictable monthly price with Claude Code included; use an API key for transparent pay-per-token billing with no cap and fine cost control. Both run Claude Code the same way — the difference is how the model usage is billed.