Model Guide

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.

Bar chart of measured cost per 1,000 tasks for six Claude tiers - Haiku 4.5, Sonnet 5, Sonnet 4.6, Opus 4.8, Opus 5 and Opus 5 Fast

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.

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.

ModelScoreMeasured cost / 1k tasksMean latencyReasoning tokensList price in / out per 1MPriced at
Claude Haiku 4.59/9$0.943.7 s0$1 / $52026-07-29
Claude Sonnet 59/9$1.677.2 s0$2 / $102026-07-17
Claude Sonnet 4.69/9$2.224.9 s0$3 / $152026-07-29
Claude Opus 4.89/9$4.056.1 s0$5 / $252026-07-17
Claude Opus 59/9$5.645.3 s6$5 / $252026-07-30
Claude Opus 5 Fast9/9$10.203.4 s6$10 / $502026-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.

The Claude ladder: same 9/9, $0.94 to $10.20 per 1,000 tasksNine executed Python tasks, temperature 0, one scored attempt each. Every bar below scored 9/9.Claude Haiku 4.5$0.94Claude Sonnet 5$1.67Claude Sonnet 4.6$2.22Claude Opus 4.8$4.05Claude Opus 5$5.64Claude Opus 5 Fast$10.20One scale throughout: 55 px per dollar. Cost is measured token counts multiplied by list price on the date shown in the table above.
Chart: DataLLM Lab. Scores, latencies and token counts are measured on our executed nine-task benchmark; cost is those token counts multiplied by each model's list price on the date shown in the table above. Method: our methodology. Full run: the coding cost benchmark.

Three details in that table are worth pulling out, because a spec sheet cannot show you any of them.

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:

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.

The rule we actually apply. Rank by cost per completed task on your own workload, and find the point where your workload stops being easy. That point is the only place the Sonnet-vs-Opus question has an answer, and it is different for every codebase. Below it, the ladder is a pricing structure. Above it, it is a quality gradient.

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 tierScoreList price in / out per 1MMeasured cost / 1k tasksMean latencyPriced at
Claude Opus 4.89/9$5 / $25$4.056.1 s2026-07-17
Claude Opus 59/9$5 / $25$5.645.3 s2026-07-30
Claude Opus 5 Fast9/9$10 / $50$10.203.4 s2026-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.

SpecClaude Opus 5Claude Opus 4.8Claude 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 window1M tokens1M tokens1M tokens
Max output128k (300k batch)128k (300k batch)128k (300k batch)
Knowledge cutoff (reliable)May 2026Jan 2026Jan 2026
Thinking / effort controlAdaptive; five effort levels incl. xhighAdaptive (effort defaults high)Adaptive (effort defaults high)
Launched2026-07-242026-05-28Earlier in 2026
Our score, 9 executed Python tasks9/99/99/9
Our measured cost / 1k tasks$5.64 (2026-07-30)$4.05 (2026-07-17)$1.67 (2026-07-17)
Our mean latency5.3 s6.1 s7.2 s
Our reasoning tokens, mean600
Anthropic's best-forComplex agentic coding and enterprise work — the docs' default pickSame role, now filed under "legacy models"Best combination of speed and intelligence
How this is sourced. Spec and price rows come from Anthropic's Pricing and Models overview docs, the Opus product page, and the Opus 4.8 and Sonnet 5 launch posts. Sonnet 5's $2/$10 is introductory through Aug 31, 2026, with standard $3/$15 from Sep 1, 2026. Rows marked Our are measured on our own harness; every other row is Anthropic's. Two things moved when Opus 5 shipped and are worth naming: the Models-overview batch note now lists Opus 5 itself among the models that reach 300k output via the 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:

ModelInput costOutput costTotal / 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:

Q1: Frontier-hard reasoningor compounding agent run? yes Opus 5 or 4.84.8 was cheaper for us no Q2: High-volume orlatency-sensitive? yes Sonnet 5 or Haiku 4.5both 9/9 on our tasks no Q3: Everything else(the default) Sonnet 5 Then benchmark thefew that underperform
Diagram: DataLLM Lab. Default to Sonnet 5; escalate to Opus only for frontier-hard or compounding-agent work. Q1 routing follows Anthropic's Models-overview guidance, July 2026; the cost notes on the right-hand boxes are our measured figures.

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:

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.

Written by

Founder of DataLLM Lab, the unified LLM gateway. Kevin tests models the boring way — same prompts, real costs, unedited outputs — and writes up what the runs actually show. Articles are drafted with AI assistance and published under his name; every first-party number comes from an executed run.

One API for every model

One API, every model.

Get a single API key for Claude Opus 4.7, GPT-5.4, and 300+ more — with automatic price comparison and routing to the best model for every request.