Enter opens the highlighted result. Esc closes.

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 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
42
Grok 4.3xAI
Coding
37.4
Overall
53.1
Output $/M
$2.50
15
vs boards won of 57 shared

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.

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.

Boards won, where both have a result
CategoryGemma 4 31BBarsGrok 4.3Ties
Coding73
Intelligence01
Agentic work02
Reasoning53
Math21
Knowledge52
General233
All shared boards4215
CodingLike-for-likeSix of these boards feed the Vibe Coding Index73
Coding benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
LiveBench coding49.0%Not measuredOnly Gemma 4 31B measured
LMArena WebDev13671358Gemma 4 31B
AA Coding Index43.442.2Gemma 4 31B
LiveCodeBench (Vals AI)Not measured84.5%Only Grok 4.3 measured
SWE-bench Verified (Vals AI)Not measured71.4%Only Grok 4.3 measured
Vibe Code Bench (Vals AI)Not measured19.4%Only Grok 4.3 measured
Code migration (Vals AI)Not measured6.8%Only Grok 4.3 measured
ProgramBench (Vals AI)Not measured0.0%Only Grok 4.3 measured
Terminal-Bench 2.1 (Vals AI)Not measured42.0%Only Grok 4.3 measured
SkillsBench (Vals AI)Not measured40.6%Only Grok 4.3 measured
SciCode45.5%48.3%Grok 4.3
Terminal-Bench Hard (Artificial Analysis run)36.4%37.9%Grok 4.3
WeirdML52.3%49.9%Gemma 4 31B
ALE-Bench925.5944.2Grok 4.3
LMArena Text: coding14591415Gemma 4 31B
LMArena Text: software and IT14631416Gemma 4 31B
LMArena WebDev: React13591353Gemma 4 31B
LMArena WebDev: HTML13801367Gemma 4 31B
LMArena WebDev: from an imageNot measured1375Only Grok 4.3 measured
SciCode8.9%Not measuredOnly 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
Intelligence benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
AA Intelligence Index14.724.9Grok 4.3
Epoch Capabilities Index143.0Not measuredOnly Gemma 4 31B measured
Agentic workLike-for-likePublic boards, shown as published, kept out of the index02
Agentic work benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
AA Agentic Index4.215.5Grok 4.3
Design Arena: agents building web appsNot measured1126Only Grok 4.3 measured
Design Arena: agents building full-stack appsNot measured1006Only Grok 4.3 measured
Design Arena: agents building mobile appsNot measured1058Only Grok 4.3 measured
Design Arena: agents building Android appsNot measured962Only Grok 4.3 measured
Design Arena: agents building Godot gamesNot measured914Only Grok 4.3 measured
Design Arena: agents building gamesNot measured1007Only Grok 4.3 measured
Design Arena: HTML slidesNot measured959Only Grok 4.3 measured
Design Arena: PowerPoint slidesNot measured988Only Grok 4.3 measured
Design Arena: spreadsheetsNot measured879Only Grok 4.3 measured
LiveBench research44.4%Not measuredOnly Gemma 4 31B measured
LiveBench browser4.0%Not measuredOnly Gemma 4 31B measured
LiveBench long agentic13.3%Not measuredOnly Gemma 4 31B measured
Finance Agent (Vals AI)Not measured37.7%Only Grok 4.3 measured
Tax Agent Bench (Vals AI)Not measured6.2%Only Grok 4.3 measured
Legal Research Bench (Vals AI)Not measured15.4%Only Grok 4.3 measured
Excel Modeling Benchmark (Vals AI)Not measured18.4%Only Grok 4.3 measured
τ²-Bench Telecom65.5%97.7%Grok 4.3
Vending-Bench 2Not measured$35Only Grok 4.3 measured
LMArena SearchNot measured1166Only 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
Reasoning benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
GPQA DiamondNot measured91.4%Only Grok 4.3 measured
LiveBench reasoning68.3%Not measuredOnly Gemma 4 31B measured
MMMU Pro (Vals AI)Not measured83.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 puzzlesNot measured18.0%Only Grok 4.3 measured
LMArena Text: hard prompts14481396Gemma 4 31B
LMArena Text: expert14641384Gemma 4 31B
LMArena Text: hard prompts in English14561402Gemma 4 31B
LMArena Vision: diagrams12831241Gemma 4 31B
LMArena Vision: homework13101241Gemma 4 31B
Kagi LLM Benchmark63.5%Not measuredOnly 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
Math benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
OTIS Mock AIME73.3%93.3%Grok 4.3
FrontierMath, tiers 1 to 3Not measured42.8%Only Grok 4.3 measured
FrontierMath, tier 4Not measured14.6%Only Grok 4.3 measured
ProofBenchNot measured11.0%Only Grok 4.3 measured
LMArena Text: math14631387Gemma 4 31B
LMArena Text: mathematical work14651396Gemma 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
Knowledge benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
MMLU ProNot measured85.8%Only Grok 4.3 measured
LegalBench (Vals AI)Not measured84.5%Only Grok 4.3 measured
CaseLaw (Vals AI)52.6%79.3%Grok 4.3
CorpFin (Vals AI)Not measured68.5%Only Grok 4.3 measured
TaxEval (Vals AI)Not measured70.8%Only Grok 4.3 measured
MortgageTax (Vals AI)61.4%48.3%Gemma 4 31B
MedCode (Vals AI)Not measured38.1%Only Grok 4.3 measured
SimpleQA Verified10.4%33.2%Grok 4.3
LMArena Text: science14571399Gemma 4 31B
LMArena Text: medicine and healthcare14511384Gemma 4 31B
LMArena Text: legal and government14381386Gemma 4 31B
LMArena Text: business and finance14301381Gemma 4 31B
FACTS Benchmark Suite45.3%Not measuredOnly 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
Web design benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
Design Arena: websitesNot measured1196Only Grok 4.3 measured
Design Arena: UI componentsNot measured1190Only Grok 4.3 measured
Design Arena: game devNot measured1173Only Grok 4.3 measured
Design Arena: data vizNot measured1179Only Grok 4.3 measured
Design Arena: 3DNot measured1124Only Grok 4.3 measured
Design Arena: all code categoriesNot measured1186Only Grok 4.3 measured
Design Arena: SVGNot measured1080Only Grok 4.3 measured
Design Arena: ASCII artNot measured1125Only Grok 4.3 measured
LiveBench design58.4%Not measuredOnly Gemma 4 31B measured
GeneralLike-for-likePublic boards, shown as published, kept out of the index233
General benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
LiveBench data analysis53.3%Not measuredOnly Gemma 4 31B measured
Public Benefits Bench (Vals AI)Not measured51.7%Only Grok 4.3 measured
SAGE (Vals AI)55.0%19.7%Gemma 4 31B
MedScribe (Vals AI)Not measured74.4%Only Grok 4.3 measured
Vals Multimodal IndexNot measured43.3%Only Grok 4.3 measured
IFBench75.6%83.3%Grok 4.3
Long context reasoning (AA-LCR)69.7%75.0%Grok 4.3
DTBench82.7%90.7%Grok 4.3
LMCA39.3%38.3%Gemma 4 31B
Surface Evolver Bench30.6%Not measuredOnly Gemma 4 31B measured
LMArena Text14431397Gemma 4 31B
LMArena Text: instruction following14331366Gemma 4 31B
LMArena Text: creative writing14171380Gemma 4 31B
LMArena Vision12761229Gemma 4 31B
LMArena Text: English14511404Gemma 4 31B
LMArena Text: non-English14301385Gemma 4 31B
LMArena Text: Chinese14751422Gemma 4 31B
LMArena Text: GermanNot measured1395Only Grok 4.3 measured
LMArena Text: JapaneseNot measured1379Only Grok 4.3 measured
LMArena Text: KoreanNot measured1354Only Grok 4.3 measured
LMArena Text: French14361411Gemma 4 31B
LMArena Text: Spanish14421399Gemma 4 31B
LMArena Text: Russian14601399Gemma 4 31B
LMArena Text: Polish14331398Gemma 4 31B
LMArena Text: multi-turn14521406Gemma 4 31B
LMArena Text: longer queries14461393Gemma 4 31B
LMArena Text: writing and language14321385Gemma 4 31B
LMArena Text: entertainment and media14051370Gemma 4 31B
LMArena Vision: English12711235Gemma 4 31B
LMArena Vision: Chinese13261257Gemma 4 31B
LMArena Vision: reading text12821235Gemma 4 31B
LMArena Vision: humor12801222Gemma 4 31B
LMArena Vision: captioning1218Not measuredOnly Gemma 4 31B measured
LMArena Vision: recognizing things12261217Gemma 4 31B
LMArena Vision: creative writing12851237Gemma 4 31B
LMArena Document1425Not measuredOnly 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
Image generation benchmarks for Gemma 4 31B and Grok 4.3
BenchmarkGemma 4 31BGrok 4.3Leader
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.0003Fits in one request
Grok 4.3$0.0025Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.0082Fits in one request
Grok 4.3$0.070Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.032Fits in one request
Grok 4.3$0.275Fits 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.3
SpecificationGoogle Gemma 4 31BSpaceXAI Grok 4.3
MakerGooglexAI
WeightsOpen weightsNo public weights listed
ReleasedApril 2, 2026April 30, 2026
Context window262K1M
Input $/Mtok$0.14$1.25
Output $/Mtok$0.40$2.50
Coding index39.037.4
Independent measurements behind it23
Cost per solved taskNot computable$0.31
SourceOpenRouter listingOpenRouter 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.

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-3" title="Gemma 4 31B vs Grok 4.3, 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-3">LLMBenchmark.ai, Gemma 4 31B vs Grok 4.3</a></p>