Claude Cost Calc Claude Code Pricing

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:

Free
Claude.ai Free
$0 / month
Limited Claude Code usage per day
Access to Claude Sonnet
No API key required
Rate-limited after daily quota
Most Popular
Claude Pro
$20 / month
5× more usage than Free
Access to Sonnet 4.6 + Opus 4.7
Priority access during peak hours
Includes claude.ai web + Projects
Max 5×
Claude Max
$100 / month
25× more usage than Free
Access to all Claude 4 models
Highest available throughput
Best for full-day coding sessions
Max 20×
Claude Max Ultra
$200 / month
100× more usage than Free
All Claude 4 models incl. Opus 4.7
For teams and heavy power users
Highest priority capacity allocation
Which plan do you need? If you use Claude Code for a couple hours a day on focused tasks, Claude Pro ($20/mo) is usually sufficient. If you're coding 6–8+ hours per day or doing large refactors, the Max 5× plan ($100/mo) prevents rate-limit interruptions. The Max 20× plan is for teams or developers running multiple concurrent Claude Code sessions.

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:

Quick bug fix (15 min)
~8K input + 2K output, ~50% cache hits
~$0.05–$0.10
Focused feature session (1 hour)
~60K input + 15K output, ~40% cache hits
~$0.35–$0.55
Moderate coding day (4 hours)
~250K input + 65K output, ~55% cache hits
~$1.20–$1.80
Heavy coding day (8+ hours)
~600K input + 180K output, ~65% cache hits
~$2.50–$3.50
Large refactor / architecture review
~400K input + 100K output, large files in context
~$1.50–$2.50
Complex feature with Opus 4.7 (occasional)
~15K input + 5K output — rare hard problem escalation
~$0.60 per call
API vs Subscription math: At typical usage of 1–2 hours per day on API billing, you'd spend ~$15–$35/month — similar to or slightly more than the $20 Pro subscription. Heavy users (4+ hours/day) often save money staying on the Max plan vs API billing. Light users or devs who want precise cost visibility tend to prefer API keys.

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:

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.

Open Claude Code Cost Calculator →

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)
Pro tip — reduce Claude Code API costs: Add frequently-used context (system prompts, large files, project docs) once per session — Claude Code caches them automatically. Subsequent reads in the same session cost only 10% of normal input price. A well-structured session with a 3K-token system prompt repeated 20 times saves ~$1.60 per workday at Sonnet 4.6 prices.

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.