Claude Sonnet 5 vs Grok 4.7
Grok 4.7 leads Claude Sonnet 5 on coding, 66.7 to 57.7 on the Vibe Coding Index, and Grok 4.7 costs 1.7x less per output token ($6.00 vs $10.00 per million). Updated October 21, 2026; 88 benchmarks have a result for both.
Claude Sonnet 5 or Grok 4.7: which to pick
Pick Grok 4.7 for coding: it scores 66.7 on the Vibe Coding Index against 57.7 for Claude Sonnet 5, though on 5 benchmarks against 6.
Pick Claude Sonnet 5 for a larger context window (1M against 500K tokens) and work measured by Terminal-Bench 2.1 (Vals AI) or CyberBench (Vals AI), where it leads.
- Shared results
- 88
- Claude Sonnet 5 only
- 33
- Grok 4.7 only
- 11
- Like-for-like categories
- 8 of 9
Only benchmarks that tested both models count toward a pick; a result only one model has is shown but not compared.
Which one for your work
Each card is decided by one number both models carry. Where only one has it, the card says so and makes no call.
Coding
Vibe Coding Index, six public coding benchmarks
Grok 4.7
Grok 4.7 scores 66.7 against 57.7.
6 and 5 benchmarks behind the scores
Intelligence
AA Intelligence Index
Grok 4.7
Grok 4.7 leads, 46.4 against 38.2.
Same board, both measured
Agentic work
AA Agentic Index
No call
Only Claude Sonnet 5 has a AA Agentic Index result, 43.6.
Directional only
Reasoning
GPQA Diamond
No call
Only Claude Sonnet 5 has a GPQA Diamond result, 88.9%.
Directional only
Knowledge
MMLU Pro
No call
Only Claude Sonnet 5 has a MMLU Pro result, 87.5%.
Directional only
Web design
Design Arena: websites
Claude Sonnet 5
Claude Sonnet 5 leads, 1274 against 1254.
Same board, both measured
General
Vals Index
No call
Only Grok 4.7 has a Vals Index result, 58.6%.
Directional only
Long documents
Listed context window
Claude Sonnet 5
Claude Sonnet 5 takes 1M tokens against 500K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Grok 4.7
Claude Sonnet 5 $0.0070, Grok 4.7 $0.0050 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only Claude Sonnet 5 has the number, $1.87.
Directional only
At a glance
- Coding index
- Claude Sonnet 5 57.7 from 6 benchmarks, Grok 4.7 66.7 from 5 benchmarks.
- Widest category
- Math, 16.0 points apart on average over 6 shared benchmarks.
- Widest single gap
- ProofBench: Claude Sonnet 5 77.0% against Grok 4.7 26.0%, 51.0 points apart on a 0 to 100 scale.
- Output price
- Claude Sonnet 5 $10.00 against Grok 4.7 $6.00 per million output tokens, 1.7x apart.
- Context window
- Claude Sonnet 5 takes 1M tokens, Grok 4.7 500K.
Benchmark by benchmark
First the score: boards each model leads, per category, where both have a result. Then every board, a category to a fold; bars are each result on a 0 to 100 scale, so compare the two in a row, not one row with another.
| Category | Claude Sonnet 5 | Bars | Grok 4.7 | Ties |
|---|---|---|---|---|
| Coding | 4 | 12 | ||
| Intelligence | 1 | 1 | ||
| Agentic work | 2 | 9 | ||
| Reasoning | 8 | 2 | ||
| Math | 5 | 1 | ||
| Knowledge | 4 | 3 | ||
| Web design | 5 | 2 | ||
| General | 26 | 3 | ||
| All shared boards | 55 | 33 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index412
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| LiveBench coding | 74.7% | 84.5% | Grok 4.7 |
| LMArena WebDev | 1540 | 1637 | Grok 4.7 |
| AA Coding Index | 71.5 | Not measured | Only Claude Sonnet 5 measured |
| LiveCodeBench (Vals AI) | 82.4% | Not measured | Only Claude Sonnet 5 measured |
| SWE-bench Verified (Vals AI) | 79.6% | Not measured | Only Claude Sonnet 5 measured |
| Terminal-Bench 4 (Vals AI) | 10.6% | 28.8% | Grok 4.7 |
| Vibe Code Bench (Vals AI) | 81.3% | 86.2% | Grok 4.7 |
| Code migration (Vals AI) | 44.4% | 44.8% | Grok 4.7 |
| ProgramBench (Vals AI) | 0.0% | 0.5% | Grok 4.7 |
| IOI (Vals AI) | 45.0% | 57.7% | Grok 4.7 |
| Terminal-Bench 2.1 (Vals AI) | 74.5% | 73.4% | Claude Sonnet 5 |
| SWE-bench Multimodal (Vals AI) | Not measured | 42.9% | Only Grok 4.7 measured |
| Vibe Code Bench 1-100 (Vals AI) | 13.8% | Not measured | Only Claude Sonnet 5 measured |
| SkillsBench (Vals AI) | 46.5% | Not measured | Only Claude Sonnet 5 measured |
| CyberBench (Vals AI) | 70.3% | 69.5% | Claude Sonnet 5 |
| SciCode | 54.3% | 57.8% | Grok 4.7 |
| FrontierCode | 42.7% | 47.6% | Grok 4.7 |
| FrontierSWE | Not measured | 29.5% | Only Grok 4.7 measured |
| GSO-Bench | 37.3% | Not measured | Only Claude Sonnet 5 measured |
| WeirdML | 68.8% | Not measured | Only Claude Sonnet 5 measured |
| ALE-Bench | 1463.1 | Not measured | Only Claude Sonnet 5 measured |
| LMArena Text: coding | 1483 | 1432 | Claude Sonnet 5 |
| LMArena Text: software and IT | 1474 | 1421 | Claude Sonnet 5 |
| LMArena WebDev: React | 1541 | 1663 | Grok 4.7 |
| LMArena WebDev: HTML | 1527 | 1627 | Grok 4.7 |
| LMArena WebDev: from an image | 1540 | 1586 | Grok 4.7 |
| SciCode | 10.7% | Not measured | Only Claude Sonnet 5 measured |
| Neither model has a result on the other 12 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index11
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| AA Intelligence Index | 38.2 | 46.4 | Grok 4.7 |
| Epoch Capabilities Index | 156.9 | 154.4 | Claude Sonnet 5 |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index29
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| AA Agentic Index | 43.6 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: agents building web apps | 1245 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: agents building full-stack apps | 1249 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: agents building mobile apps | 1215 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: agents building Android apps | 1225 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: agents building Godot games | 1225 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: agents building games | 1227 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: HTML slides | 1218 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: PowerPoint slides | 1216 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: spreadsheets | 1021 | Not measured | Only Claude Sonnet 5 measured |
| LiveBench research | 82.8% | 86.4% | Grok 4.7 |
| LiveBench browser | 72.0% | 60.0% | Claude Sonnet 5 |
| LiveBench long agentic | 39.0% | 50.1% | Grok 4.7 |
| SREBench (Vals AI) | 0.4% | 3.8% | Grok 4.7 |
| Finance Agent (Vals AI) | 53.9% | 52.3% | Claude Sonnet 5 |
| Tax Agent Bench (Vals AI) | 29.4% | 34.2% | Grok 4.7 |
| Legal Research Bench (Vals AI) | 41.8% | 47.1% | Grok 4.7 |
| Harvey's Legal Agent Benchmark (Vals AI) | Not measured | 18.3% | Only Grok 4.7 measured |
| Excel Modeling Benchmark (Vals AI) | 66.3% | 67.0% | Grok 4.7 |
| BioMysteryBench (Vals AI) | Not measured | 69.3% | Only Grok 4.7 measured |
| Terminal-Bench-Science (Vals AI) | 5.7% | 10.0% | Grok 4.7 |
| Vals Science Index | Not measured | 34.8% | Only Grok 4.7 measured |
| Robo-bench (Vals AI) | Not measured | 0.2% | Only Grok 4.7 measured |
| APEX-Agents | 54.5% | 54.6% | Grok 4.7 |
| Vending-Bench 2 | $6,378 | $10,537 | Grok 4.7 |
| Neither model has a result on the other 16 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index82
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| GPQA Diamond | 88.9% | Not measured | Only Claude Sonnet 5 measured |
| LiveBench reasoning | 88.7% | 82.7% | Claude Sonnet 5 |
| MysteryMechanism (Vals AI) | Not measured | 25.2% | Only Grok 4.7 measured |
| MMMU Pro (Vals AI) | 83.0% | Not measured | Only Claude Sonnet 5 measured |
| GPQA Diamond (Artificial Analysis run) | 91.1% | Not measured | Only Claude Sonnet 5 measured |
| Humanity's Last Exam (Artificial Analysis run) | 41.3% | 43.1% | Grok 4.7 |
| GPQA Diamond (Epoch AI run) | 90.5% | 92.7% | Grok 4.7 |
| ARC-AGI | Not measured | 90.2% | Only Grok 4.7 measured |
| ARC-AGI-2 | Not measured | 61.4% | Only Grok 4.7 measured |
| SimpleBench | 60.6% | Not measured | Only Claude Sonnet 5 measured |
| Chess puzzles | 45.0% | 41.0% | Claude Sonnet 5 |
| Mystery game puzzles | 35.0% | 29.0% | Claude Sonnet 5 |
| LMArena Text: hard prompts | 1461 | 1415 | Claude Sonnet 5 |
| LMArena Text: expert | 1489 | 1439 | Claude Sonnet 5 |
| LMArena Text: hard prompts in English | 1464 | 1427 | Claude Sonnet 5 |
| LMArena Vision: diagrams | 1293 | 1254 | Claude Sonnet 5 |
| LMArena Vision: homework | 1311 | 1309 | Claude Sonnet 5 |
| Neither model has a result on the other 5 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index51
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| OTIS Mock AIME | 94.7% | 98.1% | Grok 4.7 |
| FrontierMath, tiers 1 to 3 | 65.6% | 53.0% | Claude Sonnet 5 |
| FrontierMath, tier 4 | 29.3% | 17.1% | Claude Sonnet 5 |
| ProofBench | 77.0% | 26.0% | Claude Sonnet 5 |
| LMArena Text: math | 1467 | 1414 | Claude Sonnet 5 |
| LMArena Text: mathematical work | 1481 | 1435 | Claude Sonnet 5 |
| Neither model has a result on the other 7 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index43
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| MMLU Pro | 87.5% | Not measured | Only Claude Sonnet 5 measured |
| LegalBench (Vals AI) | 83.9% | 84.4% | Grok 4.7 |
| CorpFin (Vals AI) | 67.0% | Not measured | Only Claude Sonnet 5 measured |
| TaxEval (Vals AI) | 75.6% | Not measured | Only Claude Sonnet 5 measured |
| MortgageTax (Vals AI) | 70.0% | Not measured | Only Claude Sonnet 5 measured |
| MedCode (Vals AI) | 47.5% | 49.5% | Grok 4.7 |
| SimpleQA Verified | 33.7% | 56.0% | Grok 4.7 |
| LMArena Text: science | 1460 | 1419 | Claude Sonnet 5 |
| LMArena Text: medicine and healthcare | 1442 | 1395 | Claude Sonnet 5 |
| LMArena Text: legal and government | 1454 | 1423 | Claude Sonnet 5 |
| LMArena Text: business and finance | 1436 | 1389 | Claude Sonnet 5 |
| Neither model has a result on the other 7 boards here | |||
Web designLike-for-likePublic boards, shown as published, kept out of the index52
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| Design Arena: websites | 1274 | 1254 | Claude Sonnet 5 |
| Design Arena: UI components | 1280 | 1275 | Claude Sonnet 5 |
| Design Arena: game dev | 1278 | 1313 | Grok 4.7 |
| Design Arena: data viz | 1251 | 1235 | Claude Sonnet 5 |
| Design Arena: 3D | 1261 | 1270 | Grok 4.7 |
| Design Arena: all code categories | 1276 | 1271 | Claude Sonnet 5 |
| Design Arena: SVG | 1193 | Not measured | Only Claude Sonnet 5 measured |
| Design Arena: ASCII art | 1207 | Not measured | Only Claude Sonnet 5 measured |
| LiveBench design | 82.0% | 78.0% | Claude Sonnet 5 |
GeneralLike-for-likePublic boards, shown as published, kept out of the index263
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| Vals Index | Not measured | 58.6% | Only Grok 4.7 measured |
| LiveBench data analysis | 71.7% | 76.9% | Grok 4.7 |
| Public Benefits Bench (Vals AI) | 66.0% | 65.6% | Claude Sonnet 5 |
| SAGE (Vals AI) | 48.9% | 40.8% | Claude Sonnet 5 |
| MedScribe (Vals AI) | 76.0% | 89.4% | Grok 4.7 |
| Vals Multimodal Index | 68.8% | Not measured | Only Claude Sonnet 5 measured |
| Long context reasoning (AA-LCR) | 82.0% | 80.0% | Claude Sonnet 5 |
| DTBench | 92.5% | 96.0% | Grok 4.7 |
| LMCA | 50.0% | 49.4% | Claude Sonnet 5 |
| Surface Evolver Bench | 60.0% | Not measured | Only Claude Sonnet 5 measured |
| Furniture assembly | Not measured | 20.8% | Only Grok 4.7 measured |
| LMArena Text | 1442 | 1399 | Claude Sonnet 5 |
| LMArena Text: instruction following | 1452 | 1406 | Claude Sonnet 5 |
| LMArena Text: creative writing | 1416 | 1381 | Claude Sonnet 5 |
| LMArena Vision | 1273 | 1231 | Claude Sonnet 5 |
| LMArena Text: English | 1450 | 1411 | Claude Sonnet 5 |
| LMArena Text: non-English | 1431 | 1386 | Claude Sonnet 5 |
| LMArena Text: Chinese | 1478 | 1449 | Claude Sonnet 5 |
| LMArena Text: German | 1442 | 1366 | Claude Sonnet 5 |
| LMArena Text: Japanese | 1422 | 1359 | Claude Sonnet 5 |
| LMArena Text: Korean | 1412 | 1383 | Claude Sonnet 5 |
| LMArena Text: French | 1463 | 1431 | Claude Sonnet 5 |
| LMArena Text: Spanish | 1438 | 1406 | Claude Sonnet 5 |
| LMArena Text: Russian | 1450 | 1399 | Claude Sonnet 5 |
| LMArena Text: Polish | 1425 | 1420 | Claude Sonnet 5 |
| LMArena Text: multi-turn | 1453 | 1394 | Claude Sonnet 5 |
| LMArena Text: longer queries | 1462 | 1416 | Claude Sonnet 5 |
| LMArena Text: writing and language | 1436 | 1394 | Claude Sonnet 5 |
| LMArena Text: entertainment and media | 1411 | 1376 | Claude Sonnet 5 |
| LMArena Vision: English | 1275 | 1229 | Claude Sonnet 5 |
| LMArena Vision: Chinese | 1331 | 1250 | Claude Sonnet 5 |
| LMArena Vision: reading text | 1288 | 1241 | Claude Sonnet 5 |
| LMArena Vision: humor | 1261 | Not measured | Only Claude Sonnet 5 measured |
| LMArena Vision: creative writing | 1246 | 1217 | Claude Sonnet 5 |
| LMArena Document | 1466 | Not measured | Only Claude Sonnet 5 measured |
| Neither model has a result on the other 11 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Claude Sonnet 5 | Grok 4.7 | Leader |
|---|---|---|---|
| Neither model has a result on 5 boards here | |||
What each workload costs
Three fixed token mixes at each model's listed price, so per-token rates become a bill.
Chat turn
1K input + 500 output tokens
Grok 4.7 costs less
Repository review
50K input + 3K output tokens
Grok 4.7 costs less
Agent loop
200K input + 10K output tokens
Grok 4.7 costs less
Listed OpenRouter rates, without cache or batch discounts. A workload that does not fit a model's context window would need splitting.
Specification differences
The leading value in a row is marked; a row with a missing value names no leader. Our two rows are marked in red.
| Specification | Anthropic Claude Sonnet 5 | SpaceXAI Grok 4.7 |
|---|---|---|
| Maker | Anthropic | xAI |
| Weights | No public weights listed | No public weights listed |
| Released | June 30, 2026 | September 21, 2026 |
| Context window | 1M | 500K |
| Input $/Mtok | $2.00 | $2.00 |
| Output $/Mtok | $10.00 | $6.00 |
| Coding index | 57.7 | 66.7 |
| Independent measurements behind it | 6 | 5 |
| Cost per solved task | $1.87 | Not computable |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Claude Sonnet 5 better than Grok 4.7 for coding?
Pick Grok 4.7 for coding: it scores 66.7 on the Vibe Coding Index against 57.7 for Claude Sonnet 5, though on 5 benchmarks against 6. Pick Claude Sonnet 5 for a larger context window (1M against 500K tokens) and work measured by Terminal-Bench 2.1 (Vals AI) or CyberBench (Vals AI), where it leads.
Which is cheaper, Claude Sonnet 5 or Grok 4.7?
Claude Sonnet 5 costs $2.00 per million input tokens and $10.00 per million output tokens; Grok 4.7 costs $2.00 and $6.00. Cost per solved task is known for Claude Sonnet 5 only.
Which has the bigger context window, Claude Sonnet 5 or Grok 4.7?
Claude Sonnet 5, with 1M tokens against 500K.
How many benchmarks is the Claude Sonnet 5 vs Grok 4.7 comparison based on?
88 benchmarks have a result for both models as of October 21, 2026. Claude Sonnet 5's coding index rests on 6 independent benchmarks and Grok 4.7's on 5. Where only one model has a result, the page says so instead of naming a winner.