For Developers/Models/Compare/Claude Opus 4.8 vs Claude Sonnet 5

Claude Opus 4.8 vs Claude Sonnet 5

Pricing, benchmarks, and use case comparison

Newer versions are out: Claude Opus 4.8 has been replaced by Claude Opus 5.5; Claude Sonnet 5 has been replaced by Claude Sonnet 5.5.

Verdict

Our pick: Claude Sonnet 5

Both are now legacy models, replaced by Claude Opus 5.5 and Claude Sonnet 5.5. Between them, pick Claude Sonnet 5 for close-to-Opus results at $2/$10, 60% below Opus 4.8's $5/$25; pick Opus 4.8 for the hardest long-horizon coding.

Specs comparison

Claude Opus 4.8Claude Sonnet 5
ProviderAnthropicAnthropic
TypeClosed sourceClosed source
Context window1M1M
Input / 1M tokens$5.00✓$2.00
Output / 1M tokens$25.00$10.00
Release date2026-052026-06

Benchmarks

BenchmarkClaude Opus 4.8Claude Sonnet 5
SWE-bench Verified✓88.6%~85.2%
SWE-bench Pro✓69.2%63.2%
Terminal-Bench 2.174.6%✓80.4%
GPQA Diamond93.6%-
Artificial Analysis Intelligence Index61.4-
OSWorld-Verified-81.2%

Scores sourced from official provider release posts and independent benchmark aggregators.

Anthropic now lists both as legacy models: Opus 4.8's successor is Claude Opus 5.5 and Sonnet 5's is Claude Sonnet 5.5.

Capability and benchmarks

Opus 4.8 is the stronger model overall: 88.6% SWE-bench Verified, 69.2% SWE-bench Pro, and 93.6% GPQA Diamond, versus Sonnet 5's ~85.2% SWE-bench Verified and 63.2% SWE-bench Pro. Sonnet 5 beats Opus on Terminal-Bench 2.1 (80.4% vs 74.6%) and posts 81.2% on OSWorld-Verified for computer use. Opus leads on the hardest end-to-end coding and science, while Sonnet 5 is close behind and ahead on terminal-agent and computer-use tasks.

Price, context, and status

Both have a 1M-token context at standard pricing, and both use adaptive thinking only (manual thinking budgets and non-default sampling parameters return 400 errors). The price gap has widened since launch: Opus 4.8 is $5/$25, while Sonnet 5 is $2/$10 after Anthropic made its introductory price permanent and cancelled the planned rise to $3/$15. Sonnet is also faster (capability speed 82 vs 68 on our index). Both remain on the Claude API, with retirement not sooner than May 28, 2027 for Opus 4.8 and June 30, 2027 for Sonnet 5.

Which to pick

  • Pick Opus 4.8 for long-running autonomous agents on complex, high-value tasks where its SWE-bench Pro lead justifies the premium.
  • Pick Sonnet 5 for high-volume agent loops, general coding, and cost-sensitive production.
  • For new projects, the successors cost less at the top end: Opus 5.5 is $4/$20, and Sonnet 5.5 stays at $2/$10.

Which should you choose?

Choose Claude Opus 4.8 if...

  • →You have a pipeline pinned to Opus 4.8 and want stable behavior until you re-test on Opus 5.5
  • →You rely on thinking type disabled or forced tool_choice, which Opus 5.5 rejects with a 400
  • →You need 1M context and 128k output with the Opus 4.7/4.8 request surface
  • →You use fast mode on Opus 4.8 and have not yet moved it (Anthropic removes it on November 30, 2026)
Full Claude Opus 4.8 details →

Choose Claude Sonnet 5 if...

  • →You have a pipeline tuned to Sonnet 5 and want stable behavior while you test Sonnet 5.5
  • →You turn thinking off with thinking type disabled or use forced tool_choice, both of which Sonnet 5.5 rejects
  • →You need a 1M context window at $2/$10 with the Sonnet 5 request surface
Full Claude Sonnet 5 details →

Compare Claude Opus 4.8 with others