← Back to WeighMyPrompt

How Much Does Claude Code Cost?

Last updated: May 13, 2026 · 7 min read

Claude Code is Anthropic's terminal-based coding agent. Unlike the regular Claude chat interface, it can read files, run commands, and execute multi-step tasks autonomously — which means it burns tokens fast. This guide breaks down every way to access Claude Code, how many tokens each plan gets you, and when paying for API access is cheaper than a Max subscription.

The short answer

PlanPriceClaude Code budgetGood for
Free Claude$0None — not includedNot an option for Claude Code
Claude Pro$20 / moSmall (30-50 min/day)Light, occasional coding
Claude Max 5x$100 / mo~5x Pro budgetDaily coding, single project
Claude Max 20x$200 / mo~20x Pro budgetAll-day coding, multiple projects
API (pay per token)$3-$25 / 1M tokensUnlimitedApps integrating Claude Code style workflows

Is Claude Code free?

No. Claude Code is not available on the free Claude tier at claude.ai. You need one of these to use it:

New API accounts get $5 in trial credits, which is enough to test Claude Code for 1-2 days of moderate use before you have to add a payment method.

Claude Code on the Pro plan ($20/mo)

Pro includes a small token budget specifically for Claude Code. Anthropic doesn't publish the exact number — and the limit is dynamic — but in practice you'll get 30-50 minutes of active coding per 5-hour window on Pro. That's enough to:

It's not enough for: shipping a feature, working through a long-context codebase, or running an autonomous task overnight.

If you frequently hit "Claude Code usage limit reached" on Pro, Max 5x ($100/mo) is the sensible next step — it's 5x the budget for 5x the price, but the productivity unlock is bigger than that.

Claude Max 5x and 20x

Anthropic launched the Max plans specifically because Claude Code power users were maxing out Pro in hours. The two tiers:

When does Claude Code usage reset?

Claude Code uses a rolling 5-hour window. Unlike daily-reset systems, your budget continuously regenerates: usage from 5 hours ago is released back into your available budget. There's no fixed reset time like midnight or 9am.

Practical implication: if you hit the limit at 2pm, you don't need to wait until tomorrow. By 7pm the same day you'll have full capacity again.

Claude Code on the API — when it's cheaper

Claude Code can run directly against your Anthropic API key instead of through a subscription. Token pricing:

ModelInput / 1M tokensOutput / 1M tokens
Claude Opus 4.7 (default for Claude Code)$5.00$25.00
Claude Sonnet 4.6$3.00$15.00
Claude Haiku 4.5$1.00$5.00

Cost of a typical Claude Code session

An active 30-minute coding session typically uses around 50K input tokens (your codebase context + tool results) and 20K output tokens (edits, explanations, planning):

For a developer running 4-6 such sessions per day (typical for someone who uses Claude Code as their primary coding tool), the monthly bill on API works out to:

Prompt caching cuts API cost by 90 percent

Anthropic's prompt caching feature drops input token cost to 10 percent of list price when you reuse a prefix within 5 minutes (or 1 hour with the extended TTL). Claude Code automatically caches your working-directory context, which is the biggest line item for most sessions. With caching, a typical Sonnet session drops from $0.45 to roughly $0.18.

How many tokens with Claude Pro for Claude Code?

Anthropic deliberately does not publish a hard token count — the actual budget is dynamic based on server load and recent user behavior. Community measurements suggest Pro delivers something like 200K-400K tokens of Claude Code usage per 5-hour window, with Max 5x at roughly 1-2M tokens and Max 20x at 4-8M tokens per window.

If you need precise per-prompt token measurements before sending requests, paste your prompt into the WeighMyPrompt counter — it uses Anthropic's tokenizer to give you exact counts.

Calculate exact Claude Code cost for your prompts

Estimate Claude API cost in your browser Paste a real Claude Code interaction (system prompt + your message + expected output) into the calculator to see exact token count and cost on Opus, Sonnet, or Haiku. No signup. Open the calculator.

Which plan should I pick?

Related