Gemma 4 31B vs GPT-5.4 Mini
Updated October 21, 2026. 58 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.
Decision reading
Pick Gemma 4 31B for coding: it scores 38.3 on the Vibe Coding Index against 28.2 for GPT-5.4 Mini.
Pick GPT-5.4 Mini when the context window is larger, 400K against 262K tokens, or when what matters is LMArena WebDev or AA Coding Index, where it leads.
- Shared results
- 58
- Gemma 4 31B only
- 10
- GPT-5.4 Mini only
- 30
- Like-for-like categories
- 7 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.
Coding
Vibe Coding Index, four public coding benchmarks
Gemma 4 31B
Gemma 4 31B scores 38.3 against 28.2.
2 and 1 benchmarks behind the scores
Intelligence
AA Intelligence Index
GPT-5.4 Mini
GPT-5.4 Mini leads, 24.1 against 14.7.
Same board, both measured
Agentic work
AA Agentic Index
GPT-5.4 Mini
GPT-5.4 Mini leads, 17.9 against 4.2.
Same board, both measured
Reasoning
GPQA Diamond
No call
Only GPT-5.4 Mini has a GPQA Diamond result, 83.1%.
Directional only
Math
AIME
No call
Only GPT-5.4 Mini has a AIME result, 95.6%.
Directional only
Knowledge
MMLU Pro
No call
Only GPT-5.4 Mini has a MMLU Pro result, 84.5%.
Directional only
Long documents
Listed context window
GPT-5.4 Mini
GPT-5.4 Mini takes 400K tokens against 262K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Gemma 4 31B
Gemma 4 31B $0.0004, GPT-5.4 Mini $0.0030 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only GPT-5.4 Mini has the number, $0.70.
Directional only
At a glance
- Coding index
- Gemma 4 31B 38.3 from 2 benchmarks, GPT-5.4 Mini 28.2 from 1 benchmark.
- Widest category
- Agentic work, 15.8 points apart on average over 2 shared benchmarks.
- Widest single gap
- SimpleQA Verified: Gemma 4 31B 10.4% against GPT-5.4 Mini 29.4%, 19.0 points apart on a 0 to 100 scale.
- Output price
- Gemma 4 31B $0.40 against GPT-5.4 Mini $4.50 per million output tokens, 11.3x apart.
- Context window
- Gemma 4 31B takes 262K tokens, GPT-5.4 Mini 400K.
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 | GPT-5.4 Mini | Ties |
|---|---|---|---|---|
| Coding | 2 | 8 | ||
| Intelligence | 0 | 2 | ||
| Agentic work | 0 | 2 | ||
| Reasoning | 5 | 3 | ||
| Math | 2 | 1 | ||
| Knowledge | 5 | 2 | ||
| General | 23 | 3 | ||
| All shared boards | 37 | 21 |
CodingLike-for-likeFour of these boards feed the Vibe Coding Index28
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| LiveBench coding | 49.0% | Not measured | Only Gemma 4 31B measured |
| LMArena WebDev | 1367 | 1397 | GPT-5.4 Mini |
| AA Coding Index | 43.4 | 56.1 | GPT-5.4 Mini |
| LiveCodeBench (Vals AI) | Not measured | 81.5% | Only GPT-5.4 Mini measured |
| SWE-bench Verified (Vals AI) | Not measured | 73.0% | Only GPT-5.4 Mini measured |
| Terminal-Bench 4 (Vals AI) | Not measured | 2.5% | Only GPT-5.4 Mini measured |
| Vibe Code Bench (Vals AI) | Not measured | 48.0% | Only GPT-5.4 Mini measured |
| Code migration (Vals AI) | Not measured | 12.9% | Only GPT-5.4 Mini measured |
| ProgramBench (Vals AI) | Not measured | 0.0% | Only GPT-5.4 Mini measured |
| Terminal-Bench 2.1 (Vals AI) | Not measured | 54.7% | Only GPT-5.4 Mini measured |
| SciCode | 45.5% | 52.1% | GPT-5.4 Mini |
| Terminal-Bench Hard (Artificial Analysis run) | 36.4% | 52.3% | GPT-5.4 Mini |
| FrontierCode | Not measured | 27.0% | Only GPT-5.4 Mini measured |
| WeirdML | 52.3% | 60.3% | GPT-5.4 Mini |
| ALE-Bench | 925.5 | 1188.6 | GPT-5.4 Mini |
| LMArena Text: coding | 1459 | 1438 | Gemma 4 31B |
| LMArena Text: software and IT | 1463 | 1436 | Gemma 4 31B |
| LMArena WebDev: React | 1359 | 1386 | GPT-5.4 Mini |
| LMArena WebDev: HTML | 1380 | 1419 | GPT-5.4 Mini |
| Neither model has a result on the other 19 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| AA Intelligence Index | 14.7 | 24.1 | GPT-5.4 Mini |
| Epoch Capabilities Index | 143.0 | 148.7 | GPT-5.4 Mini |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| AA Agentic Index | 4.2 | 17.9 | GPT-5.4 Mini |
| 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 | 45.4% | Only GPT-5.4 Mini measured |
| Tax Agent Bench (Vals AI) | Not measured | 8.8% | Only GPT-5.4 Mini measured |
| Legal Research Bench (Vals AI) | Not measured | 12.5% | Only GPT-5.4 Mini measured |
| Excel Modeling Benchmark (Vals AI) | Not measured | 45.4% | Only GPT-5.4 Mini measured |
| τ²-Bench Telecom | 65.5% | 83.3% | GPT-5.4 Mini |
| DeepResearch Bench | Not measured | 36.3% | Only GPT-5.4 Mini measured |
| Neither model has a result on the other 29 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index53
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| GPQA Diamond | Not measured | 83.1% | Only GPT-5.4 Mini measured |
| LiveBench reasoning | 68.3% | Not measured | Only Gemma 4 31B measured |
| MMMU Pro (Vals AI) | Not measured | 79.3% | Only GPT-5.4 Mini measured |
| GPQA Diamond (Artificial Analysis run) | 85.7% | 87.5% | GPT-5.4 Mini |
| Humanity's Last Exam (Artificial Analysis run) | 23.6% | 28.1% | GPT-5.4 Mini |
| GPQA Diamond (Epoch AI run) | 75.8% | 86.9% | GPT-5.4 Mini |
| ARC-AGI | Not measured | 63.7% | Only GPT-5.4 Mini measured |
| ARC-AGI-2 | Not measured | 18.9% | Only GPT-5.4 Mini measured |
| Chess puzzles | Not measured | 23.0% | Only GPT-5.4 Mini measured |
| Mystery game puzzles | Not measured | 11.0% | Only GPT-5.4 Mini measured |
| LMArena Text: hard prompts | 1448 | 1424 | Gemma 4 31B |
| LMArena Text: expert | 1464 | 1435 | Gemma 4 31B |
| LMArena Text: hard prompts in English | 1456 | 1420 | Gemma 4 31B |
| LMArena Vision: diagrams | 1283 | 1266 | Gemma 4 31B |
| LMArena Vision: homework | 1310 | 1285 | Gemma 4 31B |
| Neither model has a result on the other 6 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index21
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| AIME | Not measured | 95.6% | Only GPT-5.4 Mini measured |
| OTIS Mock AIME | 73.3% | 88.9% | GPT-5.4 Mini |
| FrontierMath, tiers 1 to 3 | Not measured | 51.2% | Only GPT-5.4 Mini measured |
| FrontierMath, tier 4 | Not measured | 9.8% | Only GPT-5.4 Mini measured |
| ProofBench | Not measured | 21.0% | Only GPT-5.4 Mini measured |
| LMArena Text: math | 1463 | 1418 | Gemma 4 31B |
| LMArena Text: mathematical work | 1465 | 1429 | Gemma 4 31B |
| Neither model has a result on the other 6 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index52
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| MMLU Pro | Not measured | 84.5% | Only GPT-5.4 Mini measured |
| CaseLaw (Vals AI) | 52.6% | 51.7% | Gemma 4 31B |
| CorpFin (Vals AI) | Not measured | 60.9% | Only GPT-5.4 Mini measured |
| TaxEval (Vals AI) | Not measured | 71.2% | Only GPT-5.4 Mini measured |
| MortgageTax (Vals AI) | 61.4% | 63.5% | GPT-5.4 Mini |
| SimpleQA Verified | 10.4% | 29.4% | GPT-5.4 Mini |
| LMArena Text: science | 1457 | 1417 | Gemma 4 31B |
| LMArena Text: medicine and healthcare | 1451 | 1395 | Gemma 4 31B |
| LMArena Text: legal and government | 1438 | 1414 | Gemma 4 31B |
| LMArena Text: business and finance | 1430 | 1418 | Gemma 4 31B |
| Neither model has a result on the other 7 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index1 board, none shared
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| LiveBench design | 58.4% | Not measured | Only Gemma 4 31B measured |
| Neither model has a result on the other 8 boards here | |||
GeneralLike-for-likePublic boards, shown as published, kept out of the index233
| Benchmark | Gemma 4 31B | GPT-5.4 Mini | Leader |
|---|---|---|---|
| LiveBench data analysis | 53.3% | Not measured | Only Gemma 4 31B measured |
| SAGE (Vals AI) | 55.0% | 50.8% | Gemma 4 31B |
| Vals Multimodal Index | Not measured | 54.2% | Only GPT-5.4 Mini measured |
| IFBench | 75.6% | 73.3% | Gemma 4 31B |
| Long context reasoning (AA-LCR) | 69.7% | 77.0% | GPT-5.4 Mini |
| DTBench | 82.7% | 80.0% | Gemma 4 31B |
| LMCA | 39.3% | 40.8% | GPT-5.4 Mini |
| Surface Evolver Bench | 30.6% | Not measured | Only Gemma 4 31B measured |
| LMArena Text | 1443 | 1412 | Gemma 4 31B |
| LMArena Text: instruction following | 1433 | 1405 | Gemma 4 31B |
| LMArena Text: creative writing | 1417 | 1370 | Gemma 4 31B |
| LMArena Vision | 1276 | 1245 | Gemma 4 31B |
| LMArena Text: English | 1451 | 1412 | Gemma 4 31B |
| LMArena Text: non-English | 1430 | 1405 | Gemma 4 31B |
| LMArena Text: Chinese | 1475 | 1446 | Gemma 4 31B |
| LMArena Text: German | Not measured | 1408 | Only GPT-5.4 Mini measured |
| LMArena Text: Japanese | Not measured | 1375 | Only GPT-5.4 Mini measured |
| LMArena Text: Korean | Not measured | 1370 | Only GPT-5.4 Mini measured |
| LMArena Text: French | 1436 | 1441 | GPT-5.4 Mini |
| LMArena Text: Spanish | 1442 | 1405 | Gemma 4 31B |
| LMArena Text: Russian | 1460 | 1417 | Gemma 4 31B |
| LMArena Text: Polish | 1433 | 1415 | Gemma 4 31B |
| LMArena Text: multi-turn | 1452 | 1429 | Gemma 4 31B |
| LMArena Text: longer queries | 1446 | 1408 | Gemma 4 31B |
| LMArena Text: writing and language | 1432 | 1393 | Gemma 4 31B |
| LMArena Text: entertainment and media | 1405 | 1373 | Gemma 4 31B |
| LMArena Vision: English | 1271 | 1244 | Gemma 4 31B |
| LMArena Vision: Chinese | 1326 | 1286 | Gemma 4 31B |
| LMArena Vision: reading text | 1282 | 1253 | Gemma 4 31B |
| LMArena Vision: humor | 1280 | 1235 | Gemma 4 31B |
| LMArena Vision: captioning | 1218 | Not measured | Only Gemma 4 31B measured |
| LMArena Vision: recognizing things | 1226 | 1218 | Gemma 4 31B |
| LMArena Vision: creative writing | 1285 | 1222 | Gemma 4 31B |
| LMArena Document | 1425 | Not measured | Only Gemma 4 31B measured |
| Neither model has a result on the other 12 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Gemma 4 31B | GPT-5.4 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 GPT-5.4 Mini |
|---|---|---|
| Maker | OpenAI | |
| Weights | Open weights | No public weights listed |
| Released | April 2, 2026 | March 17, 2026 |
| Context window | 262K | 400K |
| Input $/Mtok | $0.20 | $0.75 |
| Output $/Mtok | $0.40 | $4.50 |
| Coding index | 38.3 | 28.2 |
| Independent measurements behind it | 2 | 1 |
| Cost per solved task | Not computable | $0.70 |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Gemma 4 31B better than GPT-5.4 Mini for coding?
Pick Gemma 4 31B for coding: it scores 38.3 on the Vibe Coding Index against 28.2 for GPT-5.4 Mini. Pick GPT-5.4 Mini when the context window is larger, 400K against 262K tokens, or when what matters is LMArena WebDev or AA Coding Index, where it leads.
Which is cheaper, Gemma 4 31B or GPT-5.4 Mini?
Gemma 4 31B costs $0.20 per million input tokens and $0.40 per million output tokens; GPT-5.4 Mini costs $0.75 and $4.50. Cost per solved task is known for GPT-5.4 Mini only.
Which has the bigger context window, Gemma 4 31B or GPT-5.4 Mini?
GPT-5.4 Mini, with 400K tokens against 262K.
How many benchmarks is the Gemma 4 31B vs GPT-5.4 Mini comparison based on?
58 benchmarks have a result for both models as of October 21, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and GPT-5.4 Mini's on 1. Where only one model has a result, the page says so instead of naming a winner.