Gemini 2.5 Flash vs Gemma 4 31B
Updated October 21, 2026. 46 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.7 for Gemini 2.5 Flash.
Pick Gemini 2.5 Flash when the context window is larger, 1.05M against 262K tokens, or when what matters is AA Intelligence Index or LMArena Vision: captioning, where it leads.
- Shared results
- 46
- Gemini 2.5 Flash only
- 23
- Gemma 4 31B only
- 22
- 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.7.
1 and 2 benchmarks behind the scores
Intelligence
AA Intelligence Index
Gemini 2.5 Flash
Gemini 2.5 Flash leads, 15.5 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
Web design
Design Arena: websites
No call
Only Gemini 2.5 Flash has a Design Arena: websites result, 1074.
Directional only
Long documents
Listed context window
Gemini 2.5 Flash
Gemini 2.5 Flash takes 1.05M tokens against 262K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Gemma 4 31B
Gemini 2.5 Flash $0.0015, Gemma 4 31B $0.0004 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only Gemini 2.5 Flash has the number, $0.466.
Directional only
At a glance
- Coding index
- Gemini 2.5 Flash 28.7 from 1 benchmark, Gemma 4 31B 38.3 from 2 benchmarks.
- Widest category
- Agentic work, 33.9 points apart on average over 1 shared benchmark.
- Widest single gap
- τ²-Bench Telecom: Gemini 2.5 Flash 31.6% against Gemma 4 31B 65.5%, 33.9 points apart on a 0 to 100 scale.
- Output price
- Gemini 2.5 Flash $2.50 against Gemma 4 31B $0.40 per million output tokens, 6.3x apart.
- Context window
- Gemini 2.5 Flash takes 1.05M tokens, Gemma 4 31B 262K.
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 | Gemini 2.5 Flash | Bars | Gemma 4 31B | Ties |
|---|---|---|---|---|
| Coding | 0 | 3 | ||
| Intelligence | 1 | 1 | ||
| Agentic work | 0 | 1 | ||
| Reasoning | 0 | 7 | ||
| Math | 0 | 2 | ||
| Knowledge | 0 | 4 | ||
| General | 2 | 25 | ||
| All shared boards | 3 | 43 |
CodingLike-for-likeFour of these boards feed the Vibe Coding Index03
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| SWE-bench Verified | 28.7% | Not measured | Only Gemini 2.5 Flash measured |
| LiveBench coding | Not measured | 49.0% | Only Gemma 4 31B measured |
| LMArena WebDev | Not measured | 1367 | Only Gemma 4 31B measured |
| AA Coding Index | Not measured | 43.4 | Only Gemma 4 31B measured |
| LiveCodeBench (Artificial Analysis run) | 69.5% | Not measured | Only Gemini 2.5 Flash measured |
| SciCode | Not measured | 45.5% | Only Gemma 4 31B measured |
| Terminal-Bench Hard (Artificial Analysis run) | 13.6% | 36.4% | Gemma 4 31B |
| Terminal-Bench | 17.1% | Not measured | Only Gemini 2.5 Flash measured |
| WeirdML | Not measured | 52.3% | Only Gemma 4 31B measured |
| ALE-Bench | Not measured | 925.5 | Only Gemma 4 31B measured |
| LMArena Text: coding | 1423 | 1459 | Gemma 4 31B |
| LMArena Text: software and IT | 1425 | 1463 | Gemma 4 31B |
| LMArena WebDev: React | Not measured | 1359 | Only Gemma 4 31B measured |
| LMArena WebDev: HTML | Not measured | 1380 | Only Gemma 4 31B measured |
| Neither model has a result on the other 24 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index11
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Intelligence Index | 15.5 | 14.7 | Gemini 2.5 Flash |
| Epoch Capabilities Index | 142.9 | 143.0 | Gemma 4 31B |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index01
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Agentic Index | Not measured | 4.2 | Only Gemma 4 31B measured |
| LiveBench research | Not measured | 44.4% | Only Gemma 4 31B measured |
| LiveBench browser | Not measured | 4.0% | Only Gemma 4 31B measured |
| LiveBench long agentic | Not measured | 13.3% | Only Gemma 4 31B measured |
| τ²-Bench Telecom | 31.6% | 65.5% | Gemma 4 31B |
| BALROG | 33.5% | Not measured | Only Gemini 2.5 Flash measured |
| Vending-Bench 2 | $549 | Not measured | Only Gemini 2.5 Flash measured |
| Neither model has a result on the other 32 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index07
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| LiveBench reasoning | Not measured | 68.3% | Only Gemma 4 31B measured |
| GPQA Diamond (Artificial Analysis run) | 79.0% | 85.7% | Gemma 4 31B |
| Humanity's Last Exam (Artificial Analysis run) | 12.1% | 23.6% | Gemma 4 31B |
| GPQA Diamond (Epoch AI run) | Not measured | 75.8% | Only Gemma 4 31B measured |
| ARC-AGI | 33.3% | Not measured | Only Gemini 2.5 Flash measured |
| ARC-AGI-2 | 2.5% | Not measured | Only Gemini 2.5 Flash measured |
| SimpleBench | 41.2% | Not measured | Only Gemini 2.5 Flash measured |
| LMArena Text: hard prompts | 1422 | 1448 | Gemma 4 31B |
| LMArena Text: expert | 1426 | 1464 | Gemma 4 31B |
| LMArena Text: hard prompts in English | 1420 | 1456 | Gemma 4 31B |
| LMArena Vision: diagrams | 1245 | 1283 | Gemma 4 31B |
| LMArena Vision: homework | 1244 | 1310 | Gemma 4 31B |
| Neither model has a result on the other 9 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Math Index | 73.3 | Not measured | Only Gemini 2.5 Flash measured |
| AIME 2025 (Artificial Analysis run) | 73.3% | Not measured | Only Gemini 2.5 Flash measured |
| OTIS Mock AIME | Not measured | 73.3% | Only Gemma 4 31B measured |
| LMArena Text: math | 1411 | 1463 | Gemma 4 31B |
| LMArena Text: mathematical work | 1422 | 1465 | Gemma 4 31B |
| Neither model has a result on the other 8 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index04
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| CaseLaw (Vals AI) | Not measured | 52.6% | Only Gemma 4 31B measured |
| MortgageTax (Vals AI) | Not measured | 61.4% | Only Gemma 4 31B measured |
| MedCode (Vals AI) | 40.4% | Not measured | Only Gemini 2.5 Flash measured |
| MMLU Pro (Artificial Analysis run) | 83.2% | Not measured | Only Gemini 2.5 Flash measured |
| SimpleQA Verified | Not measured | 10.4% | Only Gemma 4 31B measured |
| LMArena Text: science | 1433 | 1457 | Gemma 4 31B |
| LMArena Text: medicine and healthcare | 1428 | 1451 | Gemma 4 31B |
| LMArena Text: legal and government | 1430 | 1438 | Gemma 4 31B |
| LMArena Text: business and finance | 1404 | 1430 | Gemma 4 31B |
| Neither model has a result on the other 8 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index8 boards, none shared
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| Design Arena: websites | 1074 | Not measured | Only Gemini 2.5 Flash measured |
| Design Arena: UI components | 1005 | Not measured | Only Gemini 2.5 Flash measured |
| Design Arena: game dev | 1005 | Not measured | Only Gemini 2.5 Flash measured |
| Design Arena: data viz | 1060 | Not measured | Only Gemini 2.5 Flash measured |
| Design Arena: 3D | 1021 | Not measured | Only Gemini 2.5 Flash measured |
| Design Arena: all code categories | 1059 | Not measured | Only Gemini 2.5 Flash measured |
| Design Arena: SVG | 1018 | Not measured | Only Gemini 2.5 Flash measured |
| LiveBench design | Not measured | 58.4% | Only Gemma 4 31B measured |
| Neither model has a result on the other 1 board here | |||
GeneralLike-for-likePublic boards, shown as published, kept out of the index225
| Benchmark | Gemini 2.5 Flash | Gemma 4 31B | Leader |
|---|---|---|---|
| LiveBench data analysis | Not measured | 53.3% | Only Gemma 4 31B measured |
| SAGE (Vals AI) | 44.8% | 55.0% | Gemma 4 31B |
| MedScribe (Vals AI) | 83.0% | Not measured | Only Gemini 2.5 Flash measured |
| IFBench | 50.3% | 75.6% | Gemma 4 31B |
| Long context reasoning (AA-LCR) | 65.3% | 69.7% | Gemma 4 31B |
| DTBench | 76.5% | 82.7% | Gemma 4 31B |
| LMCA | 27.5% | 39.3% | Gemma 4 31B |
| Surface Evolver Bench | Not measured | 30.6% | Only Gemma 4 31B measured |
| LMArena Text | 1417 | 1443 | Gemma 4 31B |
| LMArena Text: instruction following | 1405 | 1433 | Gemma 4 31B |
| LMArena Text: creative writing | 1400 | 1417 | Gemma 4 31B |
| LMArena Vision | 1235 | 1276 | Gemma 4 31B |
| LMArena Text: English | 1418 | 1451 | Gemma 4 31B |
| LMArena Text: non-English | 1409 | 1430 | Gemma 4 31B |
| LMArena Text: Chinese | 1449 | 1475 | Gemma 4 31B |
| LMArena Text: German | 1417 | Not measured | Only Gemini 2.5 Flash measured |
| LMArena Text: Japanese | 1396 | Not measured | Only Gemini 2.5 Flash measured |
| LMArena Text: Korean | 1385 | Not measured | Only Gemini 2.5 Flash measured |
| LMArena Text: French | 1432 | 1436 | Gemma 4 31B |
| LMArena Text: Spanish | 1422 | 1442 | Gemma 4 31B |
| LMArena Text: Russian | 1415 | 1460 | Gemma 4 31B |
| LMArena Text: Polish | 1413 | 1433 | Gemma 4 31B |
| LMArena Text: multi-turn | 1408 | 1452 | Gemma 4 31B |
| LMArena Text: longer queries | 1419 | 1446 | Gemma 4 31B |
| LMArena Text: writing and language | 1405 | 1432 | Gemma 4 31B |
| LMArena Text: entertainment and media | 1393 | 1405 | Gemma 4 31B |
| LMArena Vision: English | 1239 | 1271 | Gemma 4 31B |
| LMArena Vision: Chinese | 1284 | 1326 | Gemma 4 31B |
| LMArena Vision: reading text | 1237 | 1282 | Gemma 4 31B |
| LMArena Vision: humor | 1225 | 1280 | Gemma 4 31B |
| LMArena Vision: captioning | 1277 | 1218 | Gemini 2.5 Flash |
| LMArena Vision: recognizing things | 1252 | 1226 | Gemini 2.5 Flash |
| LMArena Vision: creative writing | 1241 | 1285 | Gemma 4 31B |
| LMArena Document | Not measured | 1425 | 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 | Gemini 2.5 Flash | Gemma 4 31B | 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 Gemini 2.5 Flash | Google Gemma 4 31B |
|---|---|---|
| Maker | ||
| Weights | No public weights listed | Open weights |
| Released | June 17, 2025 | April 2, 2026 |
| Context window | 1.05M | 262K |
| Input $/Mtok | $0.30 | $0.20 |
| Output $/Mtok | $2.50 | $0.40 |
| Coding index | 28.7 | 38.3 |
| Independent measurements behind it | 1 | 2 |
| Cost per solved task | $0.466 | Not computable |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Gemini 2.5 Flash better than Gemma 4 31B for coding?
Pick Gemma 4 31B for coding: it scores 38.3 on the Vibe Coding Index against 28.7 for Gemini 2.5 Flash. Pick Gemini 2.5 Flash when the context window is larger, 1.05M against 262K tokens, or when what matters is AA Intelligence Index or LMArena Vision: captioning, where it leads.
Which is cheaper, Gemini 2.5 Flash or Gemma 4 31B?
Gemini 2.5 Flash costs $0.30 per million input tokens and $2.50 per million output tokens; Gemma 4 31B costs $0.20 and $0.40. Cost per solved task is known for Gemini 2.5 Flash only.
Which has the bigger context window, Gemini 2.5 Flash or Gemma 4 31B?
Gemini 2.5 Flash, with 1.05M tokens against 262K.
How many benchmarks is the Gemini 2.5 Flash vs Gemma 4 31B comparison based on?
46 benchmarks have a result for both models as of October 21, 2026. Gemini 2.5 Flash's coding index rests on 1 independent benchmark and Gemma 4 31B's on 2. Where only one model has a result, the page says so instead of naming a winner.