Claude Sonnet 4
Language Retired Full comparison ↗ anthropic/claude-sonnet-4 · by Anthropic
· decoder-only-transformer
Pricing — 1 offering(s)
Input tokens
Retired — no longer sold · last price $3.00 / 1M tokens (input), until 2026-06-14
- $3.00 / 1M tokens (input) Historical 2026-06-12 → 2026-06-14
Output tokens
Retired — no longer sold · last price $15.00 / 1M tokens (output), until 2026-06-14
- $15.00 / 1M tokens (output) Historical 2026-06-12 → 2026-06-14
Showing the active price and any recorded history. Full pricing history is available via the paid API — see API docs.
See how Claude Sonnet 4 fits into a cost-aware routing setup
See how →Capability profile
How Claude Sonnet 4 rates across core capability dimensions, with the task-level evidence behind each rating.
SWE-bench Verified (500 human-verified GitHub issues; patch must pass the repo's own tests; no file-location hints): resolves 72.7% — fails roughly 1 issue in 4. Vendor-reported (Anthropic, Claude 4 launch; without extended thinking — reaches 80.2% with high-compute parallel sampling).
1M-token context window (Sonnet 4.6 and later; standard pricing per Anthropic docs, 2026-07).
Coding benchmarks
View the full coding benchmark leaderboard →| Benchmark | Score | Harness | Source |
|---|---|---|---|
| swe-bench-verified ↗ | 72.7% 2025-05 | agentless 2.0 | 🏢 vendor ↗ |
| aider-polyglot ↗ | 56.4% 2025-05 | aider | 📊 leaderboard ↗ |
| livecodebench ↗ | 52.8% 2025-05 | — | 📊 leaderboard ↗ |
Operator guidance
The price/performance sweet spot of the Claude 4 line — a sensible default. Step up to Opus 4 for the hardest tasks; drop to Haiku 4 for cost/latency.
Use cases
- The default workhorse: strong quality at a moderate price/latency
- Production coding agents, RAG, and tool use at scale
Limitations
- Not as strong as Opus 4 on the very hardest reasoning/agentic tasks
- Capability ratings are qualitative, not a single cited benchmark run