Enter opens the highlighted result. Esc closes.

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 ProGoogle
Coding
19.1
Overall
41.8
Output $/M
$10.00
31
Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
28
vs boards won of 59 shared

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.

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.

Boards won, where both have a result
CategoryGemini 2.5 ProBarsGemma 4 31BTies
Coding26
Intelligence20
Agentic work02
Reasoning36
Math12
Knowledge70
General1612
All shared boards3128
CodingLike-for-likeSix of these boards feed the Vibe Coding Index26
Coding benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
SWE-bench Verified53.6%Not measuredOnly Gemini 2.5 Pro measured
LiveBench codingNot measured49.0%Only Gemma 4 31B measured
LMArena WebDev12261367Gemma 4 31B
AA Coding Index33.343.4Gemma 4 31B
SWE-bench Verified (Vals AI)54.4%Not measuredOnly Gemini 2.5 Pro measured
Vibe Code Bench (Vals AI)0.4%Not measuredOnly Gemini 2.5 Pro measured
LiveCodeBench (Artificial Analysis run)80.1%Not measuredOnly Gemini 2.5 Pro measured
SciCode46.3%45.5%Gemini 2.5 Pro
Terminal-Bench Hard (Artificial Analysis run)26.5%36.4%Gemma 4 31B
Terminal-Bench32.6%Not measuredOnly Gemini 2.5 Pro measured
GSO-Bench3.9%Not measuredOnly Gemini 2.5 Pro measured
WeirdML54.0%52.3%Gemini 2.5 Pro
ALE-BenchNot measured925.5Only Gemma 4 31B measured
LMArena Text: coding14521459Gemma 4 31B
LMArena Text: software and IT14591463Gemma 4 31B
LMArena WebDev: ReactNot measured1359Only Gemma 4 31B measured
LMArena WebDev: HTML12351380Gemma 4 31B
LMArena WebDev: from an image1285Not measuredOnly Gemini 2.5 Pro measured
SciCodeNot measured8.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
Intelligence benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
AA Intelligence Index16.114.7Gemini 2.5 Pro
Epoch Capabilities Index145.1143.0Gemini 2.5 Pro
Agentic workLike-for-likePublic boards, shown as published, kept out of the index02
Agentic work benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
AA Agentic Index1.64.2Gemma 4 31B
LiveBench researchNot measured44.4%Only Gemma 4 31B measured
LiveBench browserNot measured4.0%Only Gemma 4 31B measured
LiveBench long agenticNot measured13.3%Only Gemma 4 31B measured
τ²-Bench Telecom54.1%65.5%Gemma 4 31B
GDPval23.3%Not measuredOnly Gemini 2.5 Pro measured
DeepResearch Bench41.5%Not measuredOnly Gemini 2.5 Pro measured
Vending-Bench 2$574Not measuredOnly Gemini 2.5 Pro measured
BrowseComp-Plus29.5%Not measuredOnly 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
Reasoning benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
LiveBench reasoningNot measured68.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-AGI41.0%Not measuredOnly Gemini 2.5 Pro measured
ARC-AGI-24.9%Not measuredOnly Gemini 2.5 Pro measured
LMArena Text: hard prompts14551448Gemini 2.5 Pro
LMArena Text: expert14521464Gemma 4 31B
LMArena Text: hard prompts in English14531456Gemma 4 31B
LMArena Vision: diagrams12741283Gemma 4 31B
LMArena Vision: homework12811310Gemma 4 31B
Kagi LLM Benchmark70.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
Math benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
AA Math Index87.7Not measuredOnly Gemini 2.5 Pro measured
AIME 2025 (Artificial Analysis run)87.7%Not measuredOnly Gemini 2.5 Pro measured
OTIS Mock AIME84.7%73.3%Gemini 2.5 Pro
FrontierMath, tiers 1 to 324.6%Not measuredOnly Gemini 2.5 Pro measured
FrontierMath, tier 40.0%Not measuredOnly Gemini 2.5 Pro measured
LMArena Text: math14501463Gemma 4 31B
LMArena Text: mathematical work14541465Gemma 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
Knowledge benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
CaseLaw (Vals AI)63.9%52.6%Gemini 2.5 Pro
CorpFin (Vals AI)60.8%Not measuredOnly Gemini 2.5 Pro measured
MortgageTax (Vals AI)68.9%61.4%Gemini 2.5 Pro
MedCode (Vals AI)50.6%Not measuredOnly Gemini 2.5 Pro measured
MMLU Pro (Artificial Analysis run)86.2%Not measuredOnly Gemini 2.5 Pro measured
SimpleQA VerifiedNot measured10.4%Only Gemma 4 31B measured
LMArena Text: science14801457Gemini 2.5 Pro
LMArena Text: medicine and healthcare14761451Gemini 2.5 Pro
LMArena Text: legal and government14801438Gemini 2.5 Pro
LMArena Text: business and finance14391430Gemini 2.5 Pro
FACTS Benchmark Suite61.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
Web design benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
Design Arena: websites1167Not measuredOnly Gemini 2.5 Pro measured
Design Arena: UI components1137Not measuredOnly Gemini 2.5 Pro measured
Design Arena: game dev1111Not measuredOnly Gemini 2.5 Pro measured
Design Arena: data viz1222Not measuredOnly Gemini 2.5 Pro measured
Design Arena: 3D1080Not measuredOnly Gemini 2.5 Pro measured
Design Arena: all code categories1152Not measuredOnly Gemini 2.5 Pro measured
LiveBench designNot measured58.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
General benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
LiveBench data analysisNot measured53.3%Only Gemma 4 31B measured
SAGE (Vals AI)41.9%55.0%Gemma 4 31B
MedScribe (Vals AI)73.5%Not measuredOnly Gemini 2.5 Pro measured
IFBench48.7%75.6%Gemma 4 31B
Long context reasoning (AA-LCR)69.0%69.7%Gemma 4 31B
DTBench82.4%82.7%Gemma 4 31B
LMCA34.8%39.3%Gemma 4 31B
Creative writing (Lech Mazur)83.8%Not measuredOnly Gemini 2.5 Pro measured
Surface Evolver BenchNot measured30.6%Only Gemma 4 31B measured
LMArena Text14581443Gemini 2.5 Pro
LMArena Text: instruction following14371433Gemini 2.5 Pro
LMArena Text: creative writing14541417Gemini 2.5 Pro
LMArena Vision12631276Gemma 4 31B
LMArena Text: English14581451Gemini 2.5 Pro
LMArena Text: non-English14521430Gemini 2.5 Pro
LMArena Text: Chinese15071475Gemini 2.5 Pro
LMArena Text: German1487Not measuredOnly Gemini 2.5 Pro measured
LMArena Text: Japanese1461Not measuredOnly Gemini 2.5 Pro measured
LMArena Text: Korean1434Not measuredOnly Gemini 2.5 Pro measured
LMArena Text: French14731436Gemini 2.5 Pro
LMArena Text: Spanish14741442Gemini 2.5 Pro
LMArena Text: Russian14611460Gemini 2.5 Pro
LMArena Text: Polish14791433Gemini 2.5 Pro
LMArena Text: multi-turn14531452Gemini 2.5 Pro
LMArena Text: longer queries14491446Gemini 2.5 Pro
LMArena Text: writing and language14541432Gemini 2.5 Pro
LMArena Text: entertainment and media14411405Gemini 2.5 Pro
LMArena Vision: English12611271Gemma 4 31B
LMArena Vision: Chinese13001326Gemma 4 31B
LMArena Vision: reading text12701282Gemma 4 31B
LMArena Vision: humor12621280Gemma 4 31B
LMArena Vision: captioning13041218Gemini 2.5 Pro
LMArena Vision: recognizing things12831226Gemini 2.5 Pro
LMArena Vision: creative writing12651285Gemma 4 31B
LMArena Document14211425Gemma 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
Image generation benchmarks for Gemini 2.5 Pro and Gemma 4 31B
BenchmarkGemini 2.5 ProGemma 4 31BLeader
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

