Gemma 4 31B vs Grok 4.3
Gemma 4 31B leads Grok 4.3 on coding, 39.0 to 37.4 on the Vibe Coding Index, and Gemma 4 31B costs 6.3x less per output token ($0.40 vs $2.50 per million). Updated October 22, 2026; 57 benchmarks have a result for both.
Gemma 4 31B or Grok 4.3: which to pick
Gemma 4 31B and Grok 4.3 are level for coding, 39.0 against 37.4 on the Vibe Coding Index, so price and context decide.
Pick Grok 4.3 for a larger context window (1M against 262K tokens) and work measured by SciCode or Terminal-Bench Hard (Artificial Analysis run), where it leads. Pick Gemma 4 31B for output tokens 6.3x cheaper ($0.40 vs $2.50 per million) and work measured by LMArena WebDev or AA Coding Index, where it leads.
- Shared results
- 57
- Gemma 4 31B only
- 14
- Grok 4.3 only
- 48
- Like-for-like categories
- 7 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
No call
Level: 39.0 against 37.4, inside 2 points.
2 and 3 benchmarks behind the scores
Intelligence
AA Intelligence Index
Grok 4.3
Grok 4.3 leads, 24.9 against 14.7.
Same board, both measured
Agentic work
AA Agentic Index
Grok 4.3
Grok 4.3 leads, 15.5 against 4.2.
Same board, both measured
Reasoning
GPQA Diamond
No call
Only Grok 4.3 has a GPQA Diamond result, 91.4%.
Directional only
Knowledge
MMLU Pro
No call
Only Grok 4.3 has a MMLU Pro result, 85.8%.
Directional only
Web design
Design Arena: websites
No call
Only Grok 4.3 has a Design Arena: websites result, 1196.
Directional only
Long documents
Listed context window
Grok 4.3
Grok 4.3 takes 1M tokens against 262K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Gemma 4 31B
Gemma 4 31B $0.0003, Grok 4.3 $0.0025 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only Grok 4.3 has the number, $0.31.
Directional only
At a glance
- Coding index
- Gemma 4 31B 39.0 from 2 benchmarks, Grok 4.3 37.4 from 3 benchmarks.
- Widest category
- Agentic work, 21.7 points apart on average over 2 shared benchmarks.
- Widest single gap
- SAGE (Vals AI): Gemma 4 31B 55.0% against Grok 4.3 19.7%, 35.3 points apart on a 0 to 100 scale.
- Output price
- Gemma 4 31B $0.40 against Grok 4.3 $2.50 per million output tokens, 6.3x apart.
- Context window
- Gemma 4 31B takes 262K tokens, Grok 4.3 1M.
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 | Gemma 4 31B | Bars | Grok 4.3 | Ties |
|---|---|---|---|---|
| Coding | 7 | 3 | ||
| Intelligence | 0 | 1 | ||
| Agentic work | 0 | 2 | ||
| Reasoning | 5 | 3 | ||
| Math | 2 | 1 | ||
| Knowledge | 5 | 2 | ||
| General | 23 | 3 | ||
| All shared boards | 42 | 15 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index73
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| LiveBench coding | 49.0% | Not measured | Only Gemma 4 31B measured |
| LMArena WebDev | 1367 | 1358 | Gemma 4 31B |
| AA Coding Index | 43.4 | 42.2 | Gemma 4 31B |
| LiveCodeBench (Vals AI) | Not measured | 84.5% | Only Grok 4.3 measured |
| SWE-bench Verified (Vals AI) | Not measured | 71.4% | Only Grok 4.3 measured |
| Vibe Code Bench (Vals AI) | Not measured | 19.4% | Only Grok 4.3 measured |
| Code migration (Vals AI) | Not measured | 6.8% | Only Grok 4.3 measured |
| ProgramBench (Vals AI) | Not measured | 0.0% | Only Grok 4.3 measured |
| Terminal-Bench 2.1 (Vals AI) | Not measured | 42.0% | Only Grok 4.3 measured |
| SkillsBench (Vals AI) | Not measured | 40.6% | Only Grok 4.3 measured |
| SciCode | 45.5% | 48.3% | Grok 4.3 |
| Terminal-Bench Hard (Artificial Analysis run) | 36.4% | 37.9% | Grok 4.3 |
| WeirdML | 52.3% | 49.9% | Gemma 4 31B |
| ALE-Bench | 925.5 | 944.2 | Grok 4.3 |
| LMArena Text: coding | 1459 | 1415 | Gemma 4 31B |
| LMArena Text: software and IT | 1463 | 1416 | Gemma 4 31B |
| LMArena WebDev: React | 1359 | 1353 | Gemma 4 31B |
| LMArena WebDev: HTML | 1380 | 1367 | Gemma 4 31B |
| LMArena WebDev: from an image | Not measured | 1375 | Only Grok 4.3 measured |
| SciCode | 8.9% | Not measured | Only Gemma 4 31B measured |
| Neither model has a result on the other 19 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index01
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| AA Intelligence Index | 14.7 | 24.9 | Grok 4.3 |
| Epoch Capabilities Index | 143.0 | Not measured | Only Gemma 4 31B measured |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| AA Agentic Index | 4.2 | 15.5 | Grok 4.3 |
| Design Arena: agents building web apps | Not measured | 1126 | Only Grok 4.3 measured |
| Design Arena: agents building full-stack apps | Not measured | 1006 | Only Grok 4.3 measured |
| Design Arena: agents building mobile apps | Not measured | 1058 | Only Grok 4.3 measured |
| Design Arena: agents building Android apps | Not measured | 962 | Only Grok 4.3 measured |
| Design Arena: agents building Godot games | Not measured | 914 | Only Grok 4.3 measured |
| Design Arena: agents building games | Not measured | 1007 | Only Grok 4.3 measured |
| Design Arena: HTML slides | Not measured | 959 | Only Grok 4.3 measured |
| Design Arena: PowerPoint slides | Not measured | 988 | Only Grok 4.3 measured |
| Design Arena: spreadsheets | Not measured | 879 | Only Grok 4.3 measured |
| LiveBench research | 44.4% | Not measured | Only Gemma 4 31B measured |
| LiveBench browser | 4.0% | Not measured | Only Gemma 4 31B measured |
| LiveBench long agentic | 13.3% | Not measured | Only Gemma 4 31B measured |
| Finance Agent (Vals AI) | Not measured | 37.7% | Only Grok 4.3 measured |
| Tax Agent Bench (Vals AI) | Not measured | 6.2% | Only Grok 4.3 measured |
| Legal Research Bench (Vals AI) | Not measured | 15.4% | Only Grok 4.3 measured |
| Excel Modeling Benchmark (Vals AI) | Not measured | 18.4% | Only Grok 4.3 measured |
| τ²-Bench Telecom | 65.5% | 97.7% | Grok 4.3 |
| Vending-Bench 2 | Not measured | $35 | Only Grok 4.3 measured |
| LMArena Search | Not measured | 1166 | Only Grok 4.3 measured |
| Neither model has a result on the other 21 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index53
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| GPQA Diamond | Not measured | 91.4% | Only Grok 4.3 measured |
| LiveBench reasoning | 68.3% | Not measured | Only Gemma 4 31B measured |
| MMMU Pro (Vals AI) | Not measured | 83.1% | Only Grok 4.3 measured |
| GPQA Diamond (Artificial Analysis run) | 85.7% | 90.1% | Grok 4.3 |
| Humanity's Last Exam (Artificial Analysis run) | 23.6% | 37.2% | Grok 4.3 |
| GPQA Diamond (Epoch AI run) | 75.8% | 88.8% | Grok 4.3 |
| Chess puzzles | Not measured | 18.0% | Only Grok 4.3 measured |
| LMArena Text: hard prompts | 1448 | 1396 | Gemma 4 31B |
| LMArena Text: expert | 1464 | 1384 | Gemma 4 31B |
| LMArena Text: hard prompts in English | 1456 | 1402 | Gemma 4 31B |
| LMArena Vision: diagrams | 1283 | 1241 | Gemma 4 31B |
| LMArena Vision: homework | 1310 | 1241 | Gemma 4 31B |
| Kagi LLM Benchmark | 63.5% | Not measured | Only Gemma 4 31B measured |
| Neither model has a result on the other 9 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index21
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| OTIS Mock AIME | 73.3% | 93.3% | Grok 4.3 |
| FrontierMath, tiers 1 to 3 | Not measured | 42.8% | Only Grok 4.3 measured |
| FrontierMath, tier 4 | Not measured | 14.6% | Only Grok 4.3 measured |
| ProofBench | Not measured | 11.0% | Only Grok 4.3 measured |
| LMArena Text: math | 1463 | 1387 | Gemma 4 31B |
| LMArena Text: mathematical work | 1465 | 1396 | Gemma 4 31B |
| Neither model has a result on the other 7 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index52
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| MMLU Pro | Not measured | 85.8% | Only Grok 4.3 measured |
| LegalBench (Vals AI) | Not measured | 84.5% | Only Grok 4.3 measured |
| CaseLaw (Vals AI) | 52.6% | 79.3% | Grok 4.3 |
| CorpFin (Vals AI) | Not measured | 68.5% | Only Grok 4.3 measured |
| TaxEval (Vals AI) | Not measured | 70.8% | Only Grok 4.3 measured |
| MortgageTax (Vals AI) | 61.4% | 48.3% | Gemma 4 31B |
| MedCode (Vals AI) | Not measured | 38.1% | Only Grok 4.3 measured |
| SimpleQA Verified | 10.4% | 33.2% | Grok 4.3 |
| LMArena Text: science | 1457 | 1399 | Gemma 4 31B |
| LMArena Text: medicine and healthcare | 1451 | 1384 | Gemma 4 31B |
| LMArena Text: legal and government | 1438 | 1386 | Gemma 4 31B |
| LMArena Text: business and finance | 1430 | 1381 | Gemma 4 31B |
| FACTS Benchmark Suite | 45.3% | Not measured | Only Gemma 4 31B measured |
| Neither model has a result on the other 5 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index9 boards, none shared
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| Design Arena: websites | Not measured | 1196 | Only Grok 4.3 measured |
| Design Arena: UI components | Not measured | 1190 | Only Grok 4.3 measured |
| Design Arena: game dev | Not measured | 1173 | Only Grok 4.3 measured |
| Design Arena: data viz | Not measured | 1179 | Only Grok 4.3 measured |
| Design Arena: 3D | Not measured | 1124 | Only Grok 4.3 measured |
| Design Arena: all code categories | Not measured | 1186 | Only Grok 4.3 measured |
| Design Arena: SVG | Not measured | 1080 | Only Grok 4.3 measured |
| Design Arena: ASCII art | Not measured | 1125 | Only Grok 4.3 measured |
| LiveBench design | 58.4% | Not measured | Only Gemma 4 31B measured |
GeneralLike-for-likePublic boards, shown as published, kept out of the index233
| Benchmark | Gemma 4 31B | Grok 4.3 | Leader |
|---|---|---|---|
| LiveBench data analysis | 53.3% | Not measured | Only Gemma 4 31B measured |
| Public Benefits Bench (Vals AI) | Not measured | 51.7% | Only Grok 4.3 measured |
| SAGE (Vals AI) | 55.0% | 19.7% | Gemma 4 31B |
| MedScribe (Vals AI) | Not measured | 74.4% | Only Grok 4.3 measured |
| Vals Multimodal Index | Not measured | 43.3% | Only Grok 4.3 measured |
| IFBench | 75.6% | 83.3% | Grok 4.3 |
| Long context reasoning (AA-LCR) | 69.7% | 75.0% | Grok 4.3 |
| DTBench | 82.7% | 90.7% | Grok 4.3 |
| LMCA | 39.3% | 38.3% | Gemma 4 31B |
| Surface Evolver Bench | 30.6% | Not measured | Only Gemma 4 31B measured |
| LMArena Text | 1443 | 1397 | Gemma 4 31B |
| LMArena Text: instruction following | 1433 | 1366 | Gemma 4 31B |
| LMArena Text: creative writing | 1417 | 1380 | Gemma 4 31B |
| LMArena Vision | 1276 | 1229 | Gemma 4 31B |
| LMArena Text: English | 1451 | 1404 | Gemma 4 31B |
| LMArena Text: non-English | 1430 | 1385 | Gemma 4 31B |
| LMArena Text: Chinese | 1475 | 1422 | Gemma 4 31B |
| LMArena Text: German | Not measured | 1395 | Only Grok 4.3 measured |
| LMArena Text: Japanese | Not measured | 1379 | Only Grok 4.3 measured |
| LMArena Text: Korean | Not measured | 1354 | Only Grok 4.3 measured |
| LMArena Text: French | 1436 | 1411 | Gemma 4 31B |
| LMArena Text: Spanish | 1442 | 1399 | Gemma 4 31B |
| LMArena Text: Russian | 1460 | 1399 | Gemma 4 31B |
| LMArena Text: Polish | 1433 | 1398 | Gemma 4 31B |
| LMArena Text: multi-turn | 1452 | 1406 | Gemma 4 31B |
| LMArena Text: longer queries | 1446 | 1393 | Gemma 4 31B |
| LMArena Text: writing and language | 1432 | 1385 | Gemma 4 31B |
| LMArena Text: entertainment and media | 1405 | 1370 | Gemma 4 31B |
| LMArena Vision: English | 1271 | 1235 | Gemma 4 31B |
| LMArena Vision: Chinese | 1326 | 1257 | Gemma 4 31B |
| LMArena Vision: reading text | 1282 | 1235 | Gemma 4 31B |
| LMArena Vision: humor | 1280 | 1222 | Gemma 4 31B |
| LMArena Vision: captioning | 1218 | Not measured | Only Gemma 4 31B measured |
| LMArena Vision: recognizing things | 1226 | 1217 | Gemma 4 31B |
| LMArena Vision: creative writing | 1285 | 1237 | Gemma 4 31B |
| LMArena Document | 1425 | Not measured | Only Gemma 4 31B measured |
| Neither model has a result on the other 10 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Gemma 4 31B | Grok 4.3 | 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
Gemma 4 31B costs less
Repository review
50K input + 3K output tokens
Gemma 4 31B costs less
Agent loop
200K input + 10K output tokens
Gemma 4 31B 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 Gemma 4 31B | SpaceXAI Grok 4.3 |
|---|---|---|
| Maker | xAI | |
| Weights | Open weights | No public weights listed |
| Released | April 2, 2026 | April 30, 2026 |
| Context window | 262K | 1M |
| Input $/Mtok | $0.14 | $1.25 |
| Output $/Mtok | $0.40 | $2.50 |
| Coding index | 39.0 | 37.4 |
| Independent measurements behind it | 2 | 3 |
| Cost per solved task | Not computable | $0.31 |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Gemma 4 31B better than Grok 4.3 for coding?
Gemma 4 31B and Grok 4.3 are level for coding, 39.0 against 37.4 on the Vibe Coding Index, so price and context decide. Pick Grok 4.3 for a larger context window (1M against 262K tokens) and work measured by SciCode or Terminal-Bench Hard (Artificial Analysis run), where it leads. Pick Gemma 4 31B for output tokens 6.3x cheaper ($0.40 vs $2.50 per million) and work measured by LMArena WebDev or AA Coding Index, where it leads.
Which is cheaper, Gemma 4 31B or Grok 4.3?
Gemma 4 31B costs $0.14 per million input tokens and $0.40 per million output tokens; Grok 4.3 costs $1.25 and $2.50. Cost per solved task is known for Grok 4.3 only.
Which has the bigger context window, Gemma 4 31B or Grok 4.3?
Grok 4.3, with 1M tokens against 262K.
How many benchmarks is the Gemma 4 31B vs Grok 4.3 comparison based on?
57 benchmarks have a result for both models as of October 22, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and Grok 4.3's on 3. Where only one model has a result, the page says so instead of naming a winner.