Claude 5 Sonnet token & cost calculator
Claude 5 Sonnet is the current-generation workhorse — the model most production workloads should default to before reaching for Opus. It brings two changes that matter for budgeting: a 1,000,000-token context window (5× the 200K on Sonnet 4.5) and Anthropic's newer tokenizer, which counts about 30% more tokens for the same text. It's launching at an introductory $2 input / $10 output per million through August 31, 2026, then moves to standard $3/$15 on September 1.
The net effect today: Sonnet 5 is both newer and cheaper than Sonnet 4.5 — but the higher token count from the new tokenizer offsets part of the lower rate, so price a real prompt rather than assuming the intro discount flows straight through. After the intro window, the decision between 4.5 and 5 comes down to context window and quality, not price.
Saved scenariosnone yet
Saved on this browser only — never uploaded. Up to 10 scenarios.
Tip: save a scenario when you have a prompt + model + response length you might revisit. Useful for sizing features before committing to a vendor.
Verify privacysince this page loaded — updates live
Open DevTools → Network. Type into the calculator. No request bodies should contain your prompt text.
Pricing
Sonnet 5 is flat-priced — no tier surcharge across its million-token context. Today's rate is the introductory $2/$10 per million; on September 1, 2026 it becomes $3/$15. The dataAsOf date on this page tracks when we last reconciled against Anthropic's published rate.
| Tier | Input $/M | Output $/M |
|---|---|---|
| All input | $2 | $10 |
| Context window | 1,000,000 tokens | |
Verified against platform.claude.com on 2026-07-06.
Worked examples
Costs at the current introductory $2/$10 rate, from a short turn up to a large single-call input its million-token window now allows. Paste your own prompt above to price it exactly — and remember the September 1 move to $3/$15 raises each of these by half.
| Scenario | Input | Output | Cost |
|---|---|---|---|
Short chat turn A typical Q&A turn with a small system prompt. | 800 | 400 | <$0.01 |
RAG answer Retrieved context plus a grounded, structured response. | 12,000 | 800 | $0.032 |
Long-document Q&A A large input that wouldn't have fit in Sonnet 4.5's 200K window. | 200,000 | 2,000 | $0.420 |
Near-full context Close to the million-token ceiling in a single request. | 900,000 | 4,000 | $1.84 |
The input/output ratio is where Sonnet budgets are won or lost: at $2 input vs. $10 output (and $3 vs. $15 after September), a chat product whose typical turn is 800 input + 400 output spends most of its money on generated tokens. Clamp max_tokens, and cache stable prefixes — cached reads run at roughly a tenth of the input rate.
How is this counted?
Sonnet 5 uses Anthropic's newer tokenizer, which produces roughly 30% more tokens than the previous Claude encoding on the same text. Anthropic doesn't publish a client-side tokenizer, so we approximate: count with cl100k_base (gpt-tokenizer, MIT), then apply a ~1.3× calibration to track the newer tokenizer. That makes Sonnet 5 estimates rougher than for Sonnet 4.5 — budget ±10%, not ±2% — so treat the number as a planning figure and reconcile against the API response headers. Inputs over 50,000 characters run in a Web Worker.
FAQ
Why is Claude 5 Sonnet cheaper than Claude 4.5 Sonnet right now?
How is Claude 5 Sonnet different from Claude 4.5 Sonnet?
How accurate is the token count?
What is the context window?
When should I still reach for Opus?
Compare against every other model
To see this exact prompt scored against every supported model, sorted by total cost, paste it into the home calculator and toggle Compare across all models. Numbers are exact for OpenAI and approximate for Claude and Gemini — within ±2–3% for most, wider for the newer-tokenizer Claude models (Sonnet 5, Opus 4.7/4.8).
Related models
The natural comparison set: Claude 4.5 Sonnet (the prior-generation Sonnet, 200K context, standard $3/$15), Claude 4.8 Opus (the flagship, when the task needs stronger reasoning), and Claude 4.5 Haiku (the budget tier for high-volume, latency-sensitive work).