Claude Pricing Calculator
Estimate Anthropic Claude API cost across Opus 5.5, Sonnet 5.5, Opus 4.7, Sonnet 4.6 and Haiku 4.5. Includes prompt-cache pricing: cache hits cost 10% on Opus 4.7, Sonnet 4.6 and Haiku 4.5 and 5% on Opus 5.5 and Sonnet 5.5 of the base input price, once the cached prefix reaches the model's minimum length. Prices checked 2026-11-12 against Anthropic's pricing page.
Cost across all Claude models for this workload
How to use the Claude Pricing Calculator
Pick a Claude model. "Cached prefix tokens" is the portion of your input that's stable across calls (system prompt, tool definitions, large RAG context). "Cache writes / month" is how many calls re-write the prefix (the first call, plus every call after the cache expired). Writes cost 1.25x the base input price for the 5-minute lifetime and 2x for 1 hour; every other call pays the cache-hit price. Anthropic's prompt caching bills cached tokens at the cache-hit price after the first call within the cache window (5-minute lifetime by default; a 1-hour lifetime is available with "ttl": "1h" at a higher cache-write price).
Claude caching minimums and ergonomics
Minimum cacheable prompt length (Anthropic prompt-caching docs, checked 2026-11-12): 512 tokens for Opus 5.5 and Sonnet 5.5; 1,024 tokens for Sonnet 4.6; 2,048 tokens for Opus 4.7; 4,096 tokens for Haiku 4.5. Below those, caching is silently skipped: no discount, no error.
The default cache lifetime is 5 minutes and is refreshed at no extra cost each time the cached content is used. For pipelines where calls are spread out, set "ttl": "1h" on cache_control; 1-hour cache writes cost 2x the base input price (5-minute writes cost 1.25x).
Practical pattern: put the stable bits (system prompt, tool defs, large context) first in the message, then the per-call user message last. Anthropic caches contiguous prefixes — anything that varies per call belongs at the end.