Updated July 2026Model launch14 min read

Claude Sonnet 5, Explained: Pricing, the New Tokenizer, 1M Context, and Opus 4.8

Anthropic shipped Claude Sonnet 5 on June 30, 2026, and made it the default model in Claude Code the same day. The headline is a mid-tier model that lands close to Opus 4.8 for a fraction of the price. The asterisk is a rebuilt tokenizer that quietly counts the same text as more tokens — so “same price” is not quite the same cost. This piece walks through what actually changed versus Sonnet 4.6, the pricing math worked out with real numbers, the benchmark figures Anthropic published (and where a competitor still wins), how to switch it on in Claude Code, and who should still reach for Opus 4.8. Every number is dated and sourced.

Editorial illustration: a luminous warm-amber sonnet-line glyph at the center resolves into a dense teal token grid that fans out into a wide 1-million-token context ring, with a small pricing meter and a subtle upward-tilting token-count bar in the corner, all on a deep midnight-navy backdrop.
On this page · 14 sections
  1. Sonnet 5 in 60 seconds
  2. What changed vs Sonnet 4.6
  3. The five named pieces
  4. Select it in Claude Code
  5. The tokenizer pricing math
  6. Benchmarks, read honestly
  7. The 1M context window
  8. What surprised us
  9. Who it's for
  10. Community signal
  11. Verdict
  12. FAQ
  13. Glossary
  14. Sources

Sonnet 5 in 60 seconds

  • What it is: Anthropic’s new mid-tier model (API ID claude-sonnet-5), launched June 30, 2026 as “our most agentic Sonnet yet.”
  • Price: $2/$10 per million input/output tokens through August 31, then $3/$15 — the same headline rate as Sonnet 4.6.
  • Context: native 1M-token window, up to 128K output tokens, adaptive thinking on by default.
  • The catch: a new tokenizer maps the same text to ~1.0–1.35x more tokens. At the standard rate that is a real per-task price rise the sticker doesn’t show.
  • Benchmarks (Anthropic’s figures): beats Opus 4.8 on Terminal-Bench 2.1 (80.4% vs 74.6%), trails it on SWE-bench Pro (63.2% vs 69.2%).
  • Where: default on Free/Pro, available to Max/Team/Enterprise, and the default model in Claude Code from v2.1.197.

What changed versus Sonnet 4.6

Sonnet 5 is the successor to Sonnet 4.6 (which shipped in February 2026), and Anthropic positions it as a jump on agentic work — planning, tool use, running autonomously — rather than a general facelift. From the launch announcement: “Sonnet 5 narrows the gap: its performance is close to that of Opus 4.8, but at lower prices.” The concrete deltas versus 4.6, all from Anthropic’s system card:

  • SWE-bench Pro: 63.2% vs 58.1% — harder, multi-file real-world coding tasks.
  • Terminal-Bench 2.1: 80.4% vs 67.0% — the biggest jump, on real terminal/command-line work.
  • FrontierCode v1: 38.8% vs 15.1% — more than doubled on the hardest coding eval Anthropic reports.
  • Context window: native 1M tokens (Sonnet 4.6 shipped without a 1M default in Claude Code).
  • Tokenizer: rebuilt — the same text now maps to more tokens. This is the change nobody put on a slide.

The honest one-liner: Sonnet 5 is a real capability upgrade over 4.6 on agentic and coding work, priced identically per token at standard rates but not per task, because of the tokenizer. Hold that tension — it’s the whole story of this launch.

The five named pieces

Five things carry the launch. Each gets a deep dive below; this is the map.

  1. Pricing — $2/$10 promo through Aug 31, then $3/$15. Identical headline rate to Sonnet 4.6.
  2. The 1M context window — native, in the API and in Claude Code, not a paid add-on tier.
  3. The new tokenizer — the same text is ~1.0–1.35x more tokens. The centerpiece, because it quietly rewrites the pricing.
  4. The benchmarks — close to Opus 4.8, ahead of it on Terminal-Bench, behind on SWE-bench Pro.
  5. Where you get it — default on Free/Pro/Claude Code, plus the claude-sonnet-5 API for everyone else.

How to select Sonnet 5 in Claude Code

The Claude Code v2.1.197 changelog entry, verbatim: “Introducing Claude Sonnet 5: now the default model in Claude Code, with a native 1M-token context window and promotional pricing of $2/$10 per Mtok through August 31. Update to version 2.1.197 for access.” So the fastest path is simply to update — a fresh session is already on Sonnet 5.

# 0. Update first — Sonnet 5 needs Claude Code v2.1.197+
claude update

# 1. It's already the default after updating. To set it
#    explicitly in a session:
/model sonnet          # 'sonnet' now resolves to Sonnet 5

