Claude Code Pricing: What API Usage Costs per Month

Claude Code is billed one of two ways: through a Claude subscription seat, or at API rates when you use an API key. This page covers the API-rate case, because that is the one you can estimate from token math.

The estimate method

API-rate spend for Claude Code is tokens consumed, priced at the model's rates. Three things drive it:

So the estimate is: split your monthly input tokens into cached reads and fresh input, price each at its rate, add output tokens at the output rate.

Why cached input dominates

Every request in a coding session re-sends the same prefix: the system prompt, tool definitions, and the conversation so far. Only the newest turn is new. Once that prefix is cached, the bulk of your input tokens bill at the cache read rate of 0.1x input, and the full input rate applies only to the fresh part. That is why two sessions with identical token totals can differ several-fold in cost depending on cache behavior.

Worked example at Sonnet 5 rates

List prices verified 2026-08-10. Sonnet 5 standard rates: $3.00 input, $15.00 output per 1M tokens. Cache reads at 0.1x input are $0.30 per 1M. Introductory pricing of $2.00 / $10.00 applies through 2026-08-31.

Say a month of Claude Code use consumes 60M input tokens and 3M output tokens, and 50M of the input tokens are cache reads.

Line itemTokensRate $/1MCost
Fresh input10M$3.00$30.00
Cache reads50M$0.30$15.00
Output3M$15.00$45.00
Total63M$90.00

Without caching, the same 60M input tokens would bill at $3.00 per 1M, for $180.00 of input alone and a $225.00 total. Caching cut this example's bill by 60%.

Cache writes add a small premium, 1.25x input for the 5-minute TTL or 2x for the 1-hour TTL, on the first request that stores each prefix. Reads then repeat many times per session, so the write cost stays a minor line item next to the read savings.

To scale the example to your own usage, change the model, the token volumes, or the cached share in the calculator above. The same 63M tokens at Opus 5 rates ($5.00 / $25.00) or Haiku 4.5 rates ($1.00 / $5.00) moves the total in direct proportion to the price sheet on the Claude pricing page.

Related pages