Code Tycoon Get Code Tycoon

Blog / Cost

Opus vs Sonnet in Claude Code: What Each Task Costs

Opus 5.5 costs twice Sonnet 5.5 per token. How that plays out per request, which Claude Code settings pick the model, and what our own bill looked like.

Opus vs Sonnet logos side by side

Opus 5.5 is exactly 2x Sonnet 5.5 on every price line, so the question is not "which is cheaper" but "which tasks justify paying double". In our own transcripts, nearly everything ran on Opus without anyone deciding that.

Short verdict. Pick Sonnet 5.5 for routine edits, test runs, refactors with a clear spec and anything you can verify by running it. Pick Opus 5.5 for planning, architecture, hard debugging and work that is expensive to redo. Use opusplan if you want that split without switching by hand. The numbers below come from Anthropic's price page and from our own transcripts, with the caveats stated.

Prices checked 2026-11-23 on Anthropic's pricing page. Model lineups and prices change, so verify them before you act on any figure here.

Table of contents

The two models in one table

Price line (per million tokens) Opus 5.5 Sonnet 5.5 Ratio
Base input $4 $2 2x
5-minute cache write $5 $2.50 2x
1-hour cache write $8 $4 2x
Cache read (hit) $0.20 $0.10 2x
Output $20 $10 2x

Source for every row: Anthropic model pricing, checked 2026-11-23. Both models include the 1M-token context window at standard per-token pricing on that page, so a long session does not move you into a higher price band. (Haiku 5.5 is different; that is covered in Sonnet vs Haiku for subagents.)

Two other facts from the same page matter for Claude Code. Cache reads on both models are priced at 0.05x the base input price, which is why a long session full of cached context is cheaper than the raw input price suggests. And output costs five times input on both models ($20 vs $4, $10 vs $2).

Claude Code's own docs say what each is for. The model configuration page describes the sonnet alias as "the latest Sonnet model for daily coding tasks" and opus as "the latest Opus model for complex reasoning tasks". The cost page says: "Sonnet handles most coding tasks well and costs less than Opus. Reserve Opus for complex architectural decisions or multi-step reasoning."

Why the price gap is a flat 2x

Older comparisons you will find in search results quote Opus at several times Sonnet. That was true of earlier generations: Anthropic's table lists Opus 4.6 at $5 / $25 and Sonnet 4.6 at $3 / $15. The 5.5 generation is different. Opus 5.5 dropped to $4 / $20 and Sonnet 5.5 sits at $2 / $10, so the gap is 2x across the board.

That changes the decision. With a wide gap, defaulting to Sonnet saved real money on almost any workload. At 2x, the saving is real but smaller, and the cost of a wrong or half-done result matters more. If Sonnet needs a second pass on a task that Opus finishes in one, the price advantage can shrink or vanish. How often that happens depends on your tasks. Price per token is only one input; the number of requests a task takes is the other.

Two things that are not a price difference but still shape cost:

  • Thinking is always on. Claude Code's cost page says you "can't turn off thinking on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which always use extended thinking." Thinking tokens are billed as output, so on either model a hard problem can produce a long, expensive reply. The docs suggest lowering the effort level with /effort for simpler tasks.
  • Context rides along on every request. The same page notes that Claude Code sends your full conversation with every request. A session that has grown large costs more per request on either model; see Prompt caching in Claude Code for why a cold resume rewrites that context at cache-write prices. Installed skills are part of what rides along, and how many tokens skills add to your context puts a number on it.

What a request costs on each model

The tables below are arithmetic from the list prices above, not a measurement. They price two made-up requests so you can see how the lines combine. Real requests vary.

Request A, mid-session. 58,000 tokens read from cache, 2,000 fresh input tokens, 1,000 output tokens.

Model Cache read Fresh input Output Total
Opus 5.5 $0.0116 $0.0080 $0.0200 $0.0396
Sonnet 5.5 $0.0058 $0.0040 $0.0100 $0.0198

Request B, deep into a session. 140,000 tokens read from cache, 3,000 fresh input tokens, 2,000 output tokens.

Model Cache read Fresh input Output Total
Opus 5.5 $0.0280 $0.0120 $0.0400 $0.0800
Sonnet 5.5 $0.0140 $0.0060 $0.0200 $0.0400

A single request costs cents either way. The bill comes from volume: an agentic task is dozens or hundreds of these requests, and each one carries the whole context. The 2x gap compounds across all of them. For monthly totals across plans, see What Claude Code really costs per month.

Notice what dominates. In Request A, output is half the Opus bill even though it is only 1,000 tokens, because output is priced at $20 per million. In Request B, output is still the largest line, ahead of the 140,000 cached tokens. Context size and answer length both drive cost, and the model choice multiplies whichever is bigger.