# 2. At startup, this session only:
claude --model sonnet

# 3. Environment variable, this terminal only:
export ANTHROPIC_MODEL=sonnet

# 4. Settings file — ~/.claude/settings.json
{
  "model": "sonnet"
}

Two things worth knowing. The sonnet alias tracks the recommended Sonnet version, so it points at Sonnet 5 now; pin the exact ID with claude-sonnet-5 if you need a fixed target across a team. And because Sonnet 5 is the default, the more common question on r/ClaudeCode after launch was the inverse — how to go back to Opus 4.8 for a specific job: /model opus. Model routing is now a per-task decision; if you want the full playbook for switching between tiers, we wrote it up in the Claude Code model-routing guide.

The tokenizer pricing math (the part nobody advertised)

This is the most important section in the post, so it gets real numbers. Anthropic’s own note on the launch page: “The same input can map to more tokens: roughly 1.0–1.35x depending on the content type.” Sonnet 5 uses a rebuilt tokenizer — the component that chops your text into billable tokens — and it is less efficient on most content than the one Sonnet 4.6 used.

Simon Willison ran his own token counter on real documents the day it launched and found “the same input text produces approximately 30% more tokens than on Claude Sonnet 4.6,” with a language-dependent spread: roughly 1.4x for English prose, 1.33x for Spanish, 1.28x for Python code, and negligible change for Simplified Mandarin. Different content, different tax.

Why it matters: standard pricing ($3/$15 per million) is identical to Sonnet 4.6’s per-token rate. So the price card looks flat. But you are billed per token, and the same job is now more tokens. Worked example — a task that measured 100,000 input and 20,000 output tokens on Sonnet 4.6, inflated by 1.35x on the new tokenizer:

Same taskSonnet 4.6 ($3/$15)Sonnet 5 promo ($2/$10)Sonnet 5 standard ($3/$15)
Input tokens100,000~135,000~135,000
Output tokens20,000~27,000~27,000
Input cost$0.30$0.27$0.405
Output cost$0.30$0.27$0.405
Total per task$0.60$0.54$0.81

Read the last row left to right. Through August 31 the promo rate more than offsets the tokenizer tax — the task is ~10% cheaper than it was on 4.6. From September 1, the same task on the same standard rate costs ~35% more, purely because of how the text is counted. The promo window is, in effect, hiding the increase until it ends.

Two honest caveats on the math

First, the 1.35x is content-dependent — Mandarin-heavy or already-terse inputs move less. Second, output tokens depend on how verbose the model is, and Sonnet 5 is reported to be markedly more concise than Opus 4.8 (see the community section), so real output counts can land below a naive multiplier. The direction is certain; the exact multiplier is yours to measure on your own traffic. Do not plan a budget off the sticker rate alone.

Benchmarks, read honestly

All figures below are Anthropic’s own, published in the Claude Sonnet 5 system card dated June 30, 2026, and on the launch page. Treat them as vendor-reported, not independent.

Against its own family (launch-page chart): Sonnet 5 lands close to Opus 4.8, ahead on some evals, behind on others.

  • SWE-bench Pro (agentic coding): Sonnet 5 63.2%, Opus 4.8 69.2%, Sonnet 4.6 58.1%. Opus 4.8 still wins the hardest coding.
  • Terminal-Bench 2.1: Sonnet 5 80.4%, Opus 4.8 74.6%, Sonnet 4.6 67.0%. This is the eval where the mid-tier model beats the flagship.
  • SWE-bench Verified: Sonnet 5 85.2% (Anthropic’s reported figure for the classic 500-problem set).

Against competitors (system-card table): Anthropic’s own summary table compares Sonnet 5 to Sonnet 4.6, GPT-5.5, and Gemini 3.5 Flash — and here is the detail the marketing skips. On Terminal-Bench 2.1, GPT-5.5 via Codex CLI scores 83.4%, ahead of Sonnet 5’s 80.4%. So “beats the flagship” is an in-family claim; across vendors, a competitor still edges terminal work. Sonnet 5 does lead that table on SWE-bench Pro (63.2 vs GPT-5.5’s 58.6), FrontierCode v1 (38.8 vs 25.5), and GDPval-AA v2 (1618 Elo vs 1509). If you run agents across models, the GPT-5.5-on-Codex line is worth your own head-to-head — see Claude Code vs Codex CLI.

One more caveat, courtesy of the community: Anthropic quietly swapped a benchmark chart on launch day (covered in the community section). Vendor benchmarks are a starting point for a shortlist, never a finished decision. For a cross-vendor take on which coding model to actually pick, see the best AI coding model in 2026 — how Sonnet 5 stacks up against GPT-5.6 and GLM-5.2.