Gemini 2.5 Pro$0.0063Fits in one request
Gemma 4 31B$0.0003Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemini 2.5 Pro$0.092Fits in one request
Gemma 4 31B$0.0082Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemini 2.5 Pro$0.350Fits in one request
Gemma 4 31B$0.032Fits in one request

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.

Specifications of Gemini 2.5 Pro and Gemma 4 31B
SpecificationGoogle Gemini 2.5 ProGoogle Gemma 4 31B
MakerGoogleGoogle
WeightsNo public weights listedOpen weights
ReleasedJune 17, 2025April 2, 2026
Context window1.05M262K
Input $/Mtok$1.25$0.14
Output $/Mtok$10.00$0.40
Coding index19.139.0
Independent measurements behind it32
Cost per solved task$0.64Not computable
SourceOpenRouter listingOpenRouter 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.

Compare next

Embed this comparison on your site

Free under CC BY 4.0, while the source link stays visible. Preview the frame · Terms and other embeds

<iframe src="https://llmbenchmark.ai/embed/compare/gemini-2-5-pro-vs-gemma-4-31b-it" title="Gemini 2.5 Pro vs Gemma 4 31B, LLMBenchmark.ai" width="100%" height="360" style="border:0;max-width:100%" loading="lazy"></iframe>
<p style="font:13px/1.4 sans-serif;margin:6px 0 0">Source: <a href="https://llmbenchmark.ai/compare/gemini-2-5-pro-vs-gemma-4-31b-it">LLMBenchmark.ai, Gemini 2.5 Pro vs Gemma 4 31B</a></p>