How Much Does Claude Code Cost?
Claude Code uses token-based pricing via the API, or is included with Anthropic's Max plan at $100/mo or $200/mo. Pro plan users get limited access at $20/mo.
$ claude --pricing 2026
# Quick summary
Pro Plan ............ $20/mo (usage-capped)
Max Plan ........... from $100/mo (higher limits)
API Direct ......... pay per token (no cap)
# Typical costs
Avg session ........ $0.50 - $5.00
Avg dev month ...... $30 - $200
How Claude Code Pricing Works
Token-based billing
Every prompt you send and every response you receive consumes tokens. Tokens are roughly 3/4 of a word, so a 1,000-word response uses about 1,333 tokens.
Input and output are priced separately
You pay one rate for input tokens (your prompts plus context from files Claude reads) and a higher rate for output tokens (Claude's responses and code).
Context window accumulates
When Claude Code reads your files, those tokens count as input. Longer conversations accumulate more context, so later messages in a session cost more than early ones.
Subscription plans cap usage, not cost
On Pro and Max plans, you pay a flat monthly fee. When you hit your usage limit, Claude Code slows down or pauses until the limit resets. You are never charged overage fees.
Pricing by Access Method
Three ways to use Claude Code, each with different trade-offs.
Subscription
Pro Plan
$20/mo
- + Claude Code access included
- + Sonnet 4 by default
- + Good for occasional use
- - Usage-capped (a few sessions/day)
- - Rate-limited during peak times
Subscription
Max Plan
$100 - $200/mo
- + $100: 5x Pro usage limits
- + $200: 20x Pro limits + Opus 4
- + Priority access, no throttling
- + Best for daily heavy usage
- - Higher monthly commitment
Pay per token
API Direct
$0/mo base
- + No monthly fee
- + All models: Sonnet, Opus, Haiku
- + No usage caps
- + Full control over spend
- - Cost varies with usage
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
| Claude Sonnet 4 | $3.00 | $15.00 |
| Claude Opus 4 | $15.00 | $75.00 |
| Claude Haiku 3.5 | $0.80 | $4.00 |
Real-World Cost Examples
What actual Claude Code sessions cost on API pricing with Sonnet 4.
Quick bug fix
15 minutesDescribe a bug, paste an error, Claude reads 2 files and suggests a fix.
~5K in / ~2K out
Feature build
1 hourMulti-turn conversation, Claude reads 8-10 files, writes code, iterates on tests.
~80K in / ~20K out
Large refactor
2-3 hoursReads dozens of files, plans architecture changes, rewrites multiple modules.
~300K in / ~60K out
Full-day heavy use
8 hoursMultiple sessions, large codebase, frequent back-and-forth throughout the day.
~800K in / ~150K out
Monthly Cost Projections
Estimated monthly spend on API pricing across usage levels (22 working days).
| Usage Level | Monthly (Sonnet) | Monthly (Opus) |
|---|---|---|
| Light (casual help) | $15 - $40 | $60 - $180 |
| Moderate (daily coding) | $40 - $100 | $180 - $500 |
| Heavy (primary tool) | $100 - $250 | $500 - $1,200 |
| Team (5 devs, moderate) | $200 - $500 | $900 - $2,500 |
Usage Cost Estimator
Estimate your monthly Claude Code spend based on usage patterns.
Daily tokens
500K in / 120K out
Daily cost (API)
$3.30
Estimated monthly cost (API, 22 working days)
$72.60
Plan comparison
Recommendation: At your usage level, the Max $100 (flat rate) would be cheaper than API pricing.
Claude Code vs Cursor vs Copilot vs Windsurf
Head-to-head pricing and feature comparison for AI coding tools.
| Claude Code | Cursor | GitHub Copilot | Windsurf | |
|---|---|---|---|---|
| Starting price | from $20/mo | $20/mo | $19/mo | $15/mo |
| Power user price | $100-$200/mo | $40/mo (Pro) | $39/mo (Business) | $30/mo (Pro) |
| Pay-per-token option | Yes (API) | No | No | No |
| Pricing model | Flat or per-token | Flat + limits | Flat | Flat + limits |
| Models available | Sonnet, Opus, Haiku | GPT-4o, Claude, etc. | GPT-4o, Claude | GPT-4o, Claude |
| Interface | Terminal (CLI) | IDE (VS Code fork) | IDE extension | IDE (VS Code fork) |
| Agentic coding | Full (file edit, shell, git) | Composer agent | Copilot Workspace | Cascade agent |
| Cost predictability | High (subscription) / Low (API) | High | High | High |
| Best for | Terminal-native devs | IDE-focused editing | Autocomplete workflows | IDE-focused editing |
How to Reduce Your Claude Code Costs
Practical strategies ranked by impact, from biggest savings to smallest.
Use Sonnet instead of Opus for routine tasks
Up to 80% savingsSonnet is 5x cheaper than Opus and handles most coding work with similar quality. Reserve Opus for complex architecture decisions and hard debugging problems.
Keep conversations short
30-50% savingsStart fresh sessions rather than extending long ones. Context accumulation is the biggest cost driver. Each message in a long conversation sends all previous context as input tokens.
Use /compact to compress context
20-40% savingsThe /compact command summarises the conversation so far, reducing the token count for subsequent messages. Use it whenever you notice a conversation getting long.
Be specific in your prompts
15-25% savingsVague prompts lead to longer back-and-forth exchanges, each one adding more tokens. Tell Claude exactly which files to look at and what outcome you want.
Add a .claudeignore file
10-20% savingsPrevent Claude from reading irrelevant files like node_modules, build artifacts, logs, and large data files. Less file reading means fewer input tokens.
Enable prompt caching (API mode)
Up to 90% on cached contentRepeated system prompts and file reads can be cached when using the API directly, reducing input costs by up to 90% for cached content.
Batch non-urgent work (API mode)
50% on batched workThe API batch mode offers a 50% discount for asynchronous processing. Queue up code reviews, documentation generation, or test writing for batch execution.
Which Plan Should You Choose?
A quick decision framework based on how you use Claude Code.
Pro ($20/mo)
Use Claude Code fewer than 2 hours/day for side projects and learning. Usage limits rarely matter at this level.
Best for: Occasional coding help
Max ($100/mo)
Claude Code is part of your daily workflow. You need reliable access without peak-time throttling or worrying about limits.
Best for: 3-5 hours/day
Max ($200/mo)
Claude Code is your primary development tool. You need Opus 4 for complex architecture work and the highest usage limits.
Best for: 6+ hours/day, needs Opus
API Direct
You need granular control, no caps, or you are building tools on top of Claude Code. API is the only option for programmatic access.
Best for: Custom tooling, teams
Billing and Usage Monitoring
Check your usage
Visit dashboard.anthropic.com to see your current token consumption, spending trends, and remaining plan limits in real time.
Set up spend alerts
Configure budget caps and email alerts in the Anthropic dashboard. Get notified before you hit a spending threshold you set.
Understand rate limiting
On Pro and Max plans, hitting your usage limit results in throttling (slower responses) or temporary pausing. You will never be charged overage fees on subscription plans.
API billing cycle
API usage is billed monthly in arrears. You can set a hard spending cap so your account is never charged beyond a limit you choose.