Comparisons

Opus vs Sonnet: What a Finished Task Costs, and Why Effort Matters More

Opus vs Sonnet in Claude Code on eight coding tasks: every setting passed, so cost and time per task decide. Effort level moved the bill more than the model.

MesmerTools•October 21, 2026•5 min

As of October 2026, Opus 5.5 costs exactly twice what Sonnet 5.5 does on every kind of token: $4 per million in and $20 out, against $2 and $10. In practice the effort setting moves your bill more than the model does. I ran both in Claude Code on the eight coding tasks from my Codex comparison, and every setting passed all eight, so the only difference left is what each finished task cost and how long it took.

At Claude Code's default effort, Sonnet finished a task in 42 seconds for 14 cents, and Opus took 76 seconds and 39 cents. Raising Opus to xhigh made the same eight passes cost $1.10 and 4.3 minutes a task, and Sonnet on max cost $1.87 and almost 13 minutes. So for work you can describe in a paragraph and check with a test, I'd run Sonnet at the default and leave the dial alone. When a task needs more thinking, go to Opus on high before turning Sonnet up to max.

A small two-position toggle switch next to a much larger rotary dial with an amber indicator, under the headline Opus vs Sonnet
The model picker gets the arguments. The effort dial next to it moves the bill as much or more.

Opus vs Sonnet on eight everyday tasks: every model passed

The tasks ran against a small TypeScript invoicing API: a rounding bug, a pagination bug reported only as a vague complaint, a CSV export, a payments feature spread over several files, a money-handling refactor, a test suite that had to catch planted bugs, a JSON-to-SQLite migration and a month-end date bug. Hidden tests decided pass or fail. Each setting ran each task once, and cost is that run's tokens at API list prices.

Every setting passed every task. That's what most day-to-day coding looks like, a clear ask and a test to check it against, so none of the extra spend in the chart bought a pass that a cheaper setting missed. It also means these eight tasks are too easy to separate the models on quality, so I can't show you where Opus pulls ahead.

Cost per task in Claude Code, at API list prices

Same eight coding tasks. Every setting passed all eight.

$ per taskTime
Haiku 5.5default (medium)
$0.017
64 s
Sonnet 5.5default (medium)
$0.14
42 s
Opus 5.5default (medium)
$0.39
76 s
Opus 5.5high
$0.48
1.5 min
Opus 5.5xhigh
$1.10
4.3 min
Sonnet 5.5max
$1.87
12.9 min
Every bar is the same eight passes. Raising Opus from default to xhigh added more cost than switching from Opus to Sonnet saved, and Sonnet on max cost almost four times what Opus on high did. One run per task, so small gaps between neighbors are noise; the ends are not.

Sonnet costs a third of Opus, not half

The per-token price is only half of the bill. The other half is how many tokens a model burns to finish. A coding agent re-sends its whole conversation on every step, so cost grows with the number of steps and with everything the model writes and thinks along the way.

Sonnet was lean on both counts. At the default setting it averaged 7 steps and about 5,400 output tokens a task, against 8 steps and 7,800 for Opus. Fewer tokens at half the price lands near a third. Haiku went the other way, with more steps and more output than either, but at a twentieth of Sonnet's per-token price that still rounds to pennies. Our token price calculator covers the per-token side if you want to compare models on that first.

Sonnet on max cost four times what Opus on high did

Effort sets how much the model thinks before each move and how hard it checks its own work. Claude Code defaults to medium. On these tasks, max changed what Sonnet did far more than what it achieved. On the rounding bug it took 17 steps instead of 7 and thought for about 39,000 tokens instead of 258. It wrote a reproduction script, then a sweep over inputs, then an edge-case check, and added tests of its own. Then it passed, as it had at the default.

Across all eight tasks, Sonnet on max averaged $1.87 and almost 13 minutes. Opus on high averaged $0.48 and about a minute and a half. One Sonnet max run, the SQLite migration, hit my 30-minute cap while waiting on a review subagent it had launched for its own change. I counted it as a pass because the code it had already written passed the tests. Its cost and time are in the averages, and both are floors since it was cut off. I didn't run Sonnet at the settings between default and max, so max is the far end of its dial.

An independent index shows the same shape. On Artificial Analysis's index in mid-October, Opus scores 54 on high for $1.82 a task and 58 on max for $5.98, so the last four points cost three times as much. Sonnet on max lands between them, at 56 for $5.46. On a task a test can check, those points are what you'd be paying for and not getting.

Does Sonnet 5.5 beat Opus 5.5 on Terminal-Bench?

Anthropic's launch post for Sonnet 5.5 says it does: 70.6% on Terminal-Bench 4.0 against 66.4% for Opus. Vals, an independent benchmarking company, ran both with the same agent setup, three times each, and got the order reversed: Opus 65.2%, Sonnet 64.1%. Vals also notes that some Anthropic answers came from a fallback model. Count those as failures and Opus falls to 58.1% and Sonnet to 62.6%.

Terminal-Bench 4.0: the order flips depending on who ran it

Opus 5.5Sonnet 5.5

Anthropic's launch post

66.4%
70.6%

Vals rerun, same setup

65.2%
64.1%
Same two models, opposite order. Read it as a tie.

The order changes with who measures and how, so call it a tie. What I'd remember from the Vals run is the cost column: Sonnet spent $16.51 per test to Opus's $13.20. On long agentic work, the model that's cheaper per token was the more expensive one per task.

Haiku passed too, so where does it fall off?

Haiku 5.5 costs a twentieth of Sonnet per token, and on these eight tasks it gave nothing up: eight passes at under two cents a task. The gap shows on harder work. In the same Vals run it scored 35% to Opus's 65%. You rarely know in advance which side of that line a task sits on, and a failed run costs you time, not only tokens.

Haiku also has a price cliff. Once a request's prompt passes 100,000 tokens, every token on it costs five times as much, and an agent's prompt grows with each step. On these short tasks Haiku's prompts never passed about 64,000 tokens. My own Claude Code requests average about 160,000 tokens of context, so most of a real session would sit above the line. I'd use Haiku for short, well-tested changes and for subagents that search and read, and keep it out of long sessions.

Where does Fable 5.1 fit?

Fable 5.1 is the top Claude tier at $10 in and $50 out, two and a half times Opus. I didn't run it here, and the independent coding numbers don't give a reason to pay for it. On Vals's Terminal-Bench it scored 58.1% at $17.18 a test, against Opus's 65.2% at $13.20, and on Artificial Analysis's index it scores 53 at $7.63 a task. On a subscription it also uses up your usage window about twice as fast per API dollar, by my own measurement. Where it could still matter is a problem Opus has already failed on, and that part is a guess I haven't tested.

Check your effort setting before your model

Since Sonnet 5.5 came out on September 28, Opus has been 91% of my Claude Code usage priced at API rates, Fable 7% and Sonnet 2%. Nearly all of the Opus requests ran at xhigh, which on these eight tasks cost almost three times the default for the same passes.

If your sessions look like that, the effort setting is the first thing to lower. Keep Sonnet at the default for anything you can describe in a paragraph and check with a test, and Opus on high for work that's vague, long or design-heavy. Reach for xhigh or max only after a task has failed a step lower.

More from the Blog