In one October 2026 coding comparison, Claude Sonnet 5.5 passed all 15 completed runs and cost 42% less than Opus 5.5 across the reported test set. But that figure excludes four Sonnet attempts that had to be rerun after hitting a step limit; counting those attempts cuts Sonnet’s reported savings to about 36%. The results are a useful case study—not proof that Sonnet is always more accurate or cheaper.
What the comparison tested
Jessica Wachtel’s October 8, 2026 comparison for The New Stack used the Anthropic API to run three coding tasks five times per model. Both models received identical prompts, adaptive thinking, and maximum effort. The tasks were graded against hidden tests, with tokens, list-price cost, and elapsed time tracked.
As an Amazon Associate I earn from qualifying purchases.
- An agentic bug fix in a small Python repository.
- A dependency resolver implemented from a specification without running code.
- Repairs to concurrency bugs, also without running code.
How the models performed
| Task | Sonnet 5.5 | Opus 5.5 | Reported comparison |
|---|---|---|---|
| Agentic bug fix | Passed all 12 hidden tests in five completed runs. Average cost: $0.70 per run before four failed attempts at a 32,000-token step limit; about $0.98 including those attempts. | Passed all 12 hidden tests in five runs. Average cost: $0.75 per run. | Opus finished about 35% faster. Counting Sonnet’s failed attempts, Opus was slightly cheaper on this task. |
| Dependency resolver | Passed all 120 hidden tests in all five runs. Average cost: $0.82 per run. | Passed all 120 hidden tests in all five runs. Average cost: $1.42 per run. | Sonnet was slightly faster. |
| Concurrency repairs | Passed all eight hidden tests in all five runs. Average cost: $1.02 per run. | Passed in three runs; two runs reached the 128,000-token output limit without producing an answer. Average cost: $2.24 per run, including those failures. | Sonnet passed every run; Opus had two output-limit failures. |
Across the reported 15 runs per model, Sonnet passed 15 of 15 and cost $12.69, while Opus passed 13 of 15 and cost $22.07. The article’s 42% savings figure compares those totals. When Sonnet’s four rerun attempts are included, its reported total rises to $14.09 and the saving is about 36%.
Why “perfect” needs context
Here, “perfect” means that Sonnet passed the hidden tests in 15 completed runs across these three selected tasks. It does not mean the model is error-free on other coding work. The sample is small, uses one author’s prompts and tests, and reflects one API configuration and specific token limits. Five repetitions per task can show how these runs went; they cannot establish a universal reliability rate.
#1 Best Overall
Limits affected the outcomes. Sonnet’s early agentic attempts hit a 32,000-token step limit and had to be redone; the article says the task outcome changed when that limit was raised to 128,000 tokens. In the concurrency task, two Opus runs exhausted a 128,000-token output limit without answering. A comparison that omits failed attempts or retries can therefore make cost and success look different from a tally that includes them.
How API pricing compares
Anthropic’s model overview lists Sonnet 5.5 at $2 per million input tokens and $10 per million output tokens; Opus 5.5 is listed at $4 per million input tokens and $20 per million output tokens. These are token rates, not a promise that every Sonnet task will cost half as much: a task’s bill also depends on how many input and output tokens it uses and on the configuration.
Rank #2
Anthropic developer Addy Osmani’s September 28, 2026 post also lists cache-write rates of $2.50/$5 per million tokens for five-minute writes and $4/$8 for one-hour writes, Sonnet/Opus respectively; cache reads are $0.20/$0.20. The post notes US-only inference pricing at 1.1 times standard price. Pricing and options can change, so check the current model documentation when estimating a workload.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →When to choose Sonnet or Opus
Consider Sonnet for cost-sensitive coding runs
In this comparison, Sonnet led on the dependency resolver and concurrency tasks, and its reported aggregate cost remained lower even after its four rerun attempts were counted. That makes it a reasonable candidate to test when token cost and repeatable results on your own workload matter.
Consider Opus when your task benefits from its observed behavior
Opus was about 35% faster on the agentic bug-fix task and, with Sonnet’s failed attempts included, slightly cheaper on that task. Those are task-specific observations, not evidence that Opus is generally faster or less expensive. Anthropic’s overview characterizes Sonnet as fast and Opus as moderate latency, but those broad labels do not replace measurements on the work you actually run.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.How to make a fair comparison for your workload
- Choose representative tasks. Use the same real tasks for each model, including the kinds of coding work and evaluation checks you care about.
- Match the configuration. Keep prompts, effort settings, tools, and context and output limits consistent.
- Repeat each task. Record successful runs, failed runs, and attempts that need retries rather than reporting only completed successes.
- Measure the full cost. Track input and output tokens, list-price cost, retry cost, tool calls, and elapsed time.
- Apply the same independent checks. Grade both models against identical tests or acceptance criteria, and report limits and failures alongside the results.
Anthropic’s overview lists both models with a one-million-token context window and a 128,000-token maximum output. That published maximum does not make a particular run immune to limits imposed by the task setup; report the actual configuration used.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Recommended Free Tools

