Enter opens the highlighted result. Esc closes.

Gemma 4 31B vs o4 Mini

o4 Mini leads Gemma 4 31B on the Artificial Analysis Intelligence Index, 16.7 to 14.7, and Gemma 4 31B costs 11.0x less per output token ($0.40 vs $4.40 per million). Updated October 22, 2026; 54 benchmarks have a result for both.

Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
45
o4 MiniOpenAI
Coding
No data
Overall
43.0
Output $/M
$4.40
9
vs boards won of 54 shared

Gemma 4 31B or o4 Mini: which to pick

Only Gemma 4 31B has a coding score, 39.0 on the Vibe Coding Index; o4 Mini has none, so the two cannot be ranked on coding.

Pick o4 Mini for work measured by WeirdML or SciCode, where it leads.

Shared results
54
Gemma 4 31B only
17
o4 Mini only
44
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, o4 Mini not benchmarked.
Widest category
General, 14.1 points apart on average over 27 shared benchmarks.
Widest single gap
LMArena Text: longer queries: Gemma 4 31B 1446 against o4 Mini 1315, 21.9 points apart on a 0 to 100 scale.
Output price
Gemma 4 31B $0.40 against o4 Mini $4.40 per million output tokens, 11.0x apart.
Context window
Gemma 4 31B takes 262K tokens, o4 Mini 200K.

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 31BBarso4 MiniTies
Coding32
Intelligence02
Agentic work10
Reasoning72
Math21
Knowledge52
General270
All shared boards459
CodingLike-for-likeSix of these boards feed the Vibe Coding Index32
Coding benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
Aider polyglotNot measured72.0%Only o4 Mini measured
SWE-bench VerifiedNot measured64.6%Only o4 Mini measured
SWE-bench MultimodalNot measured33.9%Only o4 Mini measured
LiveBench coding49.0%Not measuredOnly Gemma 4 31B measured
LMArena WebDev1367Not measuredOnly Gemma 4 31B measured
AA Coding Index43.4Not measuredOnly Gemma 4 31B measured
LiveCodeBench (Vals AI)Not measured82.2%Only o4 Mini measured
LiveCodeBench (Artificial Analysis run)Not measured85.9%Only o4 Mini measured
SciCode45.5%Not measuredOnly Gemma 4 31B measured
Terminal-Bench Hard (Artificial Analysis run)36.4%15.2%Gemma 4 31B
GSO-BenchNot measured3.6%Only o4 Mini measured
WeirdML52.3%52.6%o4 Mini
ALE-Bench925.5Not measuredOnly Gemma 4 31B measured
LMArena Text: coding14591368Gemma 4 31B
LMArena Text: software and IT14631367Gemma 4 31B
LMArena WebDev: React1359Not measuredOnly Gemma 4 31B measured
LMArena WebDev: HTML1380Not measuredOnly Gemma 4 31B measured
SciCode8.9%10.8%o4 Mini
Neither model has a result on the other 21 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
AA Intelligence Index14.716.7o4 Mini
Epoch Capabilities Index143.0145.5o4 Mini
Agentic workLike-for-likePublic boards, shown as published, kept out of the index10
Agentic work benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
AA Agentic Index4.2Not measuredOnly Gemma 4 31B 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
τ²-Bench Telecom65.5%55.6%Gemma 4 31B
METR time horizonsNot measured63.9%Only o4 Mini measured
Berkeley Function Calling Leaderboard (BFCL)Not measured53.2%Only o4 Mini measured
Neither model has a result on the other 34 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index72
Reasoning benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
GPQA DiamondNot measured74.5%Only o4 Mini measured
LiveBench reasoning68.3%Not measuredOnly Gemma 4 31B measured
MMMU Pro (Vals AI)Not measured79.7%Only o4 Mini measured
GPQA Diamond (Artificial Analysis run)85.7%78.4%Gemma 4 31B
Humanity's Last Exam (Artificial Analysis run)23.6%16.5%Gemma 4 31B
GPQA Diamond (Epoch AI run)75.8%79.6%o4 Mini
ARC-AGINot measured58.7%Only o4 Mini measured
ARC-AGI-2Not measured6.1%Only o4 Mini measured
SimpleBenchNot measured38.7%Only o4 Mini measured
Chess puzzlesNot measured22.0%Only o4 Mini measured
Mystery game puzzlesNot measured5.0%Only o4 Mini measured
VPCTNot measured57.5%Only o4 Mini measured
LMArena Text: hard prompts14481351Gemma 4 31B
LMArena Text: expert14641343Gemma 4 31B
LMArena Text: hard prompts in English14561366Gemma 4 31B
LMArena Vision: diagrams12831197Gemma 4 31B
LMArena Vision: homework13101234Gemma 4 31B
Kagi LLM Benchmark63.5%67.6%o4 Mini
Neither model has a result on the other 4 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index21
Math benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
AIMENot measured83.7%Only o4 Mini measured
MATH 500 (Vals AI)Not measured94.2%Only o4 Mini measured
MGSM (Vals AI)Not measured93.4%Only o4 Mini measured
AA Math IndexNot measured90.7Only o4 Mini measured
AIME 2025 (Artificial Analysis run)Not measured90.7%Only o4 Mini measured
OTIS Mock AIME73.3%81.7%o4 Mini
FrontierMath, tiers 1 to 3Not measured36.1%Only o4 Mini measured
FrontierMath, tier 4Not measured4.9%Only o4 Mini measured
MATH level 5Not measured97.8%Only o4 Mini measured
LMArena Text: math14631389Gemma 4 31B
LMArena Text: mathematical work14651379Gemma 4 31B
Neither model has a result on the other 2 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index52
Knowledge benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
MMLU ProNot measured80.6%Only o4 Mini measured
LegalBench (Vals AI)Not measured79.2%Only o4 Mini measured
CaseLaw (Vals AI)52.6%Not measuredOnly Gemma 4 31B measured
CorpFin (Vals AI)Not measured59.0%Only o4 Mini measured
TaxEval (Vals AI)Not measured74.8%Only o4 Mini measured
MortgageTax (Vals AI)61.4%64.8%o4 Mini
MedQA (Vals AI)Not measured96.0%Only o4 Mini measured
MedCode (Vals AI)Not measured33.8%Only o4 Mini measured
MMLU Pro (Artificial Analysis run)Not measured83.2%Only o4 Mini measured
SimpleQA Verified10.4%19.6%o4 Mini
GeoBenchNot measured64.0%Only o4 Mini measured
LMArena Text: science14571354Gemma 4 31B
LMArena Text: medicine and healthcare14511361Gemma 4 31B
LMArena Text: legal and government14381350Gemma 4 31B
LMArena Text: business and finance14301325Gemma 4 31B
FACTS Benchmark Suite45.3%28.1%Gemma 4 31B
Neither model has a result on the other 2 boards here
Web designDirectional onlyPublic boards, shown as published, kept out of the index7 boards, none shared
Web design benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
Design Arena: websitesNot measured985Only o4 Mini measured
Design Arena: UI componentsNot measured983Only o4 Mini measured
Design Arena: game devNot measured1003Only o4 Mini measured
Design Arena: data vizNot measured991Only o4 Mini measured
Design Arena: 3DNot measured854Only o4 Mini measured
Design Arena: all code categoriesNot measured976Only o4 Mini measured
LiveBench design58.4%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 2 boards here
GeneralLike-for-likePublic boards, shown as published, kept out of the index270
General benchmarks for Gemma 4 31B and o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
LiveBench data analysis53.3%Not measuredOnly Gemma 4 31B measured
SAGE (Vals AI)55.0%41.1%Gemma 4 31B
MedScribe (Vals AI)Not measured69.1%Only o4 Mini measured
IFBench75.6%68.7%Gemma 4 31B
Long context reasoning (AA-LCR)69.7%61.0%Gemma 4 31B
DTBench82.7%77.6%Gemma 4 31B
LMCA39.3%26.5%Gemma 4 31B
Fiction.LiveBenchNot measured77.8%Only o4 Mini measured
Creative writing (Lech Mazur)Not measured75.0%Only o4 Mini measured
Surface Evolver Bench30.6%Not measuredOnly Gemma 4 31B measured
LMArena Text14431353Gemma 4 31B
LMArena Text: instruction following14331320Gemma 4 31B
LMArena Text: creative writing14171294Gemma 4 31B
LMArena Vision12761194Gemma 4 31B
LMArena Text: English14511367Gemma 4 31B
LMArena Text: non-English14301337Gemma 4 31B
LMArena Text: Chinese14751354Gemma 4 31B
LMArena Text: GermanNot measured1336Only o4 Mini measured
LMArena Text: JapaneseNot measured1308Only o4 Mini measured
LMArena Text: KoreanNot measured1312Only o4 Mini measured
LMArena Text: French14361364Gemma 4 31B
LMArena Text: Spanish14421346Gemma 4 31B
LMArena Text: Russian14601334Gemma 4 31B
LMArena Text: Polish14331358Gemma 4 31B
LMArena Text: multi-turn14521350Gemma 4 31B
LMArena Text: longer queries14461315Gemma 4 31B
LMArena Text: writing and language14321316Gemma 4 31B
LMArena Text: entertainment and media14051308Gemma 4 31B
LMArena Vision: English12711200Gemma 4 31B
LMArena Vision: Chinese13261218Gemma 4 31B
LMArena Vision: reading text12821197Gemma 4 31B
LMArena Vision: humor12801199Gemma 4 31B
LMArena Vision: captioning12181204Gemma 4 31B
LMArena Vision: recognizing things12261218Gemma 4 31B
LMArena Vision: creative writing12851166Gemma 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 o4 Mini
BenchmarkGemma 4 31Bo4 MiniLeader
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
o4 Mini$0.0033Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.0082Fits in one request
o4 Mini$0.068Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.032Fits in one request
o4 Mini$0.264Exceeds the context window

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 o4 Mini
SpecificationGoogle Gemma 4 31BOpenAI o4 Mini
MakerGoogleOpenAI
WeightsOpen weightsNo public weights listed
ReleasedApril 2, 2026April 16, 2025
Context window262K200K
Input $/Mtok$0.14$1.10
Output $/Mtok$0.40$4.40
Coding index39.0Not benchmarked
Independent measurements behind it20
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 4 31B better than o4 Mini for coding?

Only Gemma 4 31B has a coding score, 39.0 on the Vibe Coding Index; o4 Mini has none, so the two cannot be ranked on coding. Pick o4 Mini for work measured by WeirdML or SciCode, where it leads.

Which is cheaper, Gemma 4 31B or o4 Mini?

Gemma 4 31B costs $0.14 per million input tokens and $0.40 per million output tokens; o4 Mini costs $1.10 and $4.40. Cost per solved task is known for neither of them.

Which has the bigger context window, Gemma 4 31B or o4 Mini?

Gemma 4 31B, with 262K tokens against 200K.

How many benchmarks is the Gemma 4 31B vs o4 Mini comparison based on?

54 benchmarks have a result for both models as of October 22, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and o4 Mini's on 0. Where only one model has a result, the page says so instead of naming a winner.

Compare next