Claude Cost Calculator
Estimate Claude API costs across the full Anthropic family — Opus 4.7, Sonnet 4.6, and Haiku 4.5. Pick a single model or compare all three side-by-side.
Anthropic pricing reference (per 1M tokens)
Source: Anthropic pricing page. Cached input enjoys a 90% discount.
| Model | Input / 1M | Output / 1M | Context |
|---|---|---|---|
| Claude Opus 4.7 Anthropic | $15.00 | $75.00 | 200K |
| Claude Sonnet 4.6 Anthropic | $3.00 | $15.00 | 200K |
| Claude Haiku 4.5 Anthropic | $1.00 | $5.00 | 200K |
What you'll use this for
LLM costs scale fast. A quick estimate before you ship saves real money in production.
Budget planning
Project monthly and annual API spend before you ship. Catch surprises before billing does.
Comparing models
Pick the right model for your use case. Cheapest that passes your evals usually wins.
Cost optimization
Estimate caching impact, identify the cheapest viable model, find the breakeven for a smaller tier.
Pricing transparency
Show stakeholders concrete numbers for "what does AI cost us?" — no vendor pitch deck required.
How to estimate LLM cost
Paste a representative prompt
Use something real from your app, not a toy example. Token count scales with input length.
Set expected output tokens
How long is the model's reply? 500 tokens is a typical chat response; classification might be 5; agents can run thousands.
Set calls per day
Conservative is fine. Multiply by users × actions/user/day. The yearly figure is usually the eye-opener.
Read totals
Per call, per day, per month, per year. Toggle caching to see the discount impact.
Frequently asked questions
This calculator uses a rough heuristic of ~4 characters per token. Real tokenizers vary: code is denser, languages other than English are sparser, and each provider has its own tokenizer. Expect ±20% accuracy. For exact counts use the model-specific token counters.
From each provider's public pricing page as of 2026. Rates are subject to change; always verify on the provider site before relying on these numbers for procurement decisions.
Yes. No signup, no limits, no ads, no data leaves your browser.
Toggle "Input is cached" for an approximate 90% input-side discount. The exact discount varies by provider (Anthropic: 90%; OpenAI/Google: 50-75%). This calculator uses the Anthropic figure as a useful upper bound.
A few reasons. (1) Token counts on the provider may differ slightly from our ~4-char estimate. (2) System prompts, tool definitions, and retrieved context all count toward input. (3) Provider rates may have changed since this tool was last updated. (4) Some providers add surcharges for premium tiers, regional endpoints, or long-context overflow. Use this for ballpark estimates, not for final accounting.
About Claude pricing
Anthropic prices Claude per million tokens with a clean tier structure: Opus is the flagship at $15 / $75 per 1M (input / output), Sonnet sits in the middle at $3 / $15, and Haiku is the small fast model at $1 / $5. Output is always 5× the input rate — a deliberate signal that long replies cost real money.
Picking the right Claude
Opus for hard reasoning, long autonomous agentic loops, code generation. Sonnet for most chat / RAG / coding assistant use cases — it's the workhorse. Haiku for high-volume classification, summarization, simple tool use where latency and price dominate.
Prompt caching
Anthropic's prompt caching gives a 90% discount on cached input tokens. Cache writes cost 25% more than uncached input on first write, then 10% on reads. For repeated system prompts (long instructions, large RAG context), enable caching — the math usually works out after 2-3 reuses.