Claude 4.8 Opus token & cost calculator
Claude 4.8 Opus is Anthropic's current flagship — the most capable model in the Claude line and the default choice when the task is genuinely hard and correctness is the product. It prices at $5 input / $25 output per million tokens, carries the full 1,000,000-token context window, and supersedes Opus 4.7 at the same rate. Unless you've deliberately pinned an older snapshot, 4.8 is the Opus you want.
The economics changed with this generation: Opus used to command a 5× premium over Sonnet, but at $5/$25 it's only about 1.7× Claude 4.5 Sonnet. That makes reaching for Opus far less punishing than it once was — though Sonnet is still cheaper per token, so the discipline is unchanged: route the easy majority to Sonnet or Haiku and spend Opus on the requests that actually need its reasoning.
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
Opus 4.8 is flat-priced at $5/$25 across its full million-token context — no tier surcharge on large inputs. Output is 5× input, the same input-to-output ratio as the rest of the Claude line. An optional Fast mode research preview runs at double the rate ($10/$50) for lower latency; this calculator prices the standard tier.
| Tier | Input $/M | Output $/M |
|---|---|---|
| All input | $5 | $25 |
| Context window | 1,000,000 tokens | |
Verified against platform.claude.com on 2026-07-06.
Worked examples
Concrete costs at Opus 4.8's $5/$25 rate — from a short turn up to the large single-call inputs its million-token window allows. Paste your own prompt above to price it exactly.
| Scenario | Input | Output | Cost |
|---|---|---|---|
Short chat turn A one-off question with a small system prompt. | 800 | 400 | $0.014 |
Agentic coding step Repo context plus tool results and a substantial edit. | 40,000 | 6,000 | $0.350 |
400K-token input A large codebase or document set in a single call. | 400,000 | 6,000 | $2.15 |
Near-full context Close to the million-token ceiling in one request. | 900,000 | 8,000 | $4.70 |
The agentic case is the one to watch: coding agents re-send the full working context plus tool output every turn, so a long Opus session compounds fast. Cache the stable prefix (system prompt, repo map, docs) aggressively — cached reads run at roughly a tenth of the input rate — and the bill flattens dramatically.
How is this counted?
Opus 4.8 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's higher count. That makes Opus estimates rougher than for older Claude models — 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
Should I use Opus 4.8 or Opus 4.7?
What does Fast mode cost?
How accurate is the Opus token count?
What is the context window?
Is Opus 4.8 worth it over Sonnet?
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 (Opus 4.7/4.8, Sonnet 5).
Related models
The natural comparison set: Opus 4.7 (the prior flagship, identical price), Claude 4.5 Sonnet (the workhorse most requests should default to), and Claude 5 Sonnet (the current-generation Sonnet with the same million-token window at a lower rate).