Enter opens the highlighted result. Esc closes.

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 5Anthropic
Coding
57.7
Overall
63.2
Output $/M
$10.00
55
Grok 4.7xAI
Coding
66.7
Overall
66.6
Output $/M
$6.00
33
vs boards won of 88 shared

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.

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.

Boards won, where both have a result
CategoryClaude Sonnet 5BarsGrok 4.7Ties
Coding412
Intelligence11
Agentic work29
Reasoning82
Math51
Knowledge43
Web design52
General263
All shared boards5533
CodingLike-for-likeSix of these boards feed the Vibe Coding Index412
Coding benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
LiveBench coding74.7%84.5%Grok 4.7
LMArena WebDev15401637Grok 4.7
AA Coding Index71.5Not measuredOnly Claude Sonnet 5 measured
LiveCodeBench (Vals AI)82.4%Not measuredOnly Claude Sonnet 5 measured
SWE-bench Verified (Vals AI)79.6%Not measuredOnly 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 measured42.9%Only Grok 4.7 measured
Vibe Code Bench 1-100 (Vals AI)13.8%Not measuredOnly Claude Sonnet 5 measured
SkillsBench (Vals AI)46.5%Not measuredOnly Claude Sonnet 5 measured
CyberBench (Vals AI)70.3%69.5%Claude Sonnet 5
SciCode54.3%57.8%Grok 4.7
FrontierCode42.7%47.6%Grok 4.7
FrontierSWENot measured29.5%Only Grok 4.7 measured
GSO-Bench37.3%Not measuredOnly Claude Sonnet 5 measured
WeirdML68.8%Not measuredOnly Claude Sonnet 5 measured
ALE-Bench1463.1Not measuredOnly Claude Sonnet 5 measured
LMArena Text: coding14831432Claude Sonnet 5
LMArena Text: software and IT14741421Claude Sonnet 5
LMArena WebDev: React15411663Grok 4.7
LMArena WebDev: HTML15271627Grok 4.7
LMArena WebDev: from an image15401586Grok 4.7
SciCode10.7%Not measuredOnly 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
Intelligence benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
AA Intelligence Index38.246.4Grok 4.7
Epoch Capabilities Index156.9154.4Claude Sonnet 5
Agentic workLike-for-likePublic boards, shown as published, kept out of the index29
Agentic work benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
AA Agentic Index43.6Not measuredOnly Claude Sonnet 5 measured
Design Arena: agents building web apps1245Not measuredOnly Claude Sonnet 5 measured
Design Arena: agents building full-stack apps1249Not measuredOnly Claude Sonnet 5 measured
Design Arena: agents building mobile apps1215Not measuredOnly Claude Sonnet 5 measured
Design Arena: agents building Android apps1225Not measuredOnly Claude Sonnet 5 measured
Design Arena: agents building Godot games1225Not measuredOnly Claude Sonnet 5 measured
Design Arena: agents building games1227Not measuredOnly Claude Sonnet 5 measured
Design Arena: HTML slides1218Not measuredOnly Claude Sonnet 5 measured
Design Arena: PowerPoint slides1216Not measuredOnly Claude Sonnet 5 measured
Design Arena: spreadsheets1021Not measuredOnly Claude Sonnet 5 measured
LiveBench research82.8%86.4%Grok 4.7
LiveBench browser72.0%60.0%Claude Sonnet 5
LiveBench long agentic39.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 measured18.3%Only Grok 4.7 measured
Excel Modeling Benchmark (Vals AI)66.3%67.0%Grok 4.7
BioMysteryBench (Vals AI)Not measured69.3%Only Grok 4.7 measured
Terminal-Bench-Science (Vals AI)5.7%10.0%Grok 4.7
Vals Science IndexNot measured34.8%Only Grok 4.7 measured
Robo-bench (Vals AI)Not measured0.2%Only Grok 4.7 measured
APEX-Agents54.5%54.6%Grok 4.7
Vending-Bench 2$6,378$10,537Grok 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
Reasoning benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
GPQA Diamond88.9%Not measuredOnly Claude Sonnet 5 measured
LiveBench reasoning88.7%82.7%Claude Sonnet 5
MysteryMechanism (Vals AI)Not measured25.2%Only Grok 4.7 measured
MMMU Pro (Vals AI)83.0%Not measuredOnly Claude Sonnet 5 measured
GPQA Diamond (Artificial Analysis run)91.1%Not measuredOnly 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-AGINot measured90.2%Only Grok 4.7 measured
ARC-AGI-2Not measured61.4%Only Grok 4.7 measured
SimpleBench60.6%Not measuredOnly Claude Sonnet 5 measured
Chess puzzles45.0%41.0%Claude Sonnet 5
Mystery game puzzles35.0%29.0%Claude Sonnet 5
LMArena Text: hard prompts14611415Claude Sonnet 5
LMArena Text: expert14891439Claude Sonnet 5
LMArena Text: hard prompts in English14641427Claude Sonnet 5
LMArena Vision: diagrams12931254Claude Sonnet 5
LMArena Vision: homework13111309Claude 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
Math benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
OTIS Mock AIME94.7%98.1%Grok 4.7
FrontierMath, tiers 1 to 365.6%53.0%Claude Sonnet 5
FrontierMath, tier 429.3%17.1%Claude Sonnet 5
ProofBench77.0%26.0%Claude Sonnet 5
LMArena Text: math14671414Claude Sonnet 5
LMArena Text: mathematical work14811435Claude 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
Knowledge benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
MMLU Pro87.5%Not measuredOnly Claude Sonnet 5 measured
LegalBench (Vals AI)83.9%84.4%Grok 4.7
CorpFin (Vals AI)67.0%Not measuredOnly Claude Sonnet 5 measured
TaxEval (Vals AI)75.6%Not measuredOnly Claude Sonnet 5 measured
MortgageTax (Vals AI)70.0%Not measuredOnly Claude Sonnet 5 measured
MedCode (Vals AI)47.5%49.5%Grok 4.7
SimpleQA Verified33.7%56.0%Grok 4.7
LMArena Text: science14601419Claude Sonnet 5
LMArena Text: medicine and healthcare14421395Claude Sonnet 5
LMArena Text: legal and government14541423Claude Sonnet 5
LMArena Text: business and finance14361389Claude 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
Web design benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
Design Arena: websites12741254Claude Sonnet 5
Design Arena: UI components12801275Claude Sonnet 5
Design Arena: game dev12781313Grok 4.7
Design Arena: data viz12511235Claude Sonnet 5
Design Arena: 3D12611270Grok 4.7
Design Arena: all code categories12761271Claude Sonnet 5
Design Arena: SVG1193Not measuredOnly Claude Sonnet 5 measured
Design Arena: ASCII art1207Not measuredOnly Claude Sonnet 5 measured
LiveBench design82.0%78.0%Claude Sonnet 5
GeneralLike-for-likePublic boards, shown as published, kept out of the index263
General benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
Vals IndexNot measured58.6%Only Grok 4.7 measured
LiveBench data analysis71.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 Index68.8%Not measuredOnly Claude Sonnet 5 measured
Long context reasoning (AA-LCR)82.0%80.0%Claude Sonnet 5
DTBench92.5%96.0%Grok 4.7
LMCA50.0%49.4%Claude Sonnet 5
Surface Evolver Bench60.0%Not measuredOnly Claude Sonnet 5 measured
Furniture assemblyNot measured20.8%Only Grok 4.7 measured
LMArena Text14421399Claude Sonnet 5
LMArena Text: instruction following14521406Claude Sonnet 5
LMArena Text: creative writing14161381Claude Sonnet 5
LMArena Vision12731231Claude Sonnet 5
LMArena Text: English14501411Claude Sonnet 5
LMArena Text: non-English14311386Claude Sonnet 5
LMArena Text: Chinese14781449Claude Sonnet 5
LMArena Text: German14421366Claude Sonnet 5
LMArena Text: Japanese14221359Claude Sonnet 5
LMArena Text: Korean14121383Claude Sonnet 5
LMArena Text: French14631431Claude Sonnet 5
LMArena Text: Spanish14381406Claude Sonnet 5
LMArena Text: Russian14501399Claude Sonnet 5
LMArena Text: Polish14251420Claude Sonnet 5
LMArena Text: multi-turn14531394Claude Sonnet 5
LMArena Text: longer queries14621416Claude Sonnet 5
LMArena Text: writing and language14361394Claude Sonnet 5
LMArena Text: entertainment and media14111376Claude Sonnet 5
LMArena Vision: English12751229Claude Sonnet 5
LMArena Vision: Chinese13311250Claude Sonnet 5
LMArena Vision: reading text12881241Claude Sonnet 5
LMArena Vision: humor1261Not measuredOnly Claude Sonnet 5 measured
LMArena Vision: creative writing12461217Claude Sonnet 5
LMArena Document1466Not measuredOnly 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
Image generation benchmarks for Claude Sonnet 5 and Grok 4.7
BenchmarkClaude Sonnet 5Grok 4.7Leader
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