The 1M context window

Sonnet 5 ships a native 1 million-token context window and up to 128,000 output tokens, per the system card and the Claude Code changelog. “Native” matters: it is the standard configuration in the API and in Claude Code, not a separate 1M tier you opt into and pay a surcharge for. For agentic work — long autonomous sessions that read a lot of a codebase before acting — a 1M window is the difference between compacting context every few turns and keeping the whole task in view.

Anthropic pushed it further in one eval: its BrowseComp agentic search test used a 10M-token limit with context compaction — automatic summarization of older context — that triggers at 200k. That is an evaluation configuration, not the default you get; the number to plan around is 1M. The practical read: with a 1M window and the lower promo price, Sonnet 5 is priced for exactly the long-horizon agent loops that used to force you onto a more expensive model. That is the whole pitch.

What surprised us

Three things we assumed going in that the sources corrected:

  • We assumed “same price as 4.6” meant cost-neutral. It doesn’t. Standard per-token rates match, but the tokenizer means the same task bills more tokens. The promo masks it until September 1. We nearly wrote “free upgrade” before doing the math above.
  • We assumed Sonnet 5 beat Opus 4.8 on coding generally. It doesn’t — Opus 4.8 still leads SWE-bench Pro (69.2 vs 63.2). Sonnet 5’s win is specifically Terminal-Bench, plus “close enough” across the board at a lower price. “Close to Opus” is the accurate framing, not “better.”
  • We assumed the “beats the flagship” Terminal-Bench line was unambiguous. Within Anthropic’s family it is. But the same system card shows GPT-5.5 on Codex CLI scoring higher (83.4). The flagship it beats is Anthropic’s flagship.

Who it’s for (and who should stay on Opus 4.8)

Sonnet 5 is now the sensible default for most work. The decision is really about the few cases where it isn’t.

Use Sonnet 5 when

  • Everyday agentic coding and tool use
  • Terminal-heavy / command-line automation
  • Long sessions that need the 1M window
  • Cost-sensitive, high-volume agent loops
  • You want concise output, not Opus’s verbosity

Stay on Opus 4.8 when

  • The hardest multi-file coding (SWE-bench Pro work)
  • Ambiguous, one-shot reasoning where quality > cost
  • You’ve tuned prompts specifically for Opus
  • The task is short enough that price barely matters

Community signal

The launch tweet above is the first-party framing. The developer reaction on r/ClaudeAI split three ways: genuine enthusiasm for the concision, sharp skepticism about a launch-day benchmark chart swap, and a cost worry pointed straight at the tokenizer.

The upside people actually cared about was Sonnet 5 doing the job with less talk. The top comment on the launch thread (2,700+ upvotes on the post):

If Sonnet 5 can perform nearly as well as Opus 4.8 with a third of the output, count me in. Opus 4.8 talks more than a toddler mainlining sugar.

trevormead, r/ClaudeAI (top comment) · Reddit

The most-upvoted reply on the launch thread, June 30, 2026 — concision as the real feature.

Source

The skepticism was aimed at Anthropic’s own charts. Within hours, a 1,000-upvote thread caught Anthropic replacing the BrowseComp cost-performance chart. Anthropic’s own erratum, quoted in the thread: “In the original version of this post, we included a cost-performance chart for the BrowseComp evaluation that was based on data from a simpler methodology… This had the result of underestimating Sonnet 5’s performance.” The community read was less charitable:

In other words, 'we have now updated our methodology to make our latest model look strong.'

cleroth, r/ClaudeAI · Reddit

On Anthropic swapping the launch-day BrowseComp chart. The erratum said the original underestimated Sonnet 5.

Source

The cost worry tied directly back to the tokenizer. On the “Sonnet 5 vs 4.6” thread, the practical fear was blunt — and one contrarian took a harder line, arguing Anthropic’s mid-tier has fallen behind cheaper open-weight competition:

Anthropic is undoubtedly the best at high end models, but with this regression it seems clearer than ever that their mid range models are no match for the competition. GLM 5.2 is plainly better than Sonnet 5 at 1/5th the price.

arkuto, r/ClaudeAI · Reddit

A contrarian take from the comparison thread. Not universally held — most benchmarks put Sonnet 5 ahead of 4.6 — but a real cost-per-capability argument.

Source

That is the fault line across every thread we read: the capability is respected, the pricing-through-tokenization is resented. Both can be true.

Verdict

Our take

