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 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.
Coding
Vibe Coding Index, six public coding benchmarks
No call
Only Gemma 4 31B has a coding score, so no call is made.
One side not measured
Intelligence
AA Intelligence Index
o4 Mini
o4 Mini leads, 16.7 against 14.7.
Same board, both measured
Agentic work
AA Agentic Index
No call
Only Gemma 4 31B has a AA Agentic Index result, 4.2.
Directional only
Reasoning
GPQA Diamond
No call
Only o4 Mini has a GPQA Diamond result, 74.5%.
Directional only
Math
AIME
No call
Only o4 Mini has a AIME result, 83.7%.
Directional only
Knowledge
MMLU Pro
No call
Only o4 Mini has a MMLU Pro result, 80.6%.
Directional only
Web design
Design Arena: websites
No call
Only o4 Mini has a Design Arena: websites result, 985.
Directional only
Long documents
Listed context window
Gemma 4 31B
Gemma 4 31B takes 262K tokens against 200K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Gemma 4 31B
Gemma 4 31B $0.0003, o4 Mini $0.0033 per turn.
List prices
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.
| Category | Gemma 4 31B | Bars | o4 Mini | Ties |
|---|---|---|---|---|
| Coding | 3 | 2 | ||
| Intelligence | 0 | 2 | ||
| Agentic work | 1 | 0 | ||
| Reasoning | 7 | 2 | ||
| Math | 2 | 1 | ||
| Knowledge | 5 | 2 | ||
| General | 27 | 0 | ||
| All shared boards | 45 | 9 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index32
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| Aider polyglot | Not measured | 72.0% | Only o4 Mini measured |
| SWE-bench Verified | Not measured | 64.6% | Only o4 Mini measured |
| SWE-bench Multimodal | Not measured | 33.9% | Only o4 Mini measured |
| LiveBench coding | 49.0% | Not measured | Only Gemma 4 31B measured |
| LMArena WebDev | 1367 | Not measured | Only Gemma 4 31B measured |
| AA Coding Index | 43.4 | Not measured | Only Gemma 4 31B measured |
| LiveCodeBench (Vals AI) | Not measured | 82.2% | Only o4 Mini measured |
| LiveCodeBench (Artificial Analysis run) | Not measured | 85.9% | Only o4 Mini measured |
| SciCode | 45.5% | Not measured | Only Gemma 4 31B measured |
| Terminal-Bench Hard (Artificial Analysis run) | 36.4% | 15.2% | Gemma 4 31B |
| GSO-Bench | Not measured | 3.6% | Only o4 Mini measured |
| WeirdML | 52.3% | 52.6% | o4 Mini |
| ALE-Bench | 925.5 | Not measured | Only Gemma 4 31B measured |
| LMArena Text: coding | 1459 | 1368 | Gemma 4 31B |
| LMArena Text: software and IT | 1463 | 1367 | Gemma 4 31B |
| LMArena WebDev: React | 1359 | Not measured | Only Gemma 4 31B measured |
| LMArena WebDev: HTML | 1380 | Not measured | Only Gemma 4 31B measured |
| SciCode | 8.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
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| AA Intelligence Index | 14.7 | 16.7 | o4 Mini |
| Epoch Capabilities Index | 143.0 | 145.5 | o4 Mini |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index10
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| AA Agentic Index | 4.2 | Not measured | Only Gemma 4 31B 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 |
| τ²-Bench Telecom | 65.5% | 55.6% | Gemma 4 31B |
| METR time horizons | Not measured | 63.9% | Only o4 Mini measured |
| Berkeley Function Calling Leaderboard (BFCL) | Not measured | 53.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
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| GPQA Diamond | Not measured | 74.5% | Only o4 Mini measured |
| LiveBench reasoning | 68.3% | Not measured | Only Gemma 4 31B measured |
| MMMU Pro (Vals AI) | Not measured | 79.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-AGI | Not measured | 58.7% | Only o4 Mini measured |
| ARC-AGI-2 | Not measured | 6.1% | Only o4 Mini measured |
| SimpleBench | Not measured | 38.7% | Only o4 Mini measured |
| Chess puzzles | Not measured | 22.0% | Only o4 Mini measured |
| Mystery game puzzles | Not measured | 5.0% | Only o4 Mini measured |
| VPCT | Not measured | 57.5% | Only o4 Mini measured |
| LMArena Text: hard prompts | 1448 | 1351 | Gemma 4 31B |
| LMArena Text: expert | 1464 | 1343 | Gemma 4 31B |
| LMArena Text: hard prompts in English | 1456 | 1366 | Gemma 4 31B |
| LMArena Vision: diagrams | 1283 | 1197 | Gemma 4 31B |
| LMArena Vision: homework | 1310 | 1234 | Gemma 4 31B |
| Kagi LLM Benchmark | 63.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
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| AIME | Not measured | 83.7% | Only o4 Mini measured |
| MATH 500 (Vals AI) | Not measured | 94.2% | Only o4 Mini measured |
| MGSM (Vals AI) | Not measured | 93.4% | Only o4 Mini measured |
| AA Math Index | Not measured | 90.7 | Only o4 Mini measured |
| AIME 2025 (Artificial Analysis run) | Not measured | 90.7% | Only o4 Mini measured |
| OTIS Mock AIME | 73.3% | 81.7% | o4 Mini |
| FrontierMath, tiers 1 to 3 | Not measured | 36.1% | Only o4 Mini measured |
| FrontierMath, tier 4 | Not measured | 4.9% | Only o4 Mini measured |
| MATH level 5 | Not measured | 97.8% | Only o4 Mini measured |
| LMArena Text: math | 1463 | 1389 | Gemma 4 31B |
| LMArena Text: mathematical work | 1465 | 1379 | Gemma 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
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| MMLU Pro | Not measured | 80.6% | Only o4 Mini measured |
| LegalBench (Vals AI) | Not measured | 79.2% | Only o4 Mini measured |
| CaseLaw (Vals AI) | 52.6% | Not measured | Only Gemma 4 31B measured |
| CorpFin (Vals AI) | Not measured | 59.0% | Only o4 Mini measured |
| TaxEval (Vals AI) | Not measured | 74.8% | Only o4 Mini measured |
| MortgageTax (Vals AI) | 61.4% | 64.8% | o4 Mini |
| MedQA (Vals AI) | Not measured | 96.0% | Only o4 Mini measured |
| MedCode (Vals AI) | Not measured | 33.8% | Only o4 Mini measured |
| MMLU Pro (Artificial Analysis run) | Not measured | 83.2% | Only o4 Mini measured |
| SimpleQA Verified | 10.4% | 19.6% | o4 Mini |
| GeoBench | Not measured | 64.0% | Only o4 Mini measured |
| LMArena Text: science | 1457 | 1354 | Gemma 4 31B |
| LMArena Text: medicine and healthcare | 1451 | 1361 | Gemma 4 31B |
| LMArena Text: legal and government | 1438 | 1350 | Gemma 4 31B |
| LMArena Text: business and finance | 1430 | 1325 | Gemma 4 31B |
| FACTS Benchmark Suite | 45.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
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| Design Arena: websites | Not measured | 985 | Only o4 Mini measured |
| Design Arena: UI components | Not measured | 983 | Only o4 Mini measured |
| Design Arena: game dev | Not measured | 1003 | Only o4 Mini measured |
| Design Arena: data viz | Not measured | 991 | Only o4 Mini measured |
| Design Arena: 3D | Not measured | 854 | Only o4 Mini measured |
| Design Arena: all code categories | Not measured | 976 | Only o4 Mini measured |
| LiveBench design | 58.4% | Not measured | Only 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
| Benchmark | Gemma 4 31B | o4 Mini | Leader |
|---|---|---|---|
| LiveBench data analysis | 53.3% | Not measured | Only Gemma 4 31B measured |
| SAGE (Vals AI) | 55.0% | 41.1% | Gemma 4 31B |
| MedScribe (Vals AI) | Not measured | 69.1% | Only o4 Mini measured |
| IFBench | 75.6% | 68.7% | Gemma 4 31B |
| Long context reasoning (AA-LCR) | 69.7% | 61.0% | Gemma 4 31B |
| DTBench | 82.7% | 77.6% | Gemma 4 31B |
| LMCA | 39.3% | 26.5% | Gemma 4 31B |
| Fiction.LiveBench | Not measured | 77.8% | Only o4 Mini measured |
| Creative writing (Lech Mazur) | Not measured | 75.0% | Only o4 Mini measured |
| Surface Evolver Bench | 30.6% | Not measured | Only Gemma 4 31B measured |
| LMArena Text | 1443 | 1353 | Gemma 4 31B |
| LMArena Text: instruction following | 1433 | 1320 | Gemma 4 31B |
| LMArena Text: creative writing | 1417 | 1294 | Gemma 4 31B |
| LMArena Vision | 1276 | 1194 | Gemma 4 31B |
| LMArena Text: English | 1451 | 1367 | Gemma 4 31B |
| LMArena Text: non-English | 1430 | 1337 | Gemma 4 31B |
| LMArena Text: Chinese | 1475 | 1354 | Gemma 4 31B |
| LMArena Text: German | Not measured | 1336 | Only o4 Mini measured |
| LMArena Text: Japanese | Not measured | 1308 | Only o4 Mini measured |
| LMArena Text: Korean | Not measured | 1312 | Only o4 Mini measured |
| LMArena Text: French | 1436 | 1364 | Gemma 4 31B |
| LMArena Text: Spanish | 1442 | 1346 | Gemma 4 31B |
| LMArena Text: Russian | 1460 | 1334 | Gemma 4 31B |
| LMArena Text: Polish | 1433 | 1358 | Gemma 4 31B |
| LMArena Text: multi-turn | 1452 | 1350 | Gemma 4 31B |
| LMArena Text: longer queries | 1446 | 1315 | Gemma 4 31B |
| LMArena Text: writing and language | 1432 | 1316 | Gemma 4 31B |
| LMArena Text: entertainment and media | 1405 | 1308 | Gemma 4 31B |
| LMArena Vision: English | 1271 | 1200 | Gemma 4 31B |
| LMArena Vision: Chinese | 1326 | 1218 | Gemma 4 31B |
| LMArena Vision: reading text | 1282 | 1197 | Gemma 4 31B |
| LMArena Vision: humor | 1280 | 1199 | Gemma 4 31B |
| LMArena Vision: captioning | 1218 | 1204 | Gemma 4 31B |
| LMArena Vision: recognizing things | 1226 | 1218 | Gemma 4 31B |
| LMArena Vision: creative writing | 1285 | 1166 | 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 | o4 Mini | 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 | OpenAI o4 Mini |
|---|---|---|
| Maker | OpenAI | |
| Weights | Open weights | No public weights listed |
| Released | April 2, 2026 | April 16, 2025 |
| Context window | 262K | 200K |
| Input $/Mtok | $0.14 | $1.10 |
| Output $/Mtok | $0.40 | $4.40 |
| Coding index | 39.0 | Not benchmarked |
| Independent measurements behind it | 2 | 0 |
| Cost per solved task | Not computable | Not computable |
| Source | OpenRouter listing | OpenRouter 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.