Claude Sonnet 5$0.0070Fits in one request
Grok 4.7$0.0050Fits in one request

Grok 4.7 costs less

Repository review

50K input + 3K output tokens

Claude Sonnet 5$0.130Fits in one request
Grok 4.7$0.118Fits in one request

Grok 4.7 costs less

Agent loop

200K input + 10K output tokens

Claude Sonnet 5$0.500Fits in one request
Grok 4.7$0.460Fits in one request

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.

Specifications of Claude Sonnet 5 and Grok 4.7
SpecificationAnthropic Claude Sonnet 5SpaceXAI Grok 4.7
MakerAnthropicxAI
WeightsNo public weights listedNo public weights listed
ReleasedJune 30, 2026September 21, 2026
Context window1M500K
Input $/Mtok$2.00$2.00
Output $/Mtok$10.00$6.00
Coding index57.766.7
Independent measurements behind it65
Cost per solved task$1.87Not computable
SourceOpenRouter listingOpenRouter 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.

Compare next

Embed this comparison on your site

Free under CC BY 4.0, while the source link stays visible. Preview the frame · Terms and other embeds

<iframe src="https://llmbenchmark.ai/embed/compare/claude-sonnet-5-vs-grok-4-7" title="Claude Sonnet 5 vs Grok 4.7, LLMBenchmark.ai" width="100%" height="360" style="border:0;max-width:100%" loading="lazy"></iframe>
<p style="font:13px/1.4 sans-serif;margin:6px 0 0">Source: <a href="https://llmbenchmark.ai/compare/claude-sonnet-5-vs-grok-4-7">LLMBenchmark.ai, Claude Sonnet 5 vs Grok 4.7</a></p>