Claude Sonnet 5 is the right default for almost everyone — near-Opus-4.8 quality, a native 1M window, and it is already the default in Claude Code. Use it for everyday agentic coding, terminal automation, and long sessions, and take the promo pricing through August 31 as a genuine discount. But do the tokenizer math before September 1: at standard $3/$15 the same task costs roughly a third more than on Sonnet 4.6, so measure your real token counts rather than trusting the flat sticker. Keep Opus 4.8 for the hardest multi-file coding and one-shot reasoning where quality outranks cost. Treat Anthropic’s benchmarks as a shortlist, not a verdict — a competitor still wins Terminal-Bench across vendors.

Frequently asked questions

How much does Claude Sonnet 5 cost?

At launch (June 30, 2026), Anthropic set introductory pricing of $2 per million input tokens and $10 per million output tokens through August 31, 2026. From September 1 it moves to standard pricing of $3/$15 per million — the same headline rate as Sonnet 4.6. The catch: Sonnet 5 uses a new tokenizer that turns the same text into roughly 1.0-1.35x more tokens, so the real cost per task rises even at the identical rate. Always check the current rate on Anthropic's pricing page.

Is Sonnet 5 better than Opus 4.8?

Not across the board. On Anthropic's own launch-page figures Opus 4.8 still leads on the hardest agentic coding — SWE-bench Pro 69.2% vs Sonnet 5's 63.2%. But Sonnet 5 edges past Opus 4.8 on Terminal-Bench 2.1 (80.4% vs 74.6%) and slightly outperforms it on knowledge work, at a fraction of the price. Anthropic's framing: Sonnet 5's performance is close to Opus 4.8, but at lower prices. Opus 4.8 remains the pick for the gnarliest work.

What is Claude Sonnet 5's context window?

Sonnet 5 ships with a native 1 million-token context window and up to 128,000 maximum output tokens, per Anthropic's system card and the Claude Code v2.1.197 changelog. Anthropic's BrowseComp evaluation pushed it to a 10M-token limit with context compaction that triggers at 200k, but 1M is the standard configuration you get in the API and in Claude Code.

Is Sonnet 5 free?

Yes, with limits. Sonnet 5 is the default model on Anthropic's Free and Pro plans, and is available to Max, Team, and Enterprise users. Free-plan usage is capped by the standard message and 5-hour limits. Developers pay per token via the claude-sonnet-5 API. So it is free to try in the Claude app, but metered once you build on the API.

Sonnet 5 vs Sonnet 4.6 — what actually changed?

Four things: a native 1M context window, a rebuilt tokenizer (same text maps to ~1.0-1.35x more tokens), adaptive thinking on by default, and a clear jump on agentic benchmarks — SWE-bench Pro 63.2% vs 58.1%, Terminal-Bench 2.1 80.4% vs 67.0%, FrontierCode v1 38.8% vs 15.1%. Standard pricing is unchanged at $3/$15, but the tokenizer means the same job costs more tokens than it did on 4.6.

How do I use Sonnet 5 in Claude Code?

Update to Claude Code v2.1.197 or later (run claude update). As of that version Sonnet 5 is the default model, so a fresh install already uses it. To select it explicitly, run /model sonnet in a session, launch with claude --model sonnet, set ANTHROPIC_MODEL=sonnet, or add "model": "sonnet" to settings.json. The sonnet alias resolves to Sonnet 5.

Why did my Sonnet 5 bill go up if the price is the same?

The new tokenizer. Standard pricing ($3/$15) matches Sonnet 4.6 per token, but Sonnet 5 counts the same input text as more tokens — Anthropic says 1.0-1.35x depending on content; Simon Willison measured ~1.4x for English prose and ~1.28x for Python. Same words, more billed tokens. During the promo through August 31 the lower $2/$10 rate offsets it; after that, the token inflation shows up on your invoice.

Glossary

  • Claude Sonnet 5 — Anthropic’s mid-tier model (API ID claude-sonnet-5), launched June 30, 2026.
  • Tokenizer — the component that splits text into billable tokens. Sonnet 5’s is rebuilt and less efficient on most content.
  • Context window — how much text the model can hold at once. Sonnet 5: 1M tokens native.
  • Output tokens — the model’s generated text, billed at the higher rate. Sonnet 5 caps at 128K.
  • Adaptive thinking — the model deciding per step how much to reason; on by default in Sonnet 5.
  • Context compaction — automatic summarization of older context so a long session stays under the window limit.
  • SWE-bench Pro — a hard coding benchmark of multi-file, real-repository tasks. Sonnet 5: 63.2%.
  • Terminal-Bench 2.1 — benchmark for real command-line/terminal tasks. Sonnet 5: 80.4%.
  • Model alias — a short name (sonnet, opus, haiku) that resolves to the recommended version; sonnet now points at Sonnet 5.
  • Promotional pricing — the discounted $2/$10 launch rate, in effect through August 31, 2026.

Sources

Primary

Community & contrarian

Internal

Keep reading