LLMBenchmark.ai

Enter opens the highlighted result. Esc closes.

Gemma 4 31B vs Grok 4.5

Updated October 21, 2026. 62 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.

Gemma 4 31BGoogle
Coding
38.3
Overall
14.7
Output $/M
$0.40
8
Grok 4.5xAI
Coding
75.5
Overall
38.8
Output $/M
$6.00
54
vs boards won of 62 shared

Decision reading

Pick Grok 4.5 for coding: it scores 75.5 on the Vibe Coding Index against 38.3 for Gemma 4 31B.

Pick Gemma 4 31B when output tokens cost 15.0x less, or when what matters is WeirdML or LMArena Vision: homework, where it leads.

Shared results
62
Gemma 4 31B only
6
Grok 4.5 only
58
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.

At a glance

Coding index
Gemma 4 31B 38.3 from 2 benchmarks, Grok 4.5 75.5 from 2 benchmarks.
Widest category
Agentic work, 33.3 points apart on average over 4 shared benchmarks.
Widest single gap
LiveBench coding: Gemma 4 31B 49.0% against Grok 4.5 94.3%, 45.3 points apart on a 0 to 100 scale.
Output price
Gemma 4 31B $0.40 against Grok 4.5 $6.00 per million output tokens, 15.0x apart.
Context window
Gemma 4 31B takes 262K tokens, Grok 4.5 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
CategoryGemma 4 31BBarsGrok 4.5Ties
Coding19
Intelligence02
Agentic work04
Reasoning18
Math12
Knowledge15
Web design01
General423
All shared boards854
CodingLike-for-likeFour of these boards feed the Vibe Coding Index19
Coding benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
LiveBench coding49.0%94.3%Grok 4.5
LMArena WebDev13671553Grok 4.5
AA Coding Index43.472.4Grok 4.5
LiveCodeBench (Vals AI)Not measured87.3%Only Grok 4.5 measured
SWE-bench Verified (Vals AI)Not measured86.6%Only Grok 4.5 measured
Terminal-Bench 4 (Vals AI)Not measured8.6%Only Grok 4.5 measured
Vibe Code Bench (Vals AI)Not measured69.0%Only Grok 4.5 measured
Code migration (Vals AI)Not measured36.6%Only Grok 4.5 measured
ProgramBench (Vals AI)Not measured0.0%Only Grok 4.5 measured
IOI (Vals AI)Not measured40.6%Only Grok 4.5 measured
Terminal-Bench 2.1 (Vals AI)Not measured67.8%Only Grok 4.5 measured
SkillsBench (Vals AI)Not measured66.0%Only Grok 4.5 measured
CyberBench (Vals AI)Not measured71.0%Only Grok 4.5 measured
SciCode45.5%55.0%Grok 4.5
Terminal-Bench Hard (Artificial Analysis run)36.4%Not measuredOnly Gemma 4 31B measured
FrontierCodeNot measured42.4%Only Grok 4.5 measured
WeirdML52.3%46.4%Gemma 4 31B
ALE-Bench925.51309.3Grok 4.5
LMArena Text: coding14591474Grok 4.5
LMArena Text: software and IT14631471Grok 4.5
LMArena WebDev: React13591556Grok 4.5
LMArena WebDev: HTML13801567Grok 4.5
LMArena WebDev: from an imageNot measured1562Only Grok 4.5 measured
Neither model has a result on the other 15 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
AA Intelligence Index14.738.8Grok 4.5
Epoch Capabilities Index143.0154.1Grok 4.5
Agentic workLike-for-likePublic boards, shown as published, kept out of the index04
Agentic work benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
AA Agentic Index4.241.2Grok 4.5
Design Arena: agents building web appsNot measured1217Only Grok 4.5 measured
Design Arena: agents building full-stack appsNot measured1249Only Grok 4.5 measured
Design Arena: agents building mobile appsNot measured1221Only Grok 4.5 measured
Design Arena: agents building Android appsNot measured1242Only Grok 4.5 measured
Design Arena: agents building Godot gamesNot measured1229Only Grok 4.5 measured
Design Arena: agents building gamesNot measured1235Only Grok 4.5 measured
Design Arena: HTML slidesNot measured1204Only Grok 4.5 measured
Design Arena: PowerPoint slidesNot measured1232Only Grok 4.5 measured
LiveBench research44.4%85.9%Grok 4.5
LiveBench browser4.0%44.0%Grok 4.5
LiveBench long agentic13.3%27.9%Grok 4.5
SREBench (Vals AI)Not measured0.8%Only Grok 4.5 measured
Finance Agent (Vals AI)Not measured48.4%Only Grok 4.5 measured
Tax Agent Bench (Vals AI)Not measured24.9%Only Grok 4.5 measured
Legal Research Bench (Vals AI)Not measured38.0%Only Grok 4.5 measured
Excel Modeling Benchmark (Vals AI)Not measured52.9%Only Grok 4.5 measured
Time Horizon Index (Vals AI)Not measured6.3%Only Grok 4.5 measured
τ²-Bench Telecom65.5%Not measuredOnly Gemma 4 31B measured
APEX-AgentsNot measured56.2%Only Grok 4.5 measured
PostTrainBenchNot measured23.4%Only Grok 4.5 measured
Vending-Bench 2Not measured$3,887Only Grok 4.5 measured
LMArena SearchNot measured1216Only Grok 4.5 measured
Neither model has a result on the other 16 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index18
Reasoning benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
GPQA DiamondNot measured92.9%Only Grok 4.5 measured
LiveBench reasoning68.3%87.2%Grok 4.5
MMMU Pro (Vals AI)Not measured61.8%Only Grok 4.5 measured
GPQA Diamond (Artificial Analysis run)85.7%93.1%Grok 4.5
Humanity's Last Exam (Artificial Analysis run)23.6%42.7%Grok 4.5
GPQA Diamond (Epoch AI run)75.8%93.4%Grok 4.5
ARC-AGINot measured87.2%Only Grok 4.5 measured
ARC-AGI-2Not measured52.6%Only Grok 4.5 measured
SimpleBenchNot measured70.0%Only Grok 4.5 measured
Chess puzzlesNot measured35.0%Only Grok 4.5 measured
LMArena Text: hard prompts14481462Grok 4.5
LMArena Text: expert14641465Grok 4.5
LMArena Text: hard prompts in English14561464Grok 4.5
LMArena Vision: diagrams12831304Grok 4.5
LMArena Vision: homework13101295Gemma 4 31B
Neither model has a result on the other 6 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index12
Math benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
OTIS Mock AIME73.3%97.8%Grok 4.5
FrontierMath, tiers 1 to 3Not measured57.2%Only Grok 4.5 measured
FrontierMath, tier 4Not measured24.4%Only Grok 4.5 measured
ProofBenchNot measured31.0%Only Grok 4.5 measured
LMArena Text: math14631460Gemma 4 31B
LMArena Text: mathematical work14651482Grok 4.5
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index15
Knowledge benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
MMLU ProNot measured89.2%Only Grok 4.5 measured
LegalBench (Vals AI)Not measured86.0%Only Grok 4.5 measured
CaseLaw (Vals AI)52.6%Not measuredOnly Gemma 4 31B measured
CorpFin (Vals AI)Not measured67.4%Only Grok 4.5 measured
TaxEval (Vals AI)Not measured71.7%Only Grok 4.5 measured
MortgageTax (Vals AI)61.4%61.8%Grok 4.5
MedCode (Vals AI)Not measured43.3%Only Grok 4.5 measured
SimpleQA Verified10.4%48.3%Grok 4.5
LMArena Text: science14571464Grok 4.5
LMArena Text: medicine and healthcare14511440Gemma 4 31B
LMArena Text: legal and government14381463Grok 4.5
LMArena Text: business and finance14301441Grok 4.5
Neither model has a result on the other 5 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index01
Web design benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
Design Arena: websitesNot measured1281Only Grok 4.5 measured
Design Arena: UI componentsNot measured1279Only Grok 4.5 measured
Design Arena: game devNot measured1263Only Grok 4.5 measured
Design Arena: data vizNot measured1267Only Grok 4.5 measured
Design Arena: 3DNot measured1257Only Grok 4.5 measured
Design Arena: all code categoriesNot measured1276Only Grok 4.5 measured
Design Arena: SVGNot measured1215Only Grok 4.5 measured
Design Arena: ASCII artNot measured1257Only Grok 4.5 measured
LiveBench design58.4%78.1%Grok 4.5
GeneralLike-for-likePublic boards, shown as published, kept out of the index423
General benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
LiveBench data analysis53.3%73.0%Grok 4.5
SAGE (Vals AI)55.0%35.0%Gemma 4 31B
MedScribe (Vals AI)Not measured86.9%Only Grok 4.5 measured
Vals Multimodal IndexNot measured63.4%Only Grok 4.5 measured
IFBench75.6%Not measuredOnly Gemma 4 31B measured
Long context reasoning (AA-LCR)69.7%79.3%Grok 4.5
DTBench82.7%96.5%Grok 4.5
LMCA39.3%45.2%Grok 4.5
Surface Evolver Bench30.6%74.4%Grok 4.5
Furniture assemblyNot measured22.5%Only Grok 4.5 measured
LMArena Text14431448Grok 4.5
LMArena Text: instruction following14331445Grok 4.5
LMArena Text: creative writing14171442Grok 4.5
LMArena Vision12761287Grok 4.5
LMArena Text: English14511453Grok 4.5
LMArena Text: non-English14301440Grok 4.5
LMArena Text: Chinese14751495Grok 4.5
LMArena Text: GermanNot measured1448Only Grok 4.5 measured
LMArena Text: JapaneseNot measured1430Only Grok 4.5 measured
LMArena Text: KoreanNot measured1406Only Grok 4.5 measured
LMArena Text: French14361457Grok 4.5
LMArena Text: Spanish14421451Grok 4.5
LMArena Text: Russian14601449Gemma 4 31B
LMArena Text: Polish14331432Gemma 4 31B
LMArena Text: multi-turn14521456Grok 4.5
LMArena Text: longer queries14461462Grok 4.5
LMArena Text: writing and language14321445Grok 4.5
LMArena Text: entertainment and media14051434Grok 4.5
LMArena Vision: English12711285Grok 4.5
LMArena Vision: Chinese13261345Grok 4.5
LMArena Vision: reading text12821293Grok 4.5
LMArena Vision: humor12801276Gemma 4 31B
LMArena Vision: captioning1218Not measuredOnly Gemma 4 31B measured
LMArena Vision: recognizing things1226Not measuredOnly Gemma 4 31B measured
LMArena Vision: creative writing12851293Grok 4.5
LMArena Document14251452Grok 4.5
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
Image generation benchmarks for Gemma 4 31B and Grok 4.5
BenchmarkGemma 4 31BGrok 4.5Leader
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$0.0004Fits in one request
Grok 4.5$0.0050Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.011Fits in one request
Grok 4.5$0.118Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.044Fits in one request
Grok 4.5$0.460Fits in one request

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.

