Gemini 2.5 Pro vs Gemma 4 31B
Gemma 4 31B leads Gemini 2.5 Pro on coding, 39.0 to 19.1 on the Vibe Coding Index, and Gemma 4 31B costs 25.0x less per output token ($0.40 vs $10.00 per million). Updated October 22, 2026; 59 benchmarks have a result for both.
Gemini 2.5 Pro or Gemma 4 31B: which to pick
Pick Gemma 4 31B for coding: it scores 39.0 on the Vibe Coding Index against 19.1 for Gemini 2.5 Pro, though on 2 benchmarks against 3.
Pick Gemini 2.5 Pro for a larger context window (1.05M against 262K tokens) and work measured by SciCode or WeirdML, where it leads.
- Shared results
- 59
- Gemini 2.5 Pro only
- 31
- Gemma 4 31B only
- 12
- 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
Gemma 4 31B
Gemma 4 31B scores 39.0 against 19.1.
3 and 2 benchmarks behind the scores
Intelligence
AA Intelligence Index
Gemini 2.5 Pro
Gemini 2.5 Pro leads, 16.1 against 14.7.
Same board, both measured
Agentic work
AA Agentic Index
Gemma 4 31B
Gemma 4 31B leads, 4.2 against 1.6.
Same board, both measured
Web design
Design Arena: websites
No call
Only Gemini 2.5 Pro has a Design Arena: websites result, 1167.
Directional only
Long documents
Listed context window
Gemini 2.5 Pro
Gemini 2.5 Pro takes 1.05M tokens against 262K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Gemma 4 31B
Gemini 2.5 Pro $0.0063, Gemma 4 31B $0.0003 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only Gemini 2.5 Pro has the number, $0.64.
Directional only
At a glance
- Coding index
- Gemini 2.5 Pro 19.1 from 3 benchmarks, Gemma 4 31B 39.0 from 2 benchmarks.
- Widest category
- Coding, 8.6 points apart on average over 8 shared benchmarks.
- Widest single gap
- IFBench: Gemini 2.5 Pro 48.7% against Gemma 4 31B 75.6%, 26.9 points apart on a 0 to 100 scale.
- Output price
- Gemini 2.5 Pro $10.00 against Gemma 4 31B $0.40 per million output tokens, 25.0x apart.
- Context window
- Gemini 2.5 Pro 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 Pro | Bars | Gemma 4 31B | Ties |
|---|---|---|---|---|
| Coding | 2 | 6 | ||
| Intelligence | 2 | 0 | ||
| Agentic work | 0 | 2 | ||
| Reasoning | 3 | 6 | ||
| Math | 1 | 2 | ||
| Knowledge | 7 | 0 | ||
| General | 16 | 12 | ||
| All shared boards | 31 | 28 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index26
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| SWE-bench Verified | 53.6% | Not measured | Only Gemini 2.5 Pro measured |
| LiveBench coding | Not measured | 49.0% | Only Gemma 4 31B measured |
| LMArena WebDev | 1226 | 1367 | Gemma 4 31B |
| AA Coding Index | 33.3 | 43.4 | Gemma 4 31B |
| SWE-bench Verified (Vals AI) | 54.4% | Not measured | Only Gemini 2.5 Pro measured |
| Vibe Code Bench (Vals AI) | 0.4% | Not measured | Only Gemini 2.5 Pro measured |
| LiveCodeBench (Artificial Analysis run) | 80.1% | Not measured | Only Gemini 2.5 Pro measured |
| SciCode | 46.3% | 45.5% | Gemini 2.5 Pro |
| Terminal-Bench Hard (Artificial Analysis run) | 26.5% | 36.4% | Gemma 4 31B |
| Terminal-Bench | 32.6% | Not measured | Only Gemini 2.5 Pro measured |
| GSO-Bench | 3.9% | Not measured | Only Gemini 2.5 Pro measured |
| WeirdML | 54.0% | 52.3% | Gemini 2.5 Pro |
| ALE-Bench | Not measured | 925.5 | Only Gemma 4 31B measured |
| LMArena Text: coding | 1452 | 1459 | Gemma 4 31B |
| LMArena Text: software and IT | 1459 | 1463 | Gemma 4 31B |
| LMArena WebDev: React | Not measured | 1359 | Only Gemma 4 31B measured |
| LMArena WebDev: HTML | 1235 | 1380 | Gemma 4 31B |
| LMArena WebDev: from an image | 1285 | Not measured | Only Gemini 2.5 Pro measured |
| SciCode | Not measured | 8.9% | Only Gemma 4 31B measured |
| Neither model has a result on the other 20 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index20
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Intelligence Index | 16.1 | 14.7 | Gemini 2.5 Pro |
| Epoch Capabilities Index | 145.1 | 143.0 | Gemini 2.5 Pro |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Agentic Index | 1.6 | 4.2 | Gemma 4 31B |
| 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 | 54.1% | 65.5% | Gemma 4 31B |
| GDPval | 23.3% | Not measured | Only Gemini 2.5 Pro measured |
| DeepResearch Bench | 41.5% | Not measured | Only Gemini 2.5 Pro measured |
| Vending-Bench 2 | $574 | Not measured | Only Gemini 2.5 Pro measured |
| BrowseComp-Plus | 29.5% | Not measured | Only Gemini 2.5 Pro measured |
| Neither model has a result on the other 32 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index36
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| LiveBench reasoning | Not measured | 68.3% | Only Gemma 4 31B measured |
| GPQA Diamond (Artificial Analysis run) | 84.4% | 85.7% | Gemma 4 31B |
| Humanity's Last Exam (Artificial Analysis run) | 22.5% | 23.6% | Gemma 4 31B |
| GPQA Diamond (Epoch AI run) | 85.3% | 75.8% | Gemini 2.5 Pro |
| ARC-AGI | 41.0% | Not measured | Only Gemini 2.5 Pro measured |
| ARC-AGI-2 | 4.9% | Not measured | Only Gemini 2.5 Pro measured |
| LMArena Text: hard prompts | 1455 | 1448 | Gemini 2.5 Pro |
| LMArena Text: expert | 1452 | 1464 | Gemma 4 31B |
| LMArena Text: hard prompts in English | 1453 | 1456 | Gemma 4 31B |
| LMArena Vision: diagrams | 1274 | 1283 | Gemma 4 31B |
| LMArena Vision: homework | 1281 | 1310 | Gemma 4 31B |
| Kagi LLM Benchmark | 70.3% | 63.5% | Gemini 2.5 Pro |
| Neither model has a result on the other 10 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index12
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Math Index | 87.7 | Not measured | Only Gemini 2.5 Pro measured |
| AIME 2025 (Artificial Analysis run) | 87.7% | Not measured | Only Gemini 2.5 Pro measured |
| OTIS Mock AIME | 84.7% | 73.3% | Gemini 2.5 Pro |
| FrontierMath, tiers 1 to 3 | 24.6% | Not measured | Only Gemini 2.5 Pro measured |
| FrontierMath, tier 4 | 0.0% | Not measured | Only Gemini 2.5 Pro measured |
| LMArena Text: math | 1450 | 1463 | Gemma 4 31B |
| LMArena Text: mathematical work | 1454 | 1465 | 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 index70
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| CaseLaw (Vals AI) | 63.9% | 52.6% | Gemini 2.5 Pro |
| CorpFin (Vals AI) | 60.8% | Not measured | Only Gemini 2.5 Pro measured |
| MortgageTax (Vals AI) | 68.9% | 61.4% | Gemini 2.5 Pro |
| MedCode (Vals AI) | 50.6% | Not measured | Only Gemini 2.5 Pro measured |
| MMLU Pro (Artificial Analysis run) | 86.2% | Not measured | Only Gemini 2.5 Pro measured |
| SimpleQA Verified | Not measured | 10.4% | Only Gemma 4 31B measured |
| LMArena Text: science | 1480 | 1457 | Gemini 2.5 Pro |
| LMArena Text: medicine and healthcare | 1476 | 1451 | Gemini 2.5 Pro |
| LMArena Text: legal and government | 1480 | 1438 | Gemini 2.5 Pro |
| LMArena Text: business and finance | 1439 | 1430 | Gemini 2.5 Pro |
| FACTS Benchmark Suite | 61.5% | 45.3% | Gemini 2.5 Pro |
| Neither model has a result on the other 7 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index7 boards, none shared
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| Design Arena: websites | 1167 | Not measured | Only Gemini 2.5 Pro measured |
| Design Arena: UI components | 1137 | Not measured | Only Gemini 2.5 Pro measured |
| Design Arena: game dev | 1111 | Not measured | Only Gemini 2.5 Pro measured |
| Design Arena: data viz | 1222 | Not measured | Only Gemini 2.5 Pro measured |
| Design Arena: 3D | 1080 | Not measured | Only Gemini 2.5 Pro measured |
| Design Arena: all code categories | 1152 | Not measured | Only Gemini 2.5 Pro measured |
| LiveBench design | Not measured | 58.4% | 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 index1612
| Benchmark | Gemini 2.5 Pro | Gemma 4 31B | Leader |
|---|---|---|---|
| LiveBench data analysis | Not measured | 53.3% | Only Gemma 4 31B measured |
| SAGE (Vals AI) | 41.9% | 55.0% | Gemma 4 31B |
| MedScribe (Vals AI) | 73.5% | Not measured | Only Gemini 2.5 Pro measured |
| IFBench | 48.7% | 75.6% | Gemma 4 31B |
| Long context reasoning (AA-LCR) | 69.0% | 69.7% | Gemma 4 31B |
| DTBench | 82.4% | 82.7% | Gemma 4 31B |
| LMCA | 34.8% | 39.3% | Gemma 4 31B |
| Creative writing (Lech Mazur) | 83.8% | Not measured | Only Gemini 2.5 Pro measured |
| Surface Evolver Bench | Not measured | 30.6% | Only Gemma 4 31B measured |
| LMArena Text | 1458 | 1443 | Gemini 2.5 Pro |
| LMArena Text: instruction following | 1437 | 1433 | Gemini 2.5 Pro |
| LMArena Text: creative writing | 1454 | 1417 | Gemini 2.5 Pro |
| LMArena Vision | 1263 | 1276 | Gemma 4 31B |
| LMArena Text: English | 1458 | 1451 | Gemini 2.5 Pro |
| LMArena Text: non-English | 1452 | 1430 | Gemini 2.5 Pro |
| LMArena Text: Chinese | 1507 | 1475 | Gemini 2.5 Pro |
| LMArena Text: German | 1487 | Not measured | Only Gemini 2.5 Pro measured |
| LMArena Text: Japanese | 1461 | Not measured | Only Gemini 2.5 Pro measured |
| LMArena Text: Korean | 1434 | Not measured | Only Gemini 2.5 Pro measured |
| LMArena Text: French | 1473 | 1436 | Gemini 2.5 Pro |
| LMArena Text: Spanish | 1474 | 1442 | Gemini 2.5 Pro |
| LMArena Text: Russian | 1461 | 1460 | Gemini 2.5 Pro |
| LMArena Text: Polish | 1479 | 1433 | Gemini 2.5 Pro |
| LMArena Text: multi-turn | 1453 | 1452 | Gemini 2.5 Pro |
| LMArena Text: longer queries | 1449 | 1446 | Gemini 2.5 Pro |
| LMArena Text: writing and language | 1454 | 1432 | Gemini 2.5 Pro |
| LMArena Text: entertainment and media | 1441 | 1405 | Gemini 2.5 Pro |
| LMArena Vision: English | 1261 | 1271 | Gemma 4 31B |
| LMArena Vision: Chinese | 1300 | 1326 | Gemma 4 31B |
| LMArena Vision: reading text | 1270 | 1282 | Gemma 4 31B |
| LMArena Vision: humor | 1262 | 1280 | Gemma 4 31B |
| LMArena Vision: captioning | 1304 | 1218 | Gemini 2.5 Pro |
| LMArena Vision: recognizing things | 1283 | 1226 | Gemini 2.5 Pro |
| LMArena Vision: creative writing | 1265 | 1285 | Gemma 4 31B |
| LMArena Document | 1421 | 1425 | Gemma 4 31B |
| Neither model has a result on the other 11 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Gemini 2.5 Pro | 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 Pro | 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 | $1.25 | $0.14 |
| Output $/Mtok | $10.00 | $0.40 |
| Coding index | 19.1 | 39.0 |
| Independent measurements behind it | 3 | 2 |
| Cost per solved task | $0.64 | Not computable |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Gemini 2.5 Pro better than Gemma 4 31B for coding?
Pick Gemma 4 31B for coding: it scores 39.0 on the Vibe Coding Index against 19.1 for Gemini 2.5 Pro, though on 2 benchmarks against 3. Pick Gemini 2.5 Pro for a larger context window (1.05M against 262K tokens) and work measured by SciCode or WeirdML, where it leads.
Which is cheaper, Gemini 2.5 Pro or Gemma 4 31B?
Gemini 2.5 Pro costs $1.25 per million input tokens and $10.00 per million output tokens; Gemma 4 31B costs $0.14 and $0.40. Cost per solved task is known for Gemini 2.5 Pro only.
Which has the bigger context window, Gemini 2.5 Pro or Gemma 4 31B?
Gemini 2.5 Pro, with 1.05M tokens against 262K.
How many benchmarks is the Gemini 2.5 Pro vs Gemma 4 31B comparison based on?
59 benchmarks have a result for both models as of October 22, 2026. Gemini 2.5 Pro's coding index rests on 3 independent benchmarks and Gemma 4 31B's on 2. Where only one model has a result, the page says so instead of naming a winner.