Claude Sonnet vs Opus: We Measured Every Tier (Same 9/9, $0.94 to $10.20)
Most Sonnet-vs-Opus pages restate Anthropic's model table. This one reports a run. We put six Claude tiers through one executed nine-task Python benchmark — Haiku 4.5, Sonnet 5, Sonnet 4.6, Opus 4.8, Opus 5 and Opus 5 Fast. Every one of them scored 9/9. The measured cost ranged from $0.94 to $10.20 per 1,000 tasks, a spread of 10.9x with no movement in the score column. So on this class of work — short, well-specified functions — the tier choice is a cost decision, not a capability one. That result is real and it is narrow, and the second section explains exactly how narrow, because the ladder exists for work this harness does not touch.
The short answer, measured
On nine short, well-specified Python functions, every Claude tier we ran scored an identical 9/9 and the measured cost ranged from $0.94 to $10.20 per 1,000 tasks. Same nine problems, same grader, same settings, one attempt each. The score column did not move once.
That gives the Sonnet-vs-Opus question a concrete answer for one specific class of work: if your tasks look like ours, pick on cost. Sonnet 5 did what Opus 4.8 did for 2.4x less and what Opus 5 did for 3.4x less. Haiku 4.5 did it for 6.0x less than Opus 5. Nothing in our data justifies paying up.
- Bounded, clearly specified code generation — function-level work, small refactors with a stated contract, format conversion, test scaffolding. On our evidence, start at the bottom of the ladder and make the expensive tier prove it is needed.
- Long context, sustained multi-step reasoning, agentic tool use, ambiguous specs — the four things the ladder is actually sold for. We measured none of them. On these, our tie is not evidence of anything. See why the tiers still exist.
The rest of this page gives you the measured table, the third-party specs from Anthropic's docs, the list-price arithmetic, and a way to run the same comparison on your own tasks. The older Opus 4.1 vs Sonnet 4.5 pairing maps onto the same call.
Six Claude tiers, one score
Six Anthropic models have now been through this harness. All six returned 9/9 with no misses. Rows are ordered by measured cost, cheapest first.
| Model | Score | Measured cost / 1k tasks | Mean latency | Reasoning tokens | List price in / out per 1M | Priced at |
|---|---|---|---|---|---|---|
| Claude Haiku 4.5 | 9/9 | $0.94 | 3.7 s | 0 | $1 / $5 | 2026-07-29 |
| Claude Sonnet 5 | 9/9 | $1.67 | 7.2 s | 0 | $2 / $10 | 2026-07-17 |
| Claude Sonnet 4.6 | 9/9 | $2.22 | 4.9 s | 0 | $3 / $15 | 2026-07-29 |
| Claude Opus 4.8 | 9/9 | $4.05 | 6.1 s | 0 | $5 / $25 | 2026-07-17 |
| Claude Opus 5 | 9/9 | $5.64 | 5.3 s | 6 | $5 / $25 | 2026-07-30 |
| Claude Opus 5 Fast | 9/9 | $10.20 | 3.4 s | 6 | $10 / $50 | 2026-07-30 |
Every Opus row costs more than every Sonnet row, and no Opus row scores higher. That is the finding on this workload, stated as plainly as we can. It is not that Opus is a weak model — it is that nine short Python functions sit far below the level at which its price starts buying something we can detect.
Three details in that table are worth pulling out, because a spec sheet cannot show you any of them.
- The newest Sonnet is the cheapest Sonnet. Sonnet 5 measured $1.67 against Sonnet 4.6's $2.22, because Sonnet 5 lists at $2 / $10 per 1M and Sonnet 4.6 at $3 / $15. Same 9/9. Sonnet 4.6 keeps one advantage: 4.9 s against 7.2 s.
- Speed does not follow the ladder. Opus 5 averaged 5.3 s, faster than Opus 4.8 at 6.1 s and faster than Sonnet 5 at 7.2 s. Opus 5 Fast averaged 3.4 s — second-fastest of the 23 models we have run on this harness, behind Mistral Medium 3.5 at 2.9 s. Latency and cost are separate axes and they disagree, which is the same disagreement we found across the whole field in the AI coding ranking.
- Four of the six emitted zero reasoning tokens. Haiku 4.5, Sonnet 5, Sonnet 4.6 and Opus 4.8 answered directly. Opus 5 and Opus 5 Fast averaged 6. Nothing in the Claude ladder carried a large thinking-token surcharge here — unlike Gemini 3.1 Pro, which also scored 9/9 on the same nine tasks but averaged 1,094 reasoning tokens and cost $14.70 per 1,000 tasks priced 2026-07-29.
For scale outside the family: 23 models have now been through this harness and 20 of them scored 9/9. Our original sweep was 13 models run in one sitting; the other ten ran later under identical settings. Within that combined set the cheapest 9/9 was Qwen3 Coder Next at $0.10 per 1,000 tasks priced 2026-07-17, and the priciest was Gemini 3.1 Pro at $14.70 — a 147x spread for the same score. The Claude ladder's internal 10.9x spread sits inside a field-wide spread that is far wider.
Why the tiers still exist — read this before you downgrade
Our harness runs nine short, self-contained Python functions. That is the whole scope, and it is not what Sonnet and Opus are sold for. If you read the table above as "just use Haiku," you have read it wrong, and we would rather say so here than in a footnote.
Anthropic differentiates the ladder on four things. We tested none of them:
- Long context. Every task in our harness fits in a few hundred tokens. Both Opus 5 and Sonnet 5 carry a 1M-token window. We have no data on what happens at 200,000 tokens, and a tie at 300 tokens says nothing about it.
- Sustained multi-step reasoning. Our tasks are single-shot: read a spec, return a function. Nothing compounds, so nothing can compound wrongly. That is precisely the failure mode a bigger model is bought to avoid.
- Agentic tool use. The harness is single-turn. No tools, no loop, no plan, no recovery from a bad step. An agent that makes twenty calls per run has twenty chances to go off the rails, and we measured zero of them.
- Ambiguous specifications. Every task ships a signature and a prose spec written to be unambiguous. Real work is not written that way. Handling a vague brief — knowing which question to ask — is the capability our test design deliberately removes.
So the honest shape of this page is: here is the one workload where we can show the tiers are equivalent, here is exactly how narrow that workload is, and here is how to test your own. A tie on nine bounded functions means the test did not reach the models. It does not mean the models are the same.
Claude Opus 5: same list price as 4.8, 39% more per task
Anyone asking Sonnet-vs-Opus in mid-2026 needs to know Opus 5 exists. It launched 2026-07-24, and per Anthropic's Opus product page and the launch coverage it carries a 1M-token context window with no beta header and no long-context price premium, up to 128K output tokens, adaptive thinking by default, and a five-level effort setting including a new xhigh mode. Anthropic positions it as approaching Claude Fable 5's intelligence at half the price, and prices it identically to Opus 4.8 at $5 / $25 per 1M. We have not run Fable 5 on this harness, so we have nothing measured to say about that comparison — our Fable 5 page covers what Anthropic has published.
Here is the counterintuitive part, and it only shows up if you measure. Opus 5 and Opus 4.8 have the same list price, and Opus 5 cost 39% more per task on our benchmark: $5.64 against $4.05 per 1,000 tasks, for the identical 9/9.
| Opus tier | Score | List price in / out per 1M | Measured cost / 1k tasks | Mean latency | Priced at |
|---|---|---|---|---|---|
| Claude Opus 4.8 | 9/9 | $5 / $25 | $4.05 | 6.1 s | 2026-07-17 |
| Claude Opus 5 | 9/9 | $5 / $25 | $5.64 | 5.3 s | 2026-07-30 |
| Claude Opus 5 Fast | 9/9 | $10 / $50 | $10.20 | 3.4 s | 2026-07-30 |
The gap is token count, not a price change. The two rows were priced on different dates — 2026-07-30 for Opus 5, 2026-07-17 for Opus 4.8 — but at the same $5 / $25 rate, so the arithmetic is not moving underneath us. Opus 5 simply returned more tokens on the same nine tasks. What we cannot separate from our data is why: a longer answer and a different tokenization both look identical in a usage report. Either way, on identical sticker prices you pay 39% more per completed task, and you get 0.8 s back per call.
Opus 5 Fast is the same trade pushed further. It lists at exactly 2x Opus 5 — $10 / $50 — and measured 1.8x, $10.20 against $5.64, so it returned slightly fewer tokens than Opus 5 on the same work. What it buys is latency: 3.4 s, the fastest of any Claude tier we have run, against Opus 5's 5.3 s. Whether 1.9 s is worth $4.56 per 1,000 tasks depends entirely on whether a human is waiting.
The practical read for a Sonnet-vs-Opus decision: if you were going to pick Opus for bounded code work, Opus 4.8 is the cheaper Opus on our tasks — not the newer one. If you need Opus for the things we did not test, that ranking may invert, and Opus 5's xhigh effort mode and 1M window are exactly the features aimed at that work. We just have not measured it. Our tier-over-tier comparison of the previous generation is in Opus 4.8 vs 4.7.
Opus 5, Opus 4.8 and Sonnet 5 side by side
The three models share a context window; they diverge on price, latency, effort control and measured cost per task. Spec rows are from Anthropic's primary docs, verified July 2026. Measured rows are ours.
| Spec | Claude Opus 5 | Claude Opus 4.8 | Claude Sonnet 5 |
|---|---|---|---|
| Input price (per 1M tokens) | $5 | $5 | $2 (intro, then $3) |
| Output price (per 1M tokens) | $25 | $25 | $10 (intro, then $15) |
| Context window | 1M tokens | 1M tokens | 1M tokens |
| Max output | 128k (300k batch) | 128k (300k batch) | 128k (300k batch) |
| Knowledge cutoff (reliable) | May 2026 | Jan 2026 | Jan 2026 |
| Thinking / effort control | Adaptive; five effort levels incl. xhigh | Adaptive (effort defaults high) | Adaptive (effort defaults high) |
| Launched | 2026-07-24 | 2026-05-28 | Earlier in 2026 |
| Our score, 9 executed Python tasks | 9/9 | 9/9 | 9/9 |
| Our measured cost / 1k tasks | $5.64 (2026-07-30) | $4.05 (2026-07-17) | $1.67 (2026-07-17) |
| Our mean latency | 5.3 s | 6.1 s | 7.2 s |
| Our reasoning tokens, mean | 6 | 0 | 0 |
| Anthropic's best-for | Complex agentic coding and enterprise work — the docs' default pick | Same role, now filed under "legacy models" | Best combination of speed and intelligence |
output-300k-2026-03-24 header, and Opus 4.8 and Sonnet 4.6 have been moved into the docs' "legacy models" table. Both remain callable and priced; legacy is not deprecated. Anthropic's published batch rate halves both list prices — Opus 4.8 at $2.50 / $12.50 and Sonnet 5 at $1 / $5 — and Opus cache reads run $0.50 per 1M, a 10x discount on cached input. The full rate card is in the Claude API pricing guide.One caveat that has surprised people all year: Opus has not been Anthropic's single most capable model since Fable 5 shipped. The docs describe Claude Fable 5 as the most capable widely released model, and the Opus 4.8 launch post called 4.8 "a modest but tangible improvement on its predecessor." Opus 5's pitch is explicitly to close that distance at Opus pricing. We have measured none of that gap, in either direction.
The list-price cost math (and a tokenizer gotcha)
On list price Sonnet is 2.5x cheaper than either Opus today; on our measured tasks it was 2.4x cheaper than Opus 4.8 and 3.4x cheaper than Opus 5. Take a representative request — 50k input tokens, 2k output — and price it at base rates:
| Model | Input cost | Output cost | Total / request |
|---|---|---|---|
| Opus 5 or Opus 4.8 ($5 / $25) | $0.250 | $0.050 | $0.300 |
| Opus 5 Fast ($10 / $50) | $0.500 | $0.100 | $0.600 |
| Sonnet 5 intro ($2 / $10) | $0.100 | $0.020 | $0.120 |
| Sonnet 5 standard ($3 / $15) | $0.150 | $0.030 | $0.180 |
| Haiku 4.5 ($1 / $5) | $0.050 | $0.010 | $0.060 |
At introductory pricing Sonnet is 2.5x cheaper than Opus per request; at standard pricing (from Sep 1, 2026) it is still 1.67x cheaper. Run that request a million times a month and the Opus-to-Sonnet difference is $180,000 (intro) or $120,000 (standard). That is list-price arithmetic on a hypothetical request, not a measured result — but it is why the default-to-Sonnet rule pays for itself before anyone argues about quality.
Our measured numbers project the same way and are worth stating in annual terms. A thousand tasks of roughly our size per day works out to about $610 a year on Sonnet 5, $1,480 on Opus 4.8, $2,060 on Opus 5 and $3,720 on Opus 5 Fast — a projection from measured per-task cost, not a bill anyone sent us. Put any of them inside an agent loop making twenty calls per run and the multiple applies again, which is the mechanism in AI agent traps.
Two things to hold onto when Sonnet 5's introductory window closes. First, our $1.67 figure uses the $2 / $10 rate in force on its pricing date; recompute it at $3 / $15 and it becomes about $2.51 per 1,000 tasks — still less than half of Opus 5's $5.64. Second, the tokenizer gotcha: both Opus 4.8 and Sonnet 5 use a newer tokenizer (introduced with Opus 4.7) that produces roughly 30% more tokens for the same text than Sonnet 4.6 and earlier. That does not distort the table above, because our measured cost multiplies the token counts the API actually reported — whatever tokenizer produced them — by list price. It does mean a per-word comparison against an older model will read worse than the per-token price suggests. The broader cost-cutting playbook is in the cheapest LLM API guide, and the cost calculator runs the arithmetic on your own token mix.
A 10-second decision framework
Ask three questions in order; the first yes picks your model. This is the version we apply when routing a new workload, updated for what we measured:
The subtlety in Q1 is that a compounding agent run can justify Opus even when every individual step looks easy, because an early wrong decision snowballs and a rerun costs more than the token difference. That is a real effect and our harness cannot see it — there is nothing to compound in a single-turn function call. For a deeper treatment of agent-loop economics see the LLM-for-agents guide; for the code-quality side, the best coding LLM guide.
The subtlety in Q2 is that Haiku 4.5 is now a serious answer to it, not a fallback. It scored the same 9/9 at $0.94 and 3.7 s — details in the Haiku 4.5 review, and the wider sub-$1 tier in the cheap coding model roundup.
Opus 4.1 vs Sonnet 4.5: exactly the same decision
If you are searching "sonnet 4.5 vs opus 4.1," the framework above is your answer — the tradeoff is evergreen. Every Claude generation ships the same tiers: Opus is the most capable and most expensive, Sonnet is the balanced, faster, cheaper model that carries most workloads, Haiku is the small one. Opus 4.1 vs Sonnet 4.5 was the same call you make today between Opus 5 and Sonnet 5: default to Sonnet, escalate to Opus for the hardest reasoning.
Two reasons to use the current pair rather than the older one. The newer models are more capable by Anthropic's own account — Sonnet 5 is positioned as the most agentic Sonnet yet — and the pricing is dramatically better at the top. Opus 4.1 lists at $15 / $75 per 1M as captured 2026-07-29, three times what Opus 5 and Opus 4.8 cost at $5 / $25. If you locked onto Opus 4.1 in an older integration, migrating is a straight win on price — and it is no longer optional. Anthropic's Models overview marks claude-opus-4-1-20250805 deprecated with a retirement date of August 5, 2026, and points the migration at Opus 5. Sonnet 4.5 is not deprecated and still lists at $3 / $15. We have not run Opus 4.1 or Sonnet 4.5 on this harness, so we have no measured comparison for either — only the rate card. Watch the tokenizer change when you re-benchmark, and see our Claude context-window explainer for how the 1M window behaves across generations.
How to test the tier question on your own workload
The only Sonnet-vs-Opus answer that binds is the one you measure on your own tasks. Ours took an afternoon to build and it is deliberately simple enough to copy:
- Pick tasks you can grade automatically. Execution beats judgement. If the output is code, run it against assertions the model never sees. If it is extraction, diff against a known answer. An LLM judge introduces a second model's opinion into your result.
- Make it the work you actually do. Our nine functions failed to separate six tiers precisely because they are easy. If your real work involves 80k-token context, a tool loop, or a spec that a human would have to ask about, put that in the harness — otherwise you will reproduce our tie and learn nothing about your case.
- Score cost per completed task, not cost per token. A model that costs 3x per token and needs no retry can be cheaper end to end. Multiply the token counts your provider reports by list price on a date you write down.
- Change one thing at a time. Temperature 0, one attempt per task, same prompt across models. We retry only on an API error, never on a wrong answer, because buying one model a second try quietly deletes the result.
- Keep the model id in config. Behind one OpenAI-compatible endpoint, swapping Sonnet 5 for Opus 5 is a string change, so re-running the comparison next quarter costs you minutes. See what an LLM gateway is and the OpenAI-compatible API explainer.
Sometimes the honest outcome is that neither tier is the answer. Going smaller — Claude Haiku 4.5 at $1 / $5 — beat both on our tasks. Going wider can beat all three: on the same nine tasks Qwen3 Coder Next scored 9/9 at $0.10 per 1,000 tasks priced 2026-07-17, 56x under Opus 5. Whether that holds on your workload is exactly the thing to test. Options are in the best LLM API roundup and the open-source LLM guide, with failover if one model is overloaded.
Test the whole Claude ladder on one key
DataLLM Lab gives you Claude Opus 5, Opus 4.8, Sonnet 5, Sonnet 4.6 and Haiku 4.5 — plus 300+ other models — behind one OpenAI-compatible endpoint. Swap the model id, run your own tasks, compare the bill. Base URL https://www.datallmlab.com/v1.
How these numbers were produced
Nine executed Python tasks: two_sum, valid_parentheses, merge_intervals, roman_to_int, lcs_len, flatten, top_k_words, token_bucket, parse_csv_line.
The model receives a function signature and a prose spec. It never sees the assertions. The returned code runs against hidden assertions in an isolated python3 -I subprocess with a 12-second timeout. Every assertion passes or the task fails — no partial credit, no human grader, no LLM judge.
Temperature 0, max_tokens 4000. One scored attempt per task. The harness retries only on an API error, never on a wrong answer, which is why a miss would have stayed a miss.
Cost is derived, not invoiced. It is the token counts the API reported multiplied by that model's list price on a stated date. Opus 5 and Opus 5 Fast ran and are priced at 2026-07-30; Haiku 4.5 and Sonnet 4.6 at 2026-07-29; Sonnet 5 and Opus 4.8 at 2026-07-17. List prices move — 49 of roughly 396 catalogue models changed price in the twelve days to 2026-07-29 — so an undated cost figure is not a fact, and every number here should be recomputed against current rates before you act on it.
Calls go through OpenRouter's OpenAI-compatible endpoint, deliberately not through the DataLLM Lab gateway. Nothing on this page depends on our own infrastructure and you do not have to be our customer to reproduce it.
Our original sweep was 13 models run in one sitting, of which 10 scored 9/9. Ten more models have since run on the same harness under identical settings, bringing the total to 23, of which 20 scored 9/9. Where this page says 23 models, that is the combined set; the core sweep was and remains 13. The full run is in the coding cost benchmark and the design notes are on the methodology page.
What we did not measure
Not measured at all: long-context reasoning, multi-file refactoring, agentic or multi-turn tool use, any non-Python language, and vision. The harness is single-turn. It does not run agents and it does not use tools. Everything Anthropic differentiates the Claude tiers on commercially sits in that list, which is the whole reason the tier section is above the fold rather than here.
A known scoring artefact: the 4,000-token ceiling can truncate a very verbose model mid-answer, and a truncated answer scores as a miss. That penalises verbosity, which is a real production cost but is not the same thing as being wrong. None of the six Claude tiers was affected — all scored 9/9 — but the ceiling is part of the harness and you should know it is there.
Nine tasks is nine data points. A 9/9 is a clean result on this set, not a claim about a distribution. We did not run it twice, we did not vary the prompts, and we did not buy any model a retry.
Not tested, and never claimed as ours: Claude Fable 5, Claude Opus 4.1, Claude Sonnet 4.5, GPT-5 nano, Ollama or any locally-run model, Grok 3, Grok 4, Grok 4.20, grok-build-0.1, VibeThinker, and any Gemini other than 3.6 Flash and 3.1 Pro. Every Opus 5 capability claim on this page — the 1M window with no beta header, 128K output, the five effort levels, the Fable 5 positioning — is Anthropic's, cited above, not something we verified. If a first-party benchmark number for any untested model appears anywhere on this site, it is an error.
FAQ
Should I use Claude Sonnet or Opus?
Default to Sonnet 5 and make Opus prove it is needed. On our nine executed Python tasks Sonnet 5 scored the same 9/9 as Opus 4.8 and Opus 5 at $1.67 per 1,000 tasks against $4.05 and $5.64 — 2.4x and 3.4x cheaper for an identical result. Escalate to Opus for frontier-hard reasoning, long context, compounding agent runs or ambiguous specs, none of which our harness tests. The same rule maps onto the older Sonnet 4.5 vs Opus 4.1 pair.
Did Opus score higher than Sonnet on your benchmark?
No. All six Claude tiers we ran — Haiku 4.5, Sonnet 5, Sonnet 4.6, Opus 4.8, Opus 5 and Opus 5 Fast — scored 9/9 with no misses. The tasks are not hard enough to separate them: 20 of the 23 models we have run scored 9/9, and nine short self-contained Python functions sit inside the competent range of every serious coding model shipping in 2026. A tie means the test did not reach them, not that the tiers are equivalent on the work they are sold for.
What is the price difference between Opus and Sonnet?
On list price, Opus 5 and Opus 4.8 are both $5 / $25 per 1M and Sonnet 5 is $2 / $10 introductory through Aug 31, 2026, then $3 / $15 — so 2.5x cheaper today, 1.67x at standard pricing, per Anthropic's pricing docs. Opus 5 Fast is $10 / $50. On our measured cost per 1,000 tasks the gaps were 2.4x (Opus 4.8) and 3.4x (Opus 5) over Sonnet 5. Anthropic's batch rate halves list prices on both tiers.
Is Claude Opus 5 worth it over Opus 4.8?
Not for bounded code work, on our data. The two carry the same $5 / $25 list price, both scored 9/9, and Opus 5 measured $5.64 per 1,000 tasks against Opus 4.8's $4.05 — 39% more, purely because it returned more tokens on the same nine tasks. It is faster: 5.3 s against 6.1 s. Opus 5 also brings a 1M context window with no beta header and a five-level effort setting including xhigh, per Anthropic — features aimed squarely at work our harness does not test. Priced 2026-07-30 and 2026-07-17 respectively, at the same rate card.
Do Sonnet 5 and the Opus tiers have the same context window?
Yes — Anthropic lists 1M tokens for Sonnet 5, Opus 4.8 and Opus 5, with Opus 5 getting the 1M window without a beta header and without a long-context price premium. Max output is 128k across all three, and all three reach 300k on the Batch API via the output-300k-2026-03-24 beta header. Context is not the differentiator; price, latency and top-end reasoning are. We did not test long-context behaviour, so we cannot tell you how any of them degrade at 500k tokens.
Is your measured cost the same as my bill?
No. We take the token counts the API reported and multiply by each model's list price on a stated date — 2026-07-30 for the Opus 5 tiers, 2026-07-29 or 2026-07-17 for the rest. It is a derived measured cost, not a vendor invoice. Your bill will differ with prompt length, caching, batch discounts, provider routing and any price change since. The ratios between models are the durable part; the absolute dollars are not.
DataLLM Lab