Specifications of Gemma 4 31B and Grok 4.5
SpecificationGoogle Gemma 4 31BSpaceXAI Grok 4.5
MakerGooglexAI
WeightsOpen weightsNo public weights listed
ReleasedApril 2, 2026July 8, 2026
Context window262K500K
Input $/Mtok$0.20$2.00
Output $/Mtok$0.40$6.00
Coding index38.375.5
Independent measurements behind it22
Cost per solved taskNot computable$0.62
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 4 31B better than Grok 4.5 for coding?

Pick Grok 4.5 for coding: it scores 75.5 on the Vibe Coding Index against 38.3 for Gemma 4 31B. Pick Gemma 4 31B when output tokens cost 15.0x less, or when what matters is WeirdML or LMArena Vision: homework, where it leads.

Which is cheaper, Gemma 4 31B or Grok 4.5?

Gemma 4 31B costs $0.20 per million input tokens and $0.40 per million output tokens; Grok 4.5 costs $2.00 and $6.00. Cost per solved task is known for Grok 4.5 only.

Which has the bigger context window, Gemma 4 31B or Grok 4.5?

Grok 4.5, with 500K tokens against 262K.

How many benchmarks is the Gemma 4 31B vs Grok 4.5 comparison based on?

62 benchmarks have a result for both models as of October 21, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and Grok 4.5's on 2. 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/gemma-4-31b-it-vs-grok-4-5" title="Gemma 4 31B vs Grok 4.5, 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/gemma-4-31b-it-vs-grok-4-5">LLMBenchmark.ai, Gemma 4 31B vs Grok 4.5</a></p>