Which task types lean on which price line

A per-task price depends on the task itself, so this section shows which price line each kind of work tends to lean on, so you can reason about your own.

Task shape What drives its cost What the 2x gap means
Reading and searching a codebase Many requests, growing context, mostly cache reads Doubles a large cache-read bill
Writing a long file or large diff Output tokens at $20 or $10 per million Doubles the output line, the priciest per token
Hard debugging with long reasoning Thinking tokens, billed as output Doubles the reasoning cost, but a wrong answer costs more
Running tests and fixing failures in a loop Request count, not any single request Doubles every pass of the loop
Planning a change A few big-context requests with long output Small absolute spend; the plan steers everything after it
Resuming a stale session Cache write at 1.25x or 2x input Doubles the rewrite, which is avoidable by clearing

The planning and loop rows are why opusplan exists. Planning is a small share of tokens but it decides what the expensive execution phase does. Execution is many requests, which is where a flat 2x discount adds up. The model configuration docs describe opusplan as a "special mode that uses opus during plan mode, then switches to sonnet for execution."

If you run several sessions at once, the multiplier applies to all of them. Our posts on running multiple sessions and file collisions between parallel sessions cover how that load adds up.

How Claude Code picks the model

From the model configuration docs, checked 2026-11-23, in order of priority:

  1. During a session: /model <alias|name> switches immediately; /model alone opens the picker.
  2. At startup: claude --model <alias|name>.
  3. Environment variable: ANTHROPIC_MODEL=<alias|name>.
  4. Settings file: the model field.
  5. Default for new sessions: ANTHROPIC_DEFAULT_MODEL.

Two behaviors that surprise people:

  • /model saves your choice as the default for new sessions by writing the model field in your user settings. The --model flag and ANTHROPIC_MODEL apply only to the session you launch with them.
  • On Pro, Max, Ultra, Team, Enterprise and Anthropic API accounts, the docs say the default is Opus 5.5. If you never touch a setting, you are on the more expensive model.
claude --model sonnet
/model opus
{ "model": "sonnet" }

Aliases follow the latest version for your provider. To pin a version, use a full name such as claude-opus-5-5. There are also sonnet[1m] and opus[1m] aliases for the 1-million-token context window.

Subagents add a wrinkle. By default a subagent runs on the same model as the conversation that starts it, so switching to Opus also puts delegated research on Opus. The subagent docs cover how to pin a cheaper model; the details are in Sonnet vs Haiku for subagents.

What our own bill looked like

This is the part that surprised us. We ran an aggregate script over one team's Claude Code transcripts: 792 sessions and 54,344 model requests between 2026-10-02 and 2026-11-23 (about 7.5 weeks). The team runs its own products, including the 17 sites on the Code Tycoon homepage. Method and caveats: costs are API list-price equivalents (tokens times Anthropic's published prices), not what was billed, since people on Pro or Max pay a flat fee. Each API message is counted once and subagent sidechains are included. This is one team, mostly one model, over a short period. It describes one team's usage, not Claude Code in general.

Model Requests Cost (list-price equivalent) Share of cost
Opus 5.5 53,848 $5,952 99.2%
Sonnet 5.5 315 $44 0.7%
Fable 5.2 11 $1.88 under 0.1%
Haiku 5.5 170 $0.38 under 0.1%
Total 54,344 $5,998

Opus handled 99.1% of requests. The team did not decide that task by task. It is what you get if the default model is Opus and nobody changes it, which matches the docs' statement that new sessions default to Opus 5.5 on these account types.

The arithmetic below again uses list prices only. If the same token counts had run at Sonnet 5.5 prices, the Opus portion would have cost half: $5,952 becomes $2,976, a difference of $2,976 over about 7.5 weeks, roughly $397 per week. That is an upper bound on pure price savings and it assumes the same number of tokens and the same results on Sonnet. Some of that work (hard debugging, planning) probably belongs on Opus. Some of it (test runs, mechanical edits) probably does not. The point is that the split was never examined.

A caution on reading the table. Average cost per request was about $0.11 on Opus and $0.14 on Sonnet. Sonnet looks pricier per request, which is the opposite of the price list. It is not a like-for-like comparison: the 315 Sonnet requests were different tasks, probably with larger contexts, and 315 requests is a small sample. Do not read it as "Sonnet costs more".

One more number from the same data shows why context matters more than the model label: 24,731 requests (45.5%) carried more than 200,000 tokens of context and accounted for $3,825, or 63.8% of the cost. A flat 2x applies to all of that. Trimming context with /clear or /compact shrinks the base the multiplier works on.

