Claude Code Pricing: Plans, Costs, and Usage Limits Explained
Anthropic doubled Claude Code's five-hour usage caps in May 2026, but most pricing guides still lump chat and coding costs together. This guide separates the two: subscription tiers (Free through Enterprise), per-token API rates for each model family, the rolling-window mechanics that actually govern how much coding you get per day, and the hidden overhead that inflates real-world bills beyond sticker price.
What Claude Code Costs in 2026
Anthropic doubled Claude Code's five-hour rate limits on May 6, 2026, across Pro, Max, Team, and Enterprise plans. The change also removed the peak-hours throttle that previously cut Pro and Max capacity during weekday mornings. Yet the company still does not publish exact token quotas for any tier, leaving developers to reverse-engineer their own burn rates.
Claude Code is Anthropic's agentic coding tool. It runs in your terminal, in VS Code and JetBrains IDEs, and as a web app at claude.ai/code. Every paid Claude subscription includes it, and a usage-capped Free tier lets you test it before paying anything.
There are two ways to pay for Claude Code: a flat monthly subscription (Pro, Max, Team, or Enterprise) that bundles usage across Claude.ai chat and Claude Code, or direct API access through the Anthropic Console where you pay per token. The subscription route caps your usage but caps your bill too. The API route has no monthly ceiling on either.
Here is a side-by-side comparison of every plan that includes Claude Code access:
Helpful references: Fast.io Workspaces, Fast.io Collaboration, and Fast.io AI.
Subscription Plans Compared
Each plan targets a different usage intensity. The critical detail most guides skip: Claude Code and Claude.ai chat draw from the same usage bucket. An afternoon of heavy chatting eats into your evening coding capacity.
Free
The Free tier gives you access to Claude Code with all four model families (Fable, Opus, Sonnet, Haiku) but with tight rate limits. Most developers report exhausting the quota within an hour of active coding. It exists to let you verify the tool works before committing financially, not for real development.
Pro at $20 per month
Pro is the entry point for serious Claude Code use. Annual billing drops the price to $17 per month ($204 per year). You get roughly 45 to 90 prompts per five-hour rolling window after the May 2026 doubling, though actual capacity depends on message length, model choice, and whether extended thinking is enabled.
Pro works well for developers who use Claude Code a few hours per week on focused tasks. If you are coding with it daily, expect to hit limits within one to two weeks of a billing cycle.
Max 5x at $100 per month
Max 5x multiplies your Pro capacity by five. At roughly $3.30 per working day, it is the plan most full-time developers land on. You also get Opus model access for complex reasoning tasks, higher output limits, and priority traffic access.
Max 20x at $200 per month
Max 20x is built for developers who live inside Claude Code. Twenty times the Pro baseline means roughly 800 or more prompts per five-hour window depending on complexity. Annual billing brings it to $170 per month ($2,040 per year). If you are running extended multi-file refactors or architecture-level sessions regularly, this is the tier that avoids mid-session interruptions.
Team plans
Teams of 5 to 150 can mix Standard seats ($25/seat monthly, $20 annual) and Premium seats ($100/seat monthly, $85 annual). Premium seats get 5x capacity per person. All Team plans include SSO, admin controls, central billing, and a guarantee that Anthropic will not train on your content.
Enterprise
Self-Serve Enterprise costs $20 per seat plus usage billed at API rates. It adds SCIM provisioning, audit logs, role-based access, strict security requirements-ready controls, and custom data retention. Sales-Assisted Enterprise offers negotiated pricing with IP allowlisting and network-level access control.
API Token Pricing by Model
If you connect Claude Code to the Anthropic API through the Console instead of using a subscription, you pay per token with no monthly cap in either direction. New API users receive a small amount of free test credits.
Current token rates as of June 2026:
Output tokens cost five times input across every current model. That ratio matters because Claude Code generates a lot of output: code blocks, explanations, file edits, and tool-use responses all count.
The Batch API cuts both input and output costs by 50% for non-urgent work. If you run Claude Code in CI/CD pipelines through GitHub Actions or GitLab CI, batch processing can halve your automation bill.
Real-world session costs on the API
Token counts vary by task, but here are rough benchmarks for Sonnet 4.6 sessions:
- A focused 30-minute refactor: 50,000 to 150,000 tokens, costing $0.50 to $2.50
- A feature build with tests over 60 to 90 minutes: 200,000 to 500,000 tokens, costing $2 to $8
- A complex extended session: 500,000 to over 1,000,000 tokens, costing $8 to $20
Using Opus instead of Sonnet roughly doubles these figures. Prompt caching, which stores and reuses repeated context at 10% of the standard input price, can cut costs on long multi-turn sessions.
Give your AI coding agents a persistent workspace
Fast.io includes shared storage, monthly credits, and an MCP server endpoint. Your Claude Code agent reads, writes, and shares files in one place. Starts with a 14-day free trial.
How the Five-Hour Rolling Window Works
Anthropic does not give you a simple monthly token bucket. Instead, Claude Code enforces two overlapping limits: a five-hour rolling session window and a weekly active-compute cap.
The five-hour window works like this: every prompt you send consumes a portion of your plan's capacity. That capacity refills on a rolling basis over five hours, not at a fixed reset time. If you burn through 80% of your window in the first hour, you will only have 20% available for the next four hours until earlier usage rolls off.
The weekly cap adds a second constraint. Even if your five-hour window looks healthy, heavy usage earlier in the week can trigger a separate weekly limit that throttles your throughput.
Several factors affect how quickly you burn through a window:
- Model choice matters. Opus consumes more capacity per prompt than Sonnet, which consumes more than Haiku. Switching to Sonnet for routine tasks and reserving Opus for complex reasoning stretches your budget.
- Extended thinking is expensive. When Claude Code reasons through a problem step by step, those thinking tokens count as output and burn capacity faster than a direct response.
- Context length compounds. Long conversations with large file contexts consume more tokens per turn. Starting fresh sessions for new tasks instead of continuing bloated conversations helps.
- MCP server connections add overhead. Each connected MCP server can add up to 18,000 tokens per turn to your context. Disconnect servers you are not actively using.
When you exhaust your limit, Claude Code offers three options: wait for the window to roll over, enable usage credits that bill at API token rates, or upgrade to a higher plan.
Hidden Costs That Inflate Your Bill
The sticker price on Claude Code plans tells only part of the story. Several mechanics quietly multiply token consumption beyond what most developers expect.
Autocompact cascades
When your conversation exceeds the context window, Claude Code compresses the history. Each compaction event consumes 100,000 to 200,000 tokens. Long sessions can trigger multiple compactions, each one burning through your usage window faster.
Extended thinking defaults
Claude Code enables extended thinking by default on many tasks. Those thinking tokens are billed as output tokens, which cost five times more than input. A single complex reasoning step can generate tens of thousands of thinking tokens before you see a single line of code.
Cache expiry resends
Prompt caching on subscriptions resets after idle periods. If you step away for lunch and come back, the full context gets re-sent and re-billed rather than read from cache. On the API, the 5-minute cache TTL means even short breaks can trigger a full resend.
Agent SDK credit pool
As of June 15, 2026, automated Claude Code usage through GitHub Actions, headless commands, and integrations draws from a separate monthly credit pool: $20 for Pro, $100 for Max 5x, $200 for Max 20x. Exceeding the pool triggers billing at standard API rates.
The subscription vs. API breakeven
For heavy users, subscriptions save money. One developer documented API usage that would have cost $5,623 in a single month; their Max 20x subscription covered the same work for $200. The crossover typically happens around $300 to $500 per month of Opus-heavy API spend, where Max 20x starts winning because cache reads are included in the flat subscription rate.
For light or sporadic users, the API is cheaper. If you only code with Claude a few hours per week, paying per token avoids the $100 to $200 monthly floor of Max plans.
Reducing Claude Code Costs
Whether you are on a subscription or the API, these strategies stretch your budget.
Pick the right model per task. Use Haiku 4.5 for simple completions and boilerplate. Use Sonnet 4.6 for most day-to-day coding. Reserve Opus for architecture decisions, complex debugging, and multi-file refactors. Sonnet costs 40% less than Opus per token and handles the majority of coding tasks well.
Start fresh sessions often. Every turn in a long conversation resends the full context. Closing a session and starting a new one for a different task resets the context window and reduces per-turn token consumption.
use prompt caching on the API. Caching cuts repeated input costs by 90%. For projects with large system prompts or CLAUDE.md files, caching pays for itself after a single cache read on the 5-minute tier.
Use batch processing for CI/CD. The Batch API applies a flat 50% discount. If your Claude Code automation does not need real-time responses, route it through batch endpoints.
Choose annual billing. Annual plans save roughly 15% across all tiers. Pro drops from $20 to $17 per month, Max 20x from $200 to $170.
Disconnect unused MCP servers. Each connected server inflates your context by thousands of tokens per turn. Only connect the servers your current task actually needs.
For teams managing AI coding costs across multiple tools, a workspace platform like Fast.io can consolidate agent outputs into shared workspaces. Plans start with a 14-day free trial and include an MCP server at mcp.fast.io, so agents can persist files, share results, and hand off completed work to humans without additional infrastructure costs.
Frequently Asked Questions
How much does Claude Code cost per month?
Claude Code is included with every Claude plan. The Free tier costs nothing but has tight usage caps. Pro costs $20 per month ($17 annual), Max 5x costs $100 per month, and Max 20x costs $200 per month. Team seats range from $20 to $100 per seat depending on tier and billing cycle. You can also use Claude Code through the API with no subscription, paying per token instead.
Is Claude Code included with Claude Pro?
Yes. Claude Code is bundled with Pro, Max, Team, and Enterprise subscriptions. Pro and Claude Code share the same usage bucket, so activity in either product counts against the same limits.
What are Claude Code API token costs?
API token costs depend on the model. Haiku 4.5 runs $1 input and $5 output per million tokens. Sonnet 4.6 costs $3 input and $15 output. Opus models (4.5 through 4.8) cost $5 input and $25 output. The Batch API halves these rates for asynchronous workloads.
Which Claude plan is best for coding?
For most developers who code with Claude daily, Max 5x at $100 per month offers the best balance of capacity and cost. It provides five times the Pro usage limit plus access to Opus models for complex tasks. Developers who frequently hit Max 5x limits or run extended sessions should consider Max 20x at $200 per month.
Can I use Claude Code for free?
Yes. The Free tier includes Claude Code access with all model families, but usage caps are strict. Most developers exhaust the free quota within about an hour of active coding. It is designed for evaluation, not production work.
Does Claude Code usage count against my Claude.ai chat limits?
Yes. Claude Code and Claude.ai chat share the same usage pool on subscription plans. Heavy chatting during the day reduces your available Claude Code capacity in the evening, and vice versa.
What happens when I hit my Claude Code usage limit?
You can wait for the five-hour rolling window to refill, enable usage credits that bill at standard API token rates, or upgrade to a higher-tier plan. There is no hard lockout; you just need to choose how to continue.
Related Resources
Give your AI coding agents a persistent workspace
Fast.io includes shared storage, monthly credits, and an MCP server endpoint. Your Claude Code agent reads, writes, and shares files in one place. Starts with a 14-day free trial.