Claude Haiku 4.5 vs Gemma 4 31B
Gemma 4 31B leads Claude Haiku 4.5 on coding, 39.0 to 35.6 on the Vibe Coding Index, and Gemma 4 31B costs 12.5x less per output token ($0.40 vs $5.00 per million). Updated October 22, 2026; 49 benchmarks have a result for both.
Claude Haiku 4.5 or Gemma 4 31B: which to pick
Pick Gemma 4 31B for coding: it scores 39.0 on the Vibe Coding Index against 35.6 for Claude Haiku 4.5, though on 2 benchmarks against 4.
Pick Claude Haiku 4.5 for work measured by AA Coding Index or AA Intelligence Index, where it leads.
- Shared results
- 49
- Claude Haiku 4.5 only
- 46
- Gemma 4 31B only
- 22
- Like-for-like categories
- 8 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 35.6.
4 and 2 benchmarks behind the scores
Intelligence
AA Intelligence Index
Claude Haiku 4.5
Claude Haiku 4.5 leads, 16.9 against 14.7.
Same board, both measured
Agentic work
AA Agentic Index
Claude Haiku 4.5
Claude Haiku 4.5 leads, 8.0 against 4.2.
Same board, both measured
Reasoning
GPQA Diamond
No call
Only Claude Haiku 4.5 has a GPQA Diamond result, 72.2%.
Directional only
Math
AIME
No call
Only Claude Haiku 4.5 has a AIME result, 82.7%.
Directional only
Knowledge
MMLU Pro
No call
Only Claude Haiku 4.5 has a MMLU Pro result, 78.7%.
Directional only
Web design
Design Arena: websites
No call
Only Claude Haiku 4.5 has a Design Arena: websites result, 1122.
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
Claude Haiku 4.5 $0.0035, Gemma 4 31B $0.0003 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only Claude Haiku 4.5 has the number, $0.56.
Directional only
At a glance
- Coding index
- Claude Haiku 4.5 35.6 from 4 benchmarks, Gemma 4 31B 39.0 from 2 benchmarks.
- Widest category
- Agentic work, 11.0 points apart on average over 4 shared benchmarks.
- Widest single gap
- LiveBench browser: Claude Haiku 4.5 40.0% against Gemma 4 31B 4.0%, 36.0 points apart on a 0 to 100 scale.
- Output price
- Claude Haiku 4.5 $5.00 against Gemma 4 31B $0.40 per million output tokens, 12.5x apart.
- Context window
- Claude Haiku 4.5 takes 200K 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 | Claude Haiku 4.5 | Bars | Gemma 4 31B | Ties |
|---|---|---|---|---|
| Coding | 1 | 7 | ||
| Intelligence | 1 | 1 | ||
| Agentic work | 2 | 2 | ||
| Reasoning | 0 | 5 | ||
| Math | 0 | 3 | ||
| Knowledge | 3 | 4 | ||
| Web design | 1 | 0 | ||
| General | 1 | 18 | ||
| All shared boards | 9 | 40 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index17
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| SWE-bench Verified | 66.6% | Not measured | Only Claude Haiku 4.5 measured |
| SWE-bench Multilingual | 64.7% | Not measured | Only Claude Haiku 4.5 measured |
| LiveBench coding | 48.1% | 49.0% | Gemma 4 31B |
| LMArena WebDev | 1330 | 1367 | Gemma 4 31B |
| AA Coding Index | 43.9 | 43.4 | Claude Haiku 4.5 |
| LiveCodeBench (Vals AI) | 41.2% | Not measured | Only Claude Haiku 4.5 measured |
| SWE-bench Verified (Vals AI) | 66.6% | Not measured | Only Claude Haiku 4.5 measured |
| Vibe Code Bench (Vals AI) | 11.4% | Not measured | Only Claude Haiku 4.5 measured |
| Code migration (Vals AI) | 7.5% | Not measured | Only Claude Haiku 4.5 measured |
| ProgramBench (Vals AI) | 0.0% | Not measured | Only Claude Haiku 4.5 measured |
| Terminal-Bench 2.1 (Vals AI) | 43.8% | Not measured | Only Claude Haiku 4.5 measured |
| SciCode | Not measured | 45.5% | Only Gemma 4 31B measured |
| Terminal-Bench Hard (Artificial Analysis run) | Not measured | 36.4% | Only Gemma 4 31B measured |
| Terminal-Bench | 35.5% | Not measured | Only Claude Haiku 4.5 measured |
| WeirdML | 45.4% | 52.3% | Gemma 4 31B |
| ALE-Bench | Not measured | 925.5 | Only Gemma 4 31B measured |
| LMArena Text: coding | 1454 | 1459 | Gemma 4 31B |
| LMArena Text: software and IT | 1439 | 1463 | Gemma 4 31B |
| LMArena WebDev: React | 1326 | 1359 | Gemma 4 31B |
| LMArena WebDev: HTML | 1318 | 1380 | Gemma 4 31B |
| SciCode | Not measured | 8.9% | Only Gemma 4 31B measured |
| Neither model has a result on the other 18 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index11
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Intelligence Index | 16.9 | 14.7 | Claude Haiku 4.5 |
| Epoch Capabilities Index | 142.2 | 143.0 | Gemma 4 31B |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index22
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Agentic Index | 8.0 | 4.2 | Claude Haiku 4.5 |
| LiveBench research | 42.2% | 44.4% | Gemma 4 31B |
| LiveBench browser | 40.0% | 4.0% | Claude Haiku 4.5 |
| LiveBench long agentic | 11.1% | 13.3% | Gemma 4 31B |
| Finance Agent (Vals AI) | 31.0% | Not measured | Only Claude Haiku 4.5 measured |
| Tax Agent Bench (Vals AI) | 5.9% | Not measured | Only Claude Haiku 4.5 measured |
| Legal Research Bench (Vals AI) | 10.6% | Not measured | Only Claude Haiku 4.5 measured |
| Excel Modeling Benchmark (Vals AI) | 22.7% | Not measured | Only Claude Haiku 4.5 measured |
| τ²-Bench Telecom | Not measured | 65.5% | Only Gemma 4 31B measured |
| BALROG | 31.2% | Not measured | Only Claude Haiku 4.5 measured |
| DeepResearch Bench | 45.5% | Not measured | Only Claude Haiku 4.5 measured |
| Vending-Bench 2 | $459 | Not measured | Only Claude Haiku 4.5 measured |
| Berkeley Function Calling Leaderboard (BFCL) | 68.7% | Not measured | Only Claude Haiku 4.5 measured |
| Neither model has a result on the other 28 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index05
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| GPQA Diamond | 72.2% | Not measured | Only Claude Haiku 4.5 measured |
| LiveBench reasoning | 61.7% | 68.3% | Gemma 4 31B |
| MMMU Pro (Vals AI) | 46.1% | Not measured | Only Claude Haiku 4.5 measured |
| GPQA Diamond (Artificial Analysis run) | Not measured | 85.7% | Only Gemma 4 31B measured |
| Humanity's Last Exam (Artificial Analysis run) | Not measured | 23.6% | Only Gemma 4 31B measured |
| GPQA Diamond (Epoch AI run) | 71.2% | 75.8% | Gemma 4 31B |
| ARC-AGI | 47.7% | Not measured | Only Claude Haiku 4.5 measured |
| ARC-AGI-2 | 4.0% | Not measured | Only Claude Haiku 4.5 measured |
| Chess puzzles | 8.0% | Not measured | Only Claude Haiku 4.5 measured |
| LMArena Text: hard prompts | 1421 | 1448 | Gemma 4 31B |
| LMArena Text: expert | 1443 | 1464 | Gemma 4 31B |
| LMArena Text: hard prompts in English | 1435 | 1456 | Gemma 4 31B |
| LMArena Vision: diagrams | Not measured | 1283 | Only Gemma 4 31B measured |
| LMArena Vision: homework | Not measured | 1310 | Only Gemma 4 31B measured |
| Kagi LLM Benchmark | Not measured | 63.5% | Only Gemma 4 31B measured |
| Neither model has a result on the other 7 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index03
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| AIME | 82.7% | Not measured | Only Claude Haiku 4.5 measured |
| MGSM (Vals AI) | 92.2% | Not measured | Only Claude Haiku 4.5 measured |
| OTIS Mock AIME | 66.7% | 73.3% | Gemma 4 31B |
| MATH level 5 | 96.4% | Not measured | Only Claude Haiku 4.5 measured |
| LMArena Text: math | 1398 | 1463 | Gemma 4 31B |
| LMArena Text: mathematical work | 1430 | 1465 | Gemma 4 31B |
| Neither model has a result on the other 7 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index34
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| MMLU Pro | 78.7% | Not measured | Only Claude Haiku 4.5 measured |
| LegalBench (Vals AI) | 81.2% | Not measured | Only Claude Haiku 4.5 measured |
| CaseLaw (Vals AI) | 56.5% | 52.6% | Claude Haiku 4.5 |
| CorpFin (Vals AI) | 60.6% | Not measured | Only Claude Haiku 4.5 measured |
| TaxEval (Vals AI) | 67.5% | Not measured | Only Claude Haiku 4.5 measured |
| MortgageTax (Vals AI) | 62.2% | 61.4% | Claude Haiku 4.5 |
| MedQA (Vals AI) | 79.6% | Not measured | Only Claude Haiku 4.5 measured |
| MedCode (Vals AI) | 32.7% | Not measured | Only Claude Haiku 4.5 measured |
| SimpleQA Verified | 13.2% | 10.4% | Claude Haiku 4.5 |
| LMArena Text: science | 1406 | 1457 | Gemma 4 31B |
| LMArena Text: medicine and healthcare | 1394 | 1451 | Gemma 4 31B |
| LMArena Text: legal and government | 1400 | 1438 | Gemma 4 31B |
| LMArena Text: business and finance | 1400 | 1430 | Gemma 4 31B |
| FACTS Benchmark Suite | Not measured | 45.3% | Only Gemma 4 31B measured |
| Neither model has a result on the other 4 boards here | |||
Web designLike-for-likePublic boards, shown as published, kept out of the index10
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| Design Arena: websites | 1122 | Not measured | Only Claude Haiku 4.5 measured |
| Design Arena: UI components | 1097 | Not measured | Only Claude Haiku 4.5 measured |
| Design Arena: game dev | 1097 | Not measured | Only Claude Haiku 4.5 measured |
| Design Arena: data viz | 1124 | Not measured | Only Claude Haiku 4.5 measured |
| Design Arena: 3D | 1071 | Not measured | Only Claude Haiku 4.5 measured |
| Design Arena: all code categories | 1114 | Not measured | Only Claude Haiku 4.5 measured |
| Design Arena: SVG | 1025 | Not measured | Only Claude Haiku 4.5 measured |
| Design Arena: ASCII art | 1140 | Not measured | Only Claude Haiku 4.5 measured |
| LiveBench design | 59.9% | 58.4% | Claude Haiku 4.5 |
GeneralLike-for-likePublic boards, shown as published, kept out of the index118
| Benchmark | Claude Haiku 4.5 | Gemma 4 31B | Leader |
|---|---|---|---|
| LiveBench data analysis | 59.3% | 53.3% | Claude Haiku 4.5 |
| Public Benefits Bench (Vals AI) | 54.3% | Not measured | Only Claude Haiku 4.5 measured |
| SAGE (Vals AI) | 31.8% | 55.0% | Gemma 4 31B |
| MedScribe (Vals AI) | 85.2% | Not measured | Only Claude Haiku 4.5 measured |
| Vals Multimodal Index | 42.9% | Not measured | Only Claude Haiku 4.5 measured |
| IFBench | Not measured | 75.6% | Only Gemma 4 31B measured |
| Long context reasoning (AA-LCR) | Not measured | 69.7% | Only Gemma 4 31B measured |
| DTBench | 73.6% | 82.7% | Gemma 4 31B |
| LMCA | 30.9% | 39.3% | Gemma 4 31B |
| Surface Evolver Bench | Not measured | 30.6% | Only Gemma 4 31B measured |
| ExploitBench | 13.7% | Not measured | Only Claude Haiku 4.5 measured |
| LMArena Text | 1397 | 1443 | Gemma 4 31B |
| LMArena Text: instruction following | 1414 | 1433 | Gemma 4 31B |
| LMArena Text: creative writing | 1371 | 1417 | Gemma 4 31B |
| LMArena Vision | Not measured | 1276 | Only Gemma 4 31B measured |
| LMArena Text: English | 1414 | 1451 | Gemma 4 31B |
| LMArena Text: non-English | 1377 | 1430 | Gemma 4 31B |
| LMArena Text: Chinese | 1418 | 1475 | Gemma 4 31B |
| LMArena Text: German | 1374 | Not measured | Only Claude Haiku 4.5 measured |
| LMArena Text: Japanese | 1338 | Not measured | Only Claude Haiku 4.5 measured |
| LMArena Text: Korean | 1346 | Not measured | Only Claude Haiku 4.5 measured |
| LMArena Text: French | 1411 | 1436 | Gemma 4 31B |
| LMArena Text: Spanish | 1421 | 1442 | Gemma 4 31B |
| LMArena Text: Russian | 1381 | 1460 | Gemma 4 31B |
| LMArena Text: Polish | 1343 | 1433 | Gemma 4 31B |
| LMArena Text: multi-turn | 1409 | 1452 | Gemma 4 31B |
| LMArena Text: longer queries | 1427 | 1446 | Gemma 4 31B |
| LMArena Text: writing and language | 1386 | 1432 | Gemma 4 31B |
| LMArena Text: entertainment and media | 1369 | 1405 | Gemma 4 31B |
| LMArena Vision: English | Not measured | 1271 | Only Gemma 4 31B measured |
| LMArena Vision: Chinese | Not measured | 1326 | Only Gemma 4 31B measured |
| LMArena Vision: reading text | Not measured | 1282 | Only Gemma 4 31B measured |
| LMArena Vision: humor | Not measured | 1280 | Only Gemma 4 31B measured |
| LMArena Vision: captioning | Not measured | 1218 | Only Gemma 4 31B measured |
| LMArena Vision: recognizing things | Not measured | 1226 | Only Gemma 4 31B measured |
| LMArena Vision: creative writing | Not measured | 1285 | Only Gemma 4 31B measured |
| LMArena Document | 1420 | 1425 | Gemma 4 31B |
| Neither model has a result on the other 9 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Claude Haiku 4.5 | 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 | Anthropic Claude Haiku 4.5 | Google Gemma 4 31B |
|---|---|---|
| Maker | Anthropic | |
| Weights | No public weights listed | Open weights |
| Released | October 15, 2025 | April 2, 2026 |
| Context window | 200K | 262K |
| Input $/Mtok | $1.00 | $0.14 |
| Output $/Mtok | $5.00 | $0.40 |
| Coding index | 35.6 | 39.0 |
| Independent measurements behind it | 4 | 2 |
| Cost per solved task | $0.56 | Not computable |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Claude Haiku 4.5 better than Gemma 4 31B for coding?
Pick Gemma 4 31B for coding: it scores 39.0 on the Vibe Coding Index against 35.6 for Claude Haiku 4.5, though on 2 benchmarks against 4. Pick Claude Haiku 4.5 for work measured by AA Coding Index or AA Intelligence Index, where it leads.
Which is cheaper, Claude Haiku 4.5 or Gemma 4 31B?
Claude Haiku 4.5 costs $1.00 per million input tokens and $5.00 per million output tokens; Gemma 4 31B costs $0.14 and $0.40. Cost per solved task is known for Claude Haiku 4.5 only.
Which has the bigger context window, Claude Haiku 4.5 or Gemma 4 31B?
Gemma 4 31B, with 262K tokens against 200K.
How many benchmarks is the Claude Haiku 4.5 vs Gemma 4 31B comparison based on?
49 benchmarks have a result for both models as of October 22, 2026. Claude Haiku 4.5's coding index rests on 4 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.