Claude Code Pricing 2026
Complete breakdown of Claude Code subscription plans (Free, Pro, Max) plus API token costs — with real session cost examples so you know exactly what to budget.
Subscription Plans: Free, Pro, and Max
Claude Code is available through claude.ai subscription plans or via your own Anthropic API key with pay-per-token billing. Here's the subscription breakdown:
API-Based Pricing (Bring Your Own Key)
Developers who connect their own Anthropic API key to Claude Code get pure pay-as-you-go billing. No subscription — you pay per token consumed in each session.
| Model | Input / 1M tokens | Output / 1M tokens | Cache Write / 1M | Cache Read / 1M |
|---|---|---|---|---|
| Claude Sonnet 4.6 (default) | $3.00 | $15.00 | $3.75 | $0.30 |
| Claude Opus 4.7 | $15.00 | $75.00 | $18.75 | $1.50 |
| Claude Haiku 4.5 | $0.80 | $4.00 | $1.00 | $0.08 |
| Claude Sonnet 3.5 | $3.00 | $15.00 | $3.75 | $0.30 |
| Claude Haiku 3 | $0.25 | $1.25 | $0.30 | $0.03 |
Prompt caching is the key cost lever in Claude Code. The tool automatically caches the system prompt and prior conversation context. Once cached, re-reading that context costs just 10% of the normal input price. On sessions with large codebases in context, caching often cuts total input costs by 40–70%.
Typical Claude Code Session Costs (API Pricing)
These are real-world estimates based on typical Claude Code session logs with Sonnet 4.6 as the default model:
How Claude Code Tracks Costs
When you use Claude Code with an API key, every session writes a detailed log to ~/.claude/projects/<project-name>/ as a .jsonl file. Each line in this file records:
- The model used (
claude-sonnet-4-6,claude-opus-4-7, etc.) - Input tokens, output tokens, cache write tokens, cache read tokens
- Timestamp and request metadata
- Tool call types (file reads, edits, bash commands, etc.)
This gives you a complete audit trail of every API call Claude Code makes. You can paste this file into our calculator below to get a cost breakdown by model, tool type, and hour of the day.
Calculate Your Exact Claude Code Cost
Paste or drop your .jsonl session log — get instant cost breakdown by model, tool call, and hour. Free, runs in your browser, nothing uploaded.
Claude Code Pricing: Subscription vs API Key
| Factor | Subscription (Pro/Max) | API Key (Pay-as-you-go) |
|---|---|---|
| Monthly cost | Fixed ($20–$200) | Variable (usage-based) |
| Cost visibility | Opaque (no per-call costs) | Full JSONL logs, exact per-request pricing |
| Rate limits | Soft limits, retry-able | Per-minute/day tier limits by API tier |
| Best for | Predictable budget, daily dev use | Cost optimization, sporadic use, exact billing |
| Model access | All Claude 4 models (plan-dependent) | All Claude 4 models + beta features |
| Setup | claude.ai login — immediate | Anthropic API key + ANTHROPIC_API_KEY env var |
Monthly Cost Estimates by Usage Level
Assuming Sonnet 4.6 as primary model with ~55% average cache hit rate on a typical codebase:
| Usage Level | Hours/Day | Est. Monthly (API) | Recommended Plan |
|---|---|---|---|
| Occasional (learning / side project) | ~0.5h | $3–$8 | Free tier or API key |
| Regular developer | ~1–2h | $10–$25 | Claude Pro ($20/mo) |
| Full-time coding | ~4–6h | $35–$60 | Claude Max 5× ($100/mo) |
| Power user / team lead | ~7–10h | $60–$100+ | Max 5× or Max 20× |
| Agency / multi-project | Multiple devs | Variable | Anthropic Teams (contact sales) |
Frequently Asked Questions
How much does Claude Code cost per month?
It depends on your usage. Claude Code is included in Claude.ai subscriptions: Free (limited), Pro ($20/mo), Max 5× ($100/mo), Max 20× ($200/mo). If you use your own Anthropic API key, expect roughly $0.35–$0.55 per hour of typical coding with Sonnet 4.6. Most developers who code with Claude Code 2+ hours/day spend $15–$40/month on API billing, making the Pro or Max subscription a natural comparison point.
Is Claude Code free?
Claude Code is available on the free claude.ai tier with limited daily usage. Once you hit the free quota, you'll be rate-limited until the next day. For professional use, you'll want a paid plan. Alternatively, using your own Anthropic API key gives unlimited access at pay-per-token rates with no fixed monthly fee.
What is the difference between Claude Pro and Claude Max?
Both plans include Claude Code. Claude Pro ($20/mo) gives ~5× more usage than the Free tier — sufficient for 1–3 hours of daily Claude Code use. Claude Max 5× ($100/mo) gives ~25× more usage than Free, designed for full-day coding sessions. Claude Max 20× ($200/mo) is for power users or developers running multiple projects simultaneously.
How do I see my Claude Code usage costs?
If you're on a subscription plan, Anthropic's dashboard shows usage percentages but not dollar amounts. For exact cost breakdowns, use your own API key — Claude Code logs every request to ~/.claude/projects/<project>/*.jsonl. Paste that log into the Claude Code Cost Calculator to see costs by model, tool, and hour.
Does Claude Code use Claude Opus or Sonnet by default?
Claude Code defaults to Sonnet 4.6 for most coding tasks — it balances quality and cost well at $3/$15 per 1M tokens. Users can switch to Opus 4.7 ($15/$75 per 1M) for harder reasoning tasks. Some users configure Haiku 4.5 for fast file operations or classification tasks where maximum quality isn't needed.
How can I reduce Claude Code costs?
The main levers: (1) Use caching — keep a consistent system prompt and load large files once per session; repeat reads cost 90% less. (2) Use Haiku for background tasks — file indexing, search, and classification don't need Sonnet-level quality. (3) Use the Estimate tab on our calculator to forecast monthly spend before scaling usage. See our full guide to reducing Claude API costs.
Does Claude Code charge per tool call or per token?
Claude Code charges by tokens, not by the number of tool calls. A tool call (file read, bash command, edit) adds tokens in both directions: Claude reads the file contents as input tokens and writes the response as output tokens. Heavily tool-calling sessions (e.g. reading many large files) can accumulate costs quickly — which is why the Claude Code Cost Calculator breaks down costs by tool call type.
Is there a Claude Code Teams or enterprise plan?
Yes — Anthropic offers a Teams plan for organizations, with centralized billing, admin controls, and higher rate limits. Pricing is contact-sales based. For most small teams, having each developer on a Max subscription or using shared API keys with billing alerts is more practical than the formal Teams plan.