Claude Opus 4.1 vs Gemma 4 31B
Claude Opus 4.1 leads Gemma 4 31B on the Artificial Analysis Intelligence Index, 22.8 to 14.7, and Gemma 4 31B costs 187.5x less per output token ($0.40 vs $75.00 per million). Updated October 22, 2026; 38 benchmarks have a result for both.
Claude Opus 4.1 or Gemma 4 31B: which to pick
Only Gemma 4 31B has a coding score, 39.0 on the Vibe Coding Index; Claude Opus 4.1 has none, so the two cannot be ranked on coding.
Pick Claude Opus 4.1 for work measured by LMArena WebDev or LMArena Text: coding, where it leads.
- Shared results
- 38
- Claude Opus 4.1 only
- 35
- Gemma 4 31B only
- 33
- Like-for-like categories
- 6 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
Claude Opus 4.1
Claude Opus 4.1 leads, 22.8 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 Claude Opus 4.1 has a GPQA Diamond result, 76.3%.
Directional only
Math
AIME
No call
Only Claude Opus 4.1 has a AIME result, 78.2%.
Directional only
Knowledge
MMLU Pro
No call
Only Claude Opus 4.1 has a MMLU Pro result, 87.9%.
Directional only
Web design
Design Arena: websites
No call
Only Claude Opus 4.1 has a Design Arena: websites result, 1176.
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 Opus 4.1 $0.052, Gemma 4 31B $0.0003 per turn.
List prices
At a glance
- Coding index
- Claude Opus 4.1 not benchmarked, Gemma 4 31B 39.0 from 2 benchmarks.
- Widest category
- Math, 5.0 points apart on average over 3 shared benchmarks.
- Widest single gap
- SAGE (Vals AI): Claude Opus 4.1 31.4% against Gemma 4 31B 55.0%, 23.7 points apart on a 0 to 100 scale.
- Output price
- Claude Opus 4.1 $75.00 against Gemma 4 31B $0.40 per million output tokens, 187.5x apart.
- Context window
- Claude Opus 4.1 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 Opus 4.1 | Bars | Gemma 4 31B | Ties |
|---|---|---|---|---|
| Coding | 3 | 3 | ||
| Intelligence | 2 | 0 | ||
| Reasoning | 1 | 3 | ||
| Math | 0 | 3 | ||
| Knowledge | 0 | 6 | ||
| General | 3 | 14 | ||
| All shared boards | 9 | 29 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index33
| Benchmark | Claude Opus 4.1 | Gemma 4 31B | Leader |
|---|---|---|---|
| LiveBench coding | Not measured | 49.0% | Only Gemma 4 31B measured |
| LMArena WebDev | 1390 | 1367 | Claude Opus 4.1 |
| AA Coding Index | Not measured | 43.4 | Only Gemma 4 31B measured |
| LiveCodeBench (Vals AI) | 66.5% | Not measured | Only Claude Opus 4.1 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 | 38.0% | Not measured | Only Claude Opus 4.1 measured |
| WeirdML | 45.9% | 52.3% | Gemma 4 31B |
| Cybench | 42.0% | Not measured | Only Claude Opus 4.1 measured |
| ALE-Bench | Not measured | 925.5 | Only Gemma 4 31B measured |
| LMArena Text: coding | 1479 | 1459 | Claude Opus 4.1 |
| LMArena Text: software and IT | 1456 | 1463 | Gemma 4 31B |
| LMArena WebDev: React | Not measured | 1359 | Only Gemma 4 31B measured |
| LMArena WebDev: HTML | 1399 | 1380 | Claude Opus 4.1 |
| SciCode | 4.6% | 8.9% | Gemma 4 31B |
| Neither model has a result on the other 24 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index20
| Benchmark | Claude Opus 4.1 | Gemma 4 31B | Leader |
|---|---|---|---|
| AA Intelligence Index | 22.8 | 14.7 | Claude Opus 4.1 |
| Epoch Capabilities Index | 144.1 | 143.0 | Claude Opus 4.1 |
Agentic workDirectional onlyPublic boards, shown as published, kept out of the index8 boards, none shared
| Benchmark | Claude Opus 4.1 | 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 | Not measured | 65.5% | Only Gemma 4 31B measured |
| METR time horizons | 66.8% | Not measured | Only Claude Opus 4.1 measured |
| GDPval | 43.6% | Not measured | Only Claude Opus 4.1 measured |
| DeepResearch Bench | 48.3% | Not measured | Only Claude Opus 4.1 measured |
| Neither model has a result on the other 33 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index13
| Benchmark | Claude Opus 4.1 | Gemma 4 31B | Leader |
|---|---|---|---|
| GPQA Diamond | 76.3% | Not measured | Only Claude Opus 4.1 measured |
| LiveBench reasoning | Not measured | 68.3% | Only Gemma 4 31B measured |
| MMMU Pro (Vals AI) | 77.5% | Not measured | Only Claude Opus 4.1 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) | 77.3% | 75.8% | Claude Opus 4.1 |
| SimpleBench | 60.0% | Not measured | Only Claude Opus 4.1 measured |
| Mystery game puzzles | 21.0% | Not measured | Only Claude Opus 4.1 measured |
| EBR-bench | 7.9% | Not measured | Only Claude Opus 4.1 measured |
| VPCT | 35.0% | Not measured | Only Claude Opus 4.1 measured |
| LMArena Text: hard prompts | 1442 | 1448 | Gemma 4 31B |
| LMArena Text: expert | 1438 | 1464 | Gemma 4 31B |
| LMArena Text: hard prompts in English | 1451 | 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 6 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index03
| Benchmark | Claude Opus 4.1 | Gemma 4 31B | Leader |
|---|---|---|---|
| AIME | 78.2% | Not measured | Only Claude Opus 4.1 measured |
| MATH 500 (Vals AI) | 95.4% | Not measured | Only Claude Opus 4.1 measured |
| MGSM (Vals AI) | 94.4% | Not measured | Only Claude Opus 4.1 measured |
| OTIS Mock AIME | 68.9% | 73.3% | Gemma 4 31B |
| FrontierMath, tiers 1 to 3 | 12.6% | Not measured | Only Claude Opus 4.1 measured |
| FrontierMath, tier 4 | 2.4% | Not measured | Only Claude Opus 4.1 measured |
| LMArena Text: math | 1431 | 1463 | Gemma 4 31B |
| LMArena Text: mathematical work | 1434 | 1465 | Gemma 4 31B |
| Neither model has a result on the other 5 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index06
| Benchmark | Claude Opus 4.1 | Gemma 4 31B | Leader |
|---|---|---|---|
| MMLU Pro | 87.9% | Not measured | Only Claude Opus 4.1 measured |
| LegalBench (Vals AI) | 83.5% | Not measured | Only Claude Opus 4.1 measured |
| CaseLaw (Vals AI) | Not measured | 52.6% | Only Gemma 4 31B measured |
| TaxEval (Vals AI) | 73.7% | Not measured | Only Claude Opus 4.1 measured |
| MortgageTax (Vals AI) | 61.1% | 61.4% | Gemma 4 31B |
| MedQA (Vals AI) | 93.6% | Not measured | Only Claude Opus 4.1 measured |
| MedCode (Vals AI) | 47.2% | Not measured | Only Claude Opus 4.1 measured |
| SimpleQA Verified | Not measured | 10.4% | Only Gemma 4 31B measured |
| LMArena Text: science | 1422 | 1457 | Gemma 4 31B |
| LMArena Text: medicine and healthcare | 1416 | 1451 | Gemma 4 31B |
| LMArena Text: legal and government | 1421 | 1438 | Gemma 4 31B |
| LMArena Text: business and finance | 1406 | 1430 | Gemma 4 31B |
| FACTS Benchmark Suite | 40.4% | 45.3% | Gemma 4 31B |
| Neither model has a result on the other 5 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index9 boards, none shared
| Benchmark | Claude Opus 4.1 | Gemma 4 31B | Leader |
|---|---|---|---|
| Design Arena: websites | 1176 | Not measured | Only Claude Opus 4.1 measured |
| Design Arena: UI components | 1162 | Not measured | Only Claude Opus 4.1 measured |
| Design Arena: game dev | 1171 | Not measured | Only Claude Opus 4.1 measured |
| Design Arena: data viz | 1166 | Not measured | Only Claude Opus 4.1 measured |
| Design Arena: 3D | 1152 | Not measured | Only Claude Opus 4.1 measured |
| Design Arena: all code categories | 1170 | Not measured | Only Claude Opus 4.1 measured |
| Design Arena: SVG | 1152 | Not measured | Only Claude Opus 4.1 measured |
| Design Arena: ASCII art | 1167 | Not measured | Only Claude Opus 4.1 measured |
| LiveBench design | Not measured | 58.4% | Only Gemma 4 31B measured |
GeneralLike-for-likePublic boards, shown as published, kept out of the index314
| Benchmark | Claude Opus 4.1 | Gemma 4 31B | Leader |
|---|---|---|---|
| LiveBench data analysis | Not measured | 53.3% | Only Gemma 4 31B measured |
| SAGE (Vals AI) | 31.4% | 55.0% | Gemma 4 31B |
| MedScribe (Vals AI) | 73.9% | Not measured | Only Claude Opus 4.1 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 | 80.0% | 82.7% | Gemma 4 31B |
| LMCA | 37.1% | 39.3% | Gemma 4 31B |
| Creative writing (Lech Mazur) | 84.7% | Not measured | Only Claude Opus 4.1 measured |
| Surface Evolver Bench | Not measured | 30.6% | Only Gemma 4 31B measured |
| LMArena Text | 1419 | 1443 | Gemma 4 31B |
| LMArena Text: instruction following | 1435 | 1433 | Claude Opus 4.1 |
| LMArena Text: creative writing | 1412 | 1417 | Gemma 4 31B |
| LMArena Vision | Not measured | 1276 | Only Gemma 4 31B measured |
| LMArena Text: English | 1433 | 1451 | Gemma 4 31B |
| LMArena Text: non-English | 1405 | 1430 | Gemma 4 31B |
| LMArena Text: Chinese | 1427 | 1475 | Gemma 4 31B |
| LMArena Text: German | 1413 | Not measured | Only Claude Opus 4.1 measured |
| LMArena Text: Japanese | 1377 | Not measured | Only Claude Opus 4.1 measured |
| LMArena Text: Korean | 1381 | Not measured | Only Claude Opus 4.1 measured |
| LMArena Text: French | 1433 | 1436 | Gemma 4 31B |
| LMArena Text: Spanish | 1448 | 1442 | Claude Opus 4.1 |
| LMArena Text: Russian | 1422 | 1460 | Gemma 4 31B |
| LMArena Text: Polish | 1413 | 1433 | Gemma 4 31B |
| LMArena Text: multi-turn | 1444 | 1452 | Gemma 4 31B |
| LMArena Text: longer queries | 1455 | 1446 | Claude Opus 4.1 |
| LMArena Text: writing and language | 1418 | 1432 | Gemma 4 31B |
| LMArena Text: entertainment and media | 1398 | 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 | Not measured | 1425 | Only Gemma 4 31B measured |
| 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 | Claude Opus 4.1 | 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 Opus 4.1 | Google Gemma 4 31B |
|---|---|---|
| Maker | Anthropic | |
| Weights | No public weights listed | Open weights |
| Released | August 5, 2025 | April 2, 2026 |
| Context window | 200K | 262K |
| Input $/Mtok | $15.00 | $0.14 |
| Output $/Mtok | $75.00 | $0.40 |
| Coding index | Not benchmarked | 39.0 |
| Independent measurements behind it | 1 | 2 |
| Cost per solved task | Not computable | Not computable |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Claude Opus 4.1 better than Gemma 4 31B for coding?
Only Gemma 4 31B has a coding score, 39.0 on the Vibe Coding Index; Claude Opus 4.1 has none, so the two cannot be ranked on coding. Pick Claude Opus 4.1 for work measured by LMArena WebDev or LMArena Text: coding, where it leads.
Which is cheaper, Claude Opus 4.1 or Gemma 4 31B?
Claude Opus 4.1 costs $15.00 per million input tokens and $75.00 per million output tokens; Gemma 4 31B costs $0.14 and $0.40. Cost per solved task is known for neither of them.
Which has the bigger context window, Claude Opus 4.1 or Gemma 4 31B?
Gemma 4 31B, with 262K tokens against 200K.
How many benchmarks is the Claude Opus 4.1 vs Gemma 4 31B comparison based on?
38 benchmarks have a result for both models as of October 22, 2026. Claude Opus 4.1'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.