Gemini 3.1 Pro Preview vs Grok 4.7
Updated October 21, 2026. 84 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.
Decision reading
Pick Grok 4.7 for coding: it scores 75.0 on the Vibe Coding Index against 35.3 for Gemini 3.1 Pro Preview.
Pick Gemini 3.1 Pro Preview when the context window is larger, 1.05M against 500K tokens, or when what matters is SciCode or LMArena Text: coding, where it leads.
- Shared results
- 84
- Gemini 3.1 Pro Preview only
- 47
- Grok 4.7 only
- 15
- Like-for-like categories
- 8 of 9
Shared results can support a head-to-head reading. Results only one model has describe coverage, not superiority.
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, four public coding benchmarks
Grok 4.7
Grok 4.7 scores 75.0 against 35.3.
1 and 2 benchmarks behind the scores
Intelligence
AA Intelligence Index
Grok 4.7
Grok 4.7 leads, 46.4 against 29.7.
Same board, both measured
Agentic work
AA Agentic Index
No call
Only Gemini 3.1 Pro Preview has a AA Agentic Index result, 8.2.
Directional only
Reasoning
GPQA Diamond
No call
Only Gemini 3.1 Pro Preview has a GPQA Diamond result, 95.5%.
Directional only
Math
AIME
No call
Only Gemini 3.1 Pro Preview has a AIME result, 98.1%.
Directional only
Knowledge
MMLU Pro
No call
Only Gemini 3.1 Pro Preview has a MMLU Pro result, 91.0%.
Directional only
Web design
Design Arena: websites
Grok 4.7
Grok 4.7 leads, 1255 against 1234.
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
Gemini 3.1 Pro Preview
Gemini 3.1 Pro Preview takes 1.05M tokens against 500K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Grok 4.7
Gemini 3.1 Pro Preview $0.0080, Grok 4.7 $0.0050 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only Gemini 3.1 Pro Preview has the number, $0.99.
Directional only
At a glance
- Coding index
- Gemini 3.1 Pro Preview 35.3 from 1 benchmark, Grok 4.7 75.0 from 2 benchmarks.
- Widest category
- Agentic work, 18.4 points apart on average over 10 shared benchmarks.
- Widest single gap
- Vending-Bench 2: Gemini 3.1 Pro Preview $911 against Grok 4.7 $10,537, 60.2 points apart on a 0 to 100 scale.
- Output price
- Gemini 3.1 Pro Preview $12.00 against Grok 4.7 $6.00 per million output tokens, 2.0x apart.
- Context window
- Gemini 3.1 Pro Preview takes 1.05M 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 | Gemini 3.1 Pro Preview | Bars | Grok 4.7 | Ties |
|---|---|---|---|---|
| Coding | 3 | 10 | ||
| Intelligence | 0 | 1 | ||
| Agentic work | 0 | 10 | ||
| Reasoning | 11 | 1 | ||
| Math | 4 | 1 | 1 tie | |
| Knowledge | 7 | 0 | ||
| Web design | 0 | 6 | ||
| General | 27 | 2 | ||
| All shared boards | 52 | 31 | 1 tie |
CodingLike-for-likeFour of these boards feed the Vibe Coding Index310
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| LiveBench coding | Not measured | 84.5% | Only Grok 4.7 measured |
| LMArena WebDev | 1447 | 1637 | Grok 4.7 |
| AA Coding Index | 68.8 | Not measured | Only Gemini 3.1 Pro Preview measured |
| LiveCodeBench (Vals AI) | 88.5% | Not measured | Only Gemini 3.1 Pro Preview measured |
| SWE-bench Verified (Vals AI) | 78.8% | Not measured | Only Gemini 3.1 Pro Preview measured |
| Terminal-Bench 4 (Vals AI) | 2.5% | 28.8% | Grok 4.7 |
| Vibe Code Bench (Vals AI) | 32.0% | 86.2% | Grok 4.7 |
| Code migration (Vals AI) | 17.3% | 44.8% | Grok 4.7 |
| ProgramBench (Vals AI) | 0.0% | 0.5% | Grok 4.7 |
| IOI (Vals AI) | 51.8% | 57.7% | Grok 4.7 |
| Terminal-Bench 2.1 (Vals AI) | 70.8% | 73.4% | Grok 4.7 |
| SWE-bench Multimodal (Vals AI) | Not measured | 42.9% | Only Grok 4.7 measured |
| Vibe Code Bench 1-100 (Vals AI) | 6.7% | Not measured | Only Gemini 3.1 Pro Preview measured |
| CyberBench (Vals AI) | Not measured | 69.5% | Only Grok 4.7 measured |
| SciCode | 58.7% | 57.8% | Gemini 3.1 Pro Preview |
| Terminal-Bench Hard (Artificial Analysis run) | 53.8% | Not measured | Only Gemini 3.1 Pro Preview measured |
| Terminal-Bench | 80.2% | Not measured | Only Gemini 3.1 Pro Preview measured |
| FrontierCode | Not measured | 47.6% | Only Grok 4.7 measured |
| FrontierSWE | Not measured | 29.5% | Only Grok 4.7 measured |
| GSO-Bench | 22.6% | Not measured | Only Gemini 3.1 Pro Preview measured |
| WeirdML | 72.1% | Not measured | Only Gemini 3.1 Pro Preview measured |
| MirrorCode | 8.9% | Not measured | Only Gemini 3.1 Pro Preview measured |
| ALE-Bench | 1160.6 | Not measured | Only Gemini 3.1 Pro Preview measured |
| LMArena Text: coding | 1484 | 1432 | Gemini 3.1 Pro Preview |
| LMArena Text: software and IT | 1487 | 1421 | Gemini 3.1 Pro Preview |
| LMArena WebDev: React | 1438 | 1663 | Grok 4.7 |
| LMArena WebDev: HTML | 1490 | 1627 | Grok 4.7 |
| LMArena WebDev: from an image | 1481 | 1586 | Grok 4.7 |
| Neither model has a result on the other 10 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index01
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| AA Intelligence Index | 29.7 | 46.4 | Grok 4.7 |
| Epoch Capabilities Index | Not measured | 154.4 | Only Grok 4.7 measured |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index010
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| AA Agentic Index | 8.2 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: agents building web apps | 1125 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: agents building full-stack apps | 1068 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: agents building mobile apps | 1094 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: agents building Android apps | 1055 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: agents building Godot games | 1236 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: agents building games | 1114 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: HTML slides | 1153 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: PowerPoint slides | 1064 | Not measured | Only Gemini 3.1 Pro Preview measured |
| LiveBench research | Not measured | 86.4% | Only Grok 4.7 measured |
| LiveBench browser | Not measured | 60.0% | Only Grok 4.7 measured |
| LiveBench long agentic | Not measured | 50.1% | Only Grok 4.7 measured |
| SREBench (Vals AI) | 0.0% | 3.8% | Grok 4.7 |
| Finance Agent (Vals AI) | 43.0% | 52.3% | Grok 4.7 |
| Tax Agent Bench (Vals AI) | 9.3% | 34.2% | Grok 4.7 |
| Legal Research Bench (Vals AI) | 20.7% | 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) | 52.6% | 67.0% | Grok 4.7 |
| BioMysteryBench (Vals AI) | 60.0% | 69.3% | Grok 4.7 |
| Terminal-Bench-Science (Vals AI) | 1.4% | 10.0% | Grok 4.7 |
| Vals Science Index | 27.4% | 34.8% | Grok 4.7 |
| Robo-bench (Vals AI) | Not measured | 0.2% | Only Grok 4.7 measured |
| τ²-Bench Telecom | 95.6% | Not measured | Only Gemini 3.1 Pro Preview measured |
| APEX-Agents | 35.1% | 54.6% | Grok 4.7 |
| METR time horizons | 77.0% | Not measured | Only Gemini 3.1 Pro Preview measured |
| BALROG | 57.0% | Not measured | Only Gemini 3.1 Pro Preview measured |
| DeepResearch Bench | 47.8% | Not measured | Only Gemini 3.1 Pro Preview measured |
| PostTrainBench | 22.0% | Not measured | Only Gemini 3.1 Pro Preview measured |
| Vending-Bench 2 | $911 | $10,537 | Grok 4.7 |
| Neither model has a result on the other 10 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index111
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| GPQA Diamond | 95.5% | Not measured | Only Gemini 3.1 Pro Preview measured |
| LiveBench reasoning | Not measured | 82.7% | Only Grok 4.7 measured |
| MysteryMechanism (Vals AI) | 20.7% | 25.2% | Grok 4.7 |
| MMMU Pro (Vals AI) | 88.2% | Not measured | Only Gemini 3.1 Pro Preview measured |
| GPQA Diamond (Artificial Analysis run) | 94.1% | Not measured | Only Gemini 3.1 Pro Preview measured |
| Humanity's Last Exam (Artificial Analysis run) | 47.0% | 43.1% | Gemini 3.1 Pro Preview |
| GPQA Diamond (Epoch AI run) | 94.4% | 92.7% | Gemini 3.1 Pro Preview |
| ARC-AGI | 98.0% | 90.2% | Gemini 3.1 Pro Preview |
| ARC-AGI-2 | 77.1% | 61.4% | Gemini 3.1 Pro Preview |
| SimpleBench | 79.6% | Not measured | Only Gemini 3.1 Pro Preview measured |
| Chess puzzles | 51.0% | 41.0% | Gemini 3.1 Pro Preview |
| Mystery game puzzles | 34.0% | 29.0% | Gemini 3.1 Pro Preview |
| EBR-bench | 14.3% | Not measured | Only Gemini 3.1 Pro Preview measured |
| LMArena Text: hard prompts | 1485 | 1415 | Gemini 3.1 Pro Preview |
| LMArena Text: expert | 1483 | 1439 | Gemini 3.1 Pro Preview |
| LMArena Text: hard prompts in English | 1480 | 1427 | Gemini 3.1 Pro Preview |
| LMArena Vision: diagrams | 1311 | 1254 | Gemini 3.1 Pro Preview |
| LMArena Vision: homework | 1316 | 1309 | Gemini 3.1 Pro Preview |
| Neither model has a result on the other 3 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index41
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| AIME | 98.1% | Not measured | Only Gemini 3.1 Pro Preview measured |
| OTIS Mock AIME | 95.6% | 98.1% | Grok 4.7 |
| FrontierMath, tiers 1 to 3 | 59.6% | 53.0% | Gemini 3.1 Pro Preview |
| FrontierMath, tier 4 | 26.8% | 17.1% | Gemini 3.1 Pro Preview |
| ProofBench | 26.0% | 26.0% | Tie |
| LMArena Text: math | 1486 | 1414 | Gemini 3.1 Pro Preview |
| LMArena Text: mathematical work | 1478 | 1435 | Gemini 3.1 Pro Preview |
| Neither model has a result on the other 6 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index70
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| MMLU Pro | 91.0% | Not measured | Only Gemini 3.1 Pro Preview measured |
| LegalBench (Vals AI) | 87.4% | 84.4% | Gemini 3.1 Pro Preview |
| CaseLaw (Vals AI) | 64.8% | Not measured | Only Gemini 3.1 Pro Preview measured |
| CorpFin (Vals AI) | 64.5% | Not measured | Only Gemini 3.1 Pro Preview measured |
| TaxEval (Vals AI) | 72.9% | Not measured | Only Gemini 3.1 Pro Preview measured |
| MortgageTax (Vals AI) | 69.4% | Not measured | Only Gemini 3.1 Pro Preview measured |
| MedQA (Vals AI) | 96.4% | Not measured | Only Gemini 3.1 Pro Preview measured |
| MedCode (Vals AI) | 59.1% | 49.5% | Gemini 3.1 Pro Preview |
| SimpleQA Verified | 73.5% | 56.0% | Gemini 3.1 Pro Preview |
| LMArena Text: science | 1497 | 1419 | Gemini 3.1 Pro Preview |
| LMArena Text: medicine and healthcare | 1486 | 1395 | Gemini 3.1 Pro Preview |
| LMArena Text: legal and government | 1487 | 1423 | Gemini 3.1 Pro Preview |
| LMArena Text: business and finance | 1459 | 1389 | Gemini 3.1 Pro Preview |
| Neither model has a result on the other 4 boards here | |||
Web designLike-for-likePublic boards, shown as published, kept out of the index06
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| Design Arena: websites | 1234 | 1255 | Grok 4.7 |
| Design Arena: UI components | 1226 | 1271 | Grok 4.7 |
| Design Arena: game dev | 1203 | 1314 | Grok 4.7 |
| Design Arena: data viz | 1209 | 1227 | Grok 4.7 |
| Design Arena: 3D | 1234 | 1269 | Grok 4.7 |
| Design Arena: all code categories | 1231 | 1271 | Grok 4.7 |
| Design Arena: SVG | 1285 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Design Arena: ASCII art | 1270 | Not measured | Only Gemini 3.1 Pro Preview measured |
| LiveBench design | Not measured | 78.0% | Only Grok 4.7 measured |
GeneralLike-for-likePublic boards, shown as published, kept out of the index272
| Benchmark | Gemini 3.1 Pro Preview | Grok 4.7 | Leader |
|---|---|---|---|
| Vals Index | Not measured | 58.6% | Only Grok 4.7 measured |
| LiveBench data analysis | Not measured | 76.9% | Only Grok 4.7 measured |
| Public Benefits Bench (Vals AI) | 53.8% | 65.6% | Grok 4.7 |
| SAGE (Vals AI) | 48.7% | 40.8% | Gemini 3.1 Pro Preview |
| MedScribe (Vals AI) | 76.1% | 89.4% | Grok 4.7 |
| Vals Multimodal Index | 56.1% | Not measured | Only Gemini 3.1 Pro Preview measured |
| IFBench | 77.1% | Not measured | Only Gemini 3.1 Pro Preview measured |
| Long context reasoning (AA-LCR) | 82.0% | 80.0% | Gemini 3.1 Pro Preview |
| DTBench | 97.1% | 96.0% | Gemini 3.1 Pro Preview |
| LMCA | 53.8% | 49.4% | Gemini 3.1 Pro Preview |
| CL-bench | 20.8% | Not measured | Only Gemini 3.1 Pro Preview measured |
| Furniture assembly | 26.7% | 20.8% | Gemini 3.1 Pro Preview |
| ExploitBench | 26.1% | Not measured | Only Gemini 3.1 Pro Preview measured |
| CL-bench Life | 16.9% | Not measured | Only Gemini 3.1 Pro Preview measured |
| LMArena Text | 1480 | 1399 | Gemini 3.1 Pro Preview |
| LMArena Text: instruction following | 1466 | 1406 | Gemini 3.1 Pro Preview |
| LMArena Text: creative writing | 1482 | 1381 | Gemini 3.1 Pro Preview |
| LMArena Vision | 1296 | 1231 | Gemini 3.1 Pro Preview |
| LMArena Text: English | 1478 | 1411 | Gemini 3.1 Pro Preview |
| LMArena Text: non-English | 1476 | 1386 | Gemini 3.1 Pro Preview |
| LMArena Text: Chinese | 1527 | 1449 | Gemini 3.1 Pro Preview |
| LMArena Text: German | 1490 | 1366 | Gemini 3.1 Pro Preview |
| LMArena Text: Japanese | 1491 | 1359 | Gemini 3.1 Pro Preview |
| LMArena Text: Korean | 1455 | 1383 | Gemini 3.1 Pro Preview |
| LMArena Text: French | 1487 | 1431 | Gemini 3.1 Pro Preview |
| LMArena Text: Spanish | 1481 | 1406 | Gemini 3.1 Pro Preview |
| LMArena Text: Russian | 1497 | 1399 | Gemini 3.1 Pro Preview |
| LMArena Text: Polish | 1498 | 1420 | Gemini 3.1 Pro Preview |
| LMArena Text: multi-turn | 1487 | 1394 | Gemini 3.1 Pro Preview |
| LMArena Text: longer queries | 1482 | 1416 | Gemini 3.1 Pro Preview |
| LMArena Text: writing and language | 1481 | 1394 | Gemini 3.1 Pro Preview |
| LMArena Text: entertainment and media | 1465 | 1376 | Gemini 3.1 Pro Preview |
| LMArena Vision: English | 1287 | 1229 | Gemini 3.1 Pro Preview |
| LMArena Vision: Chinese | 1364 | 1250 | Gemini 3.1 Pro Preview |
| LMArena Vision: reading text | 1304 | 1241 | Gemini 3.1 Pro Preview |
| LMArena Vision: humor | 1322 | Not measured | Only Gemini 3.1 Pro Preview measured |
| LMArena Vision: captioning | 1345 | Not measured | Only Gemini 3.1 Pro Preview measured |
| LMArena Vision: recognizing things | 1330 | Not measured | Only Gemini 3.1 Pro Preview measured |
| LMArena Vision: creative writing | 1324 | 1217 | Gemini 3.1 Pro Preview |
| LMArena Document | 1444 | Not measured | Only Gemini 3.1 Pro Preview measured |
| Neither model has a result on the other 6 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Gemini 3.1 Pro Preview | 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 | Google Gemini 3.1 Pro Preview | SpaceXAI Grok 4.7 |
|---|---|---|
| Maker | xAI | |
| Weights | No public weights listed | No public weights listed |
| Released | February 19, 2026 | September 21, 2026 |
| Context window | 1.05M | 500K |
| Input $/Mtok | $2.00 | $2.00 |
| Output $/Mtok | $12.00 | $6.00 |
| Coding index | 35.3 | 75.0 |
| Independent measurements behind it | 1 | 2 |
| Cost per solved task | $0.99 | Not computable |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Gemini 3.1 Pro Preview better than Grok 4.7 for coding?
Pick Grok 4.7 for coding: it scores 75.0 on the Vibe Coding Index against 35.3 for Gemini 3.1 Pro Preview. Pick Gemini 3.1 Pro Preview when the context window is larger, 1.05M against 500K tokens, or when what matters is SciCode or LMArena Text: coding, where it leads.
Which is cheaper, Gemini 3.1 Pro Preview or Grok 4.7?
Gemini 3.1 Pro Preview costs $2.00 per million input tokens and $12.00 per million output tokens; Grok 4.7 costs $2.00 and $6.00. Cost per solved task is known for Gemini 3.1 Pro Preview only.
Which has the bigger context window, Gemini 3.1 Pro Preview or Grok 4.7?
Gemini 3.1 Pro Preview, with 1.05M tokens against 500K.
How many benchmarks is the Gemini 3.1 Pro Preview vs Grok 4.7 comparison based on?
84 benchmarks have a result for both models as of October 21, 2026. Gemini 3.1 Pro Preview's coding index rests on 1 independent benchmark and Grok 4.7's on 2. Where only one model has a result, the page says so instead of naming a winner.