Cost visibility is the real gap here. Claude Code's /usage shows a session's cost and a "Usage by model" breakdown, but it covers one session at a time, and our dataset only exists because we pulled aggregates out of transcripts ourselves. Code Tycoon does that reading for you: it prices every task and session from your transcripts and ranks wasteful habits in dollars. See the working with Claude view for what it reports.

Pick Opus if, pick Sonnet if

Pick Opus 5.5 if:

  • You are planning or designing something that many later steps depend on.
  • You are debugging something where Sonnet has already gone around in circles.
  • A mistake is expensive to find later, such as migrations, auth or billing code.
  • You want the default and the lowest chance of a second pass, and the 2x is a rounding error against your time.

Pick Sonnet 5.5 if:

  • The task has a clear spec and a check you can run, such as tests or a type checker.
  • It is a long loop of small steps: fixes, renames, formatting, boilerplate.
  • You run several sessions in parallel and the 2x multiplies across all of them.
  • You are on API billing and watching spend, or hitting plan limits (see Claude Code usage limits explained).

Use opusplan if you want Opus thinking and Sonnet execution without remembering to switch.

When this advice does not apply. If you run a single short session a day, the monthly difference is small and the simplest setting wins. And if you are on a flat plan, the dollar figures show the value of your usage rather than your bill. How model choice interacts with plan limits is covered in Claude Pro vs Max 5x vs Max 20x. The cost page notes that on Team and Enterprise seats, "You've hit your session limit" or "weekly limit" is a seat-based window shared across all models, so switching with /model will not restore access in that case. A model-specific message like "You've hit your Opus limit" is different, and switching to another family does keep you working.

The bottom line

At list prices Opus 5.5 costs twice what Sonnet 5.5 costs for input and output tokens, so the same session on Sonnet costs roughly half. Whether that saving is real depends on the task: if Sonnet needs more turns or a second attempt, the gap shrinks. Our own data shows the opposite problem from most guides: Opus carried 99.2% of the cost because nobody chose a model on purpose. Pick the model per task, check the per-model split once a week, and keep Opus for the work where you can see it pays for itself.

Frequently asked questions

Is Sonnet or Opus cheaper in Claude Code?

Sonnet 5.5 is cheaper: $2 input and $10 output per million tokens against $4 and $20 for Opus 5.5, a flat 2x on every line, per Anthropic's pricing page checked 2026-11-23. Whether it is cheaper per finished task depends on whether it needs extra passes, which this article does not measure.

What model does Claude Code use by default?

Per Claude Code's model configuration docs, on Pro, Max, Ultra, Team, Enterprise and Anthropic API accounts the default is Opus 5.5. Check the docs for your account type, since the default depends on it and can change.

How do I switch models in Claude Code?

Type /model sonnet or /model opus during a session, or start with claude --model sonnet. You can also set ANTHROPIC_MODEL or the model field in your settings file. /model saves your choice as the default for new sessions; --model and ANTHROPIC_MODEL apply only to the session you launch.

What is opusplan?

A special mode that uses Opus during plan mode, then switches to Sonnet for execution, per Claude Code's docs. It is meant to spend the expensive model on the thinking and the cheaper one on the many requests that follow.

Do subagents use the same model as my session?

By default, yes. The subagent docs say a subagent you define runs on the same model as the conversation that starts it, unless its definition, the Agent tool call or the CLAUDE_CODE_SUBAGENT_MODEL setting says otherwise.

Does switching to Sonnet help with Pro or Max usage limits?

Not listed in Claude Code's docs as of 2026-11-23. Anthropic's cost page says seat-based session and weekly limits on Team and Enterprise are shared across all models, and that a model-specific limit message can be avoided by switching to another model family. How Pro and Max weight each model is covered on Anthropic's help center; check it directly.

How much could I save by moving work from Opus to Sonnet?

At most half of the Opus portion, on price alone, if token counts and results stayed equal. In our transcripts that arithmetic gives $2,976 off $5,952 over about 7.5 weeks. Treat it as an upper bound for one team's usage, not a forecast for yours.

Related articles

See cost and habits in one place: self-host Code Tycoon for free with npx code-tycoon, or get your server.


About this research

Anton Goldshtein is a two-time founder who previously bootstrapped a company to $100M in revenue. His team runs its own products on Code Tycoon every day.

Price figures come from Anthropic's pricing page and Claude Code's documentation, both checked 2026-11-23. The usage figures come from one team's Claude Code transcripts (792 sessions, 54,344 requests, 2026-10-02 to 2026-11-23), reduced to aggregates, and costs are list-price equivalents rather than invoices.

Content reviewed and updated: 2026-11-26


Keep reading