Skip to main content
tokenmath
Menu

By tokenmath Research Desk · Pricing verified 2026-07-05

Claude 4.7 Opus token & cost calculator

Claude 4.7 Opus is Anthropic's premium reasoning model — the one you reach for when the task is genuinely hard and correctness is the product. At $5 input / $25 output per million tokens it's the priciest model in this calculator, but far more accessible than the Opus generation before it: the 4.7 rate is about 1.7× Claude 4.5 Sonnet, not the 5× premium Opus used to command. It also carries the full 1,000,000-token context window — 5× Sonnet's 200K.

The discipline that keeps Opus economic is still routing. Send the easy majority of requests to Sonnet or Haiku and reserve Opus for the ones that actually need its reasoning. The price cut makes a 100%-Opus workload far less catastrophic than it used to be, but Sonnet is still cheaper per token — so route by difficulty, not by default.

Client-side. Never uploaded.
0 / 1,000,000 charactersContext window: 1,000,000 tokens
Or start with an example
Total estimated cost
$0.026Claude 4.7 Opus
Tokens±2% approx
0
Input cost
$0.00
Output cost (est.)
$0.026
@ 1,024 response tokens
Context used
0%
of 1,000,000
Verified 2026-07-05 · ±2%
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
Prompt uploads0Always 0 — by design
Outgoing requests0Analytics + page assets only — no prompt content
Cookies on this origin0Vercel Analytics + Clarity may set first-party cookies
localStorage keys0Theme preference + saved scenarios live here
Server endpoints1/api/og only — accepts title + subtitle, never prompt text
Inspect

Open DevTools → Network. Type into the calculator. No request bodies should contain your prompt text.

Pricing

Opus is flat-priced — no tier surcharge, even across its full million-token context. Output is 5× input ($5 → $25 per million), the same input-to-output ratio as Sonnet and Haiku; only the absolute numbers are higher.

TierInput $/MOutput $/M
All input$5$25
Context window1,000,000 tokens

Verified against platform.claude.com on 2026-07-05.

Worked examples

Concrete scenarios at Opus 4.7's $5/$25 rate — from a short turn up to the large single-call inputs its million-token window now allows. The calculator above uses the same math; paste a real prompt to price it exactly.

ScenarioInputOutputCost
Short chat turn
A one-off question with a small system prompt.
800400$0.014
Deep reasoning task
A hard problem with context and a long, reasoned answer.
20,0004,000$0.200
400K-token input
A large codebase or document set — the kind of call Opus 4.7's 1M window unlocks.
400,0006,000$2.15
Near-full context
Close to the million-token ceiling in a single request.
900,0008,000$4.70

Read these as a budget for selective use. Opus earns its price when a slice of high-stakes requests justifies the premium over Sonnet; at ~1.7× Sonnet's rate that gap is smaller than it was, but on a high-volume workload it still compounds — which is why difficulty-based routing beats defaulting everything to Opus.

How is this counted?

Opus 4.7 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

When is Opus 4.7 actually worth it?
When reasoning quality is the product, not the plumbing. At $5/$25 per million, Opus 4.7 costs about 1.7× Sonnet 4.5 — far more accessible than the old 5× Opus premium, but still the priciest model in this calculator. Reserve it for tasks where a lift in correctness pays for itself: hard agentic coding, deep multi-document synthesis, ambiguous reasoning chains. If Sonnet solves the task with a tighter prompt, that is still the cheaper answer.
How do I avoid runaway Opus bills?
Three controls: clamp max_tokens, route to Opus only after a Sonnet first-pass flags a request as hard, and cache what you can. The 4.7 price cut (down from the old $15/$75 to $5/$25) makes Opus far less punishing than it was — but it is still the most expensive per token, and its newer tokenizer packs roughly 30% more tokens into the same text, so a request costs more than an old cl100k estimate would suggest.
How accurate is the Opus token count?
Rougher than for older Claude models. Opus 4.7 uses Anthropic's newer tokenizer, which produces about 30% more tokens than the previous encoding on the same text. We approximate it by applying a ~1.3× calibration to the cl100k_base count — a solid planning estimate, but the true multiplier shifts with content, so treat Opus counts as roughly ±10% rather than the ±2% we quote for older Claude models. Reconcile against the API response headers for billing.
What is the context window?
1,000,000 tokens. Opus 4.7 carries the full million-token window — 5× the 200,000 that Sonnet 4.5 and Haiku 4.5 offer. The calculator warns you when input alone would exceed it.
How does it compare to Gemini 2.5 Pro's long context?
Both now handle million-token inputs, but the pricing geometry differs. Opus 4.7 is flat-priced at $5/$25 no matter the input size; Gemini 2.5 Pro adds a tier surcharge above 200,000 tokens (input and output roughly double). On hard reasoning over large context, Opus's flat rate can undercut Gemini's upper tier while bringing stronger reasoning — a different calculus than when Opus was capped at 200K.

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 Opus 4.7's newer tokenizer.

The natural comparison set: Sonnet (the model most workloads should default to before reaching for Opus), Haiku (the budget option for the routing layer below Opus), and Gemini 2.5 Pro (the cross-vendor long-context option with tiered pricing).

Keyboard shortcuts

Press ? any time to reopen this list.

Show this overlay?
Toggle themet
Focus the prompt textarea/
Go to homegh
Go to modelsgm
Go to pricing datagp
Go to changeloggc
Go to aboutga
Close overlays / dialogsEsc

We use Vercel Web Analytics for aggregate page metrics and (optionally) Microsoft Clarity for masked session replay. Prompt content is never sent. Read the privacy policy.