Claude Code API cost calculator

Claude Code burns tokens faster than almost anything else because it re-reads context on every turn. Here is what that costs, and what it costs through a volume route.

Why Claude Code is expensive: every turn resends the accumulated conversation context. A long session can push 100K+ tokens per request even for a short answer. Output is usually small relative to input For coding agents, budget roughly 10:1 input to output.
—

Want that number to be real? Create an account, add credit, and change your base URL. Get API access →

What a month of Claude Code costs

The calculator starts at 300M input and 25M output a month, roughly a developer working in Claude Code most of the day. At that volume:

ModelPer 1M in / outThis month
Claude Opus 5$2.5 / $12.5$1062.5
Claude Sonnet 5$1.00 / $5.00$425.00
Claude Haiku 4.5$0.50 / $2.5$212.5
GPT-5$0.625 / $5.00$312.5
GPT-5 mini$0.125 / $1.00$62.5
DeepSeek V4 Flash$0.22 / $0.66$82.5

Put your own two numbers in above and you have your figure. If you do not know them yet, the ratios below matter more than the absolute numbers.

Why input is the whole story here

Claude Code re-sends the conversation on every turn. Ask ten short follow-ups in a long session and you have paid for the entire session context ten times over, while the output you received stayed small. That is why the input rate (not the output rate) decides this bill, and why output-heavy pricing comparisons are misleading for this tool.

Lowering the bill without switching provider

Figures are estimates based on list prices verified 2026-11-01. Actual spend depends on your cache hit rate, batch usage and long-context tiering.