Enter opens the highlighted result. Esc closes.

Gemini 3.7 Flash vs Gemma 4 31B

Gemini 3.7 Flash leads Gemma 4 31B on coding, 58.0 to 39.0 on the Vibe Coding Index, and Gemma 4 31B costs 9.4x less per output token ($0.40 vs $3.75 per million). Updated October 22, 2026; 60 benchmarks have a result for both.

Gemini 3.7 FlashGoogle
Coding
58.0
Overall
65.7
Output $/M
$3.75
58
Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
2
vs boards won of 60 shared

Gemini 3.7 Flash or Gemma 4 31B: which to pick

Pick Gemini 3.7 Flash for coding: it scores 58.0 on the Vibe Coding Index against 39.0 for Gemma 4 31B.

Pick Gemma 4 31B for output tokens 9.4x cheaper ($0.40 vs $3.75 per million) and work measured by ALE-Bench or SAGE (Vals AI), where it leads.

Shared results
60
Gemini 3.7 Flash only
54
Gemma 4 31B only
11
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.

At a glance

Coding index
Gemini 3.7 Flash 58.0 from 6 benchmarks, Gemma 4 31B 39.0 from 2 benchmarks.
Widest category
Agentic work, 33.0 points apart on average over 3 shared benchmarks.
Widest single gap
SimpleQA Verified: Gemini 3.7 Flash 69.2% against Gemma 4 31B 10.4%, 58.8 points apart on a 0 to 100 scale.
Output price
Gemini 3.7 Flash $3.75 against Gemma 4 31B $0.40 per million output tokens, 9.4x apart.
Context window
Gemini 3.7 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.

Boards won, where both have a result
CategoryGemini 3.7 FlashBarsGemma 4 31BTies
Coding91
Intelligence20
Agentic work30
Reasoning90
Math30
Knowledge70
Web design10
General241
All shared boards582
CodingLike-for-likeSix of these boards feed the Vibe Coding Index91
Coding benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
LiveBench coding80.5%49.0%Gemini 3.7 Flash
LMArena WebDev15911367Gemini 3.7 Flash
AA Coding Index71.543.4Gemini 3.7 Flash
LiveCodeBench (Vals AI)88.7%Not measuredOnly Gemini 3.7 Flash measured
SWE-bench Verified (Vals AI)80.8%Not measuredOnly Gemini 3.7 Flash measured
Terminal-Bench 4 (Vals AI)12.1%Not measuredOnly Gemini 3.7 Flash measured
Vibe Code Bench (Vals AI)70.4%Not measuredOnly Gemini 3.7 Flash measured
Code migration (Vals AI)34.8%Not measuredOnly Gemini 3.7 Flash measured
ProgramBench (Vals AI)0.0%Not measuredOnly Gemini 3.7 Flash measured
IOI (Vals AI)67.8%Not measuredOnly Gemini 3.7 Flash measured
Terminal-Bench 2.1 (Vals AI)77.5%Not measuredOnly Gemini 3.7 Flash measured
SkillsBench (Vals AI)65.9%Not measuredOnly Gemini 3.7 Flash measured
CyberBench (Vals AI)43.8%Not measuredOnly Gemini 3.7 Flash measured
SciCode59.8%45.5%Gemini 3.7 Flash
Terminal-Bench Hard (Artificial Analysis run)Not measured36.4%Only Gemma 4 31B measured
FrontierCode43.6%Not measuredOnly Gemini 3.7 Flash measured
FrontierSWE20.3%Not measuredOnly Gemini 3.7 Flash measured
WeirdMLNot measured52.3%Only Gemma 4 31B measured
ALE-Bench904.3925.5Gemma 4 31B
LMArena Text: coding14991459Gemini 3.7 Flash
LMArena Text: software and IT14981463Gemini 3.7 Flash
LMArena WebDev: React15871359Gemini 3.7 Flash
LMArena WebDev: HTML15931380Gemini 3.7 Flash
LMArena WebDev: from an image1599Not measuredOnly Gemini 3.7 Flash measured
SciCode13.8%8.9%Gemini 3.7 Flash
Neither model has a result on the other 14 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index20
Intelligence benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
AA Intelligence Index39.614.7Gemini 3.7 Flash
Epoch Capabilities Index158.0143.0Gemini 3.7 Flash
Agentic workLike-for-likePublic boards, shown as published, kept out of the index30
Agentic work benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
AA Agentic IndexNot measured4.2Only Gemma 4 31B measured
Design Arena: agents building web apps1223Not measuredOnly Gemini 3.7 Flash measured
Design Arena: agents building full-stack apps1208Not measuredOnly Gemini 3.7 Flash measured
Design Arena: agents building mobile apps1229Not measuredOnly Gemini 3.7 Flash measured
Design Arena: agents building Android apps1243Not measuredOnly Gemini 3.7 Flash measured
Design Arena: agents building Godot games1264Not measuredOnly Gemini 3.7 Flash measured
Design Arena: agents building games1235Not measuredOnly Gemini 3.7 Flash measured
Design Arena: spreadsheets1058Not measuredOnly Gemini 3.7 Flash measured
LiveBench research76.5%44.4%Gemini 3.7 Flash
LiveBench browser56.0%4.0%Gemini 3.7 Flash
LiveBench long agentic28.3%13.3%Gemini 3.7 Flash
SREBench (Vals AI)4.6%Not measuredOnly Gemini 3.7 Flash measured
Finance Agent (Vals AI)59.0%Not measuredOnly Gemini 3.7 Flash measured
Tax Agent Bench (Vals AI)22.8%Not measuredOnly Gemini 3.7 Flash measured
Legal Research Bench (Vals AI)34.6%Not measuredOnly Gemini 3.7 Flash measured
Excel Modeling Benchmark (Vals AI)71.3%Not measuredOnly Gemini 3.7 Flash measured
Terminal-Bench-Science (Vals AI)7.1%Not measuredOnly Gemini 3.7 Flash measured
τ²-Bench TelecomNot measured65.5%Only Gemma 4 31B measured
APEX-Agents67.8%Not measuredOnly Gemini 3.7 Flash measured
Remote Labor Index5.0%Not measuredOnly Gemini 3.7 Flash measured
Neither model has a result on the other 21 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index90
Reasoning benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
GPQA Diamond93.9%Not measuredOnly Gemini 3.7 Flash measured
LiveBench reasoning87.8%68.3%Gemini 3.7 Flash
MMMU Pro (Vals AI)89.0%Not measuredOnly Gemini 3.7 Flash measured
GPQA Diamond (Artificial Analysis run)94.5%85.7%Gemini 3.7 Flash
Humanity's Last Exam (Artificial Analysis run)47.9%23.6%Gemini 3.7 Flash
GPQA Diamond (Epoch AI run)94.8%75.8%Gemini 3.7 Flash
ARC-AGI95.5%Not measuredOnly Gemini 3.7 Flash measured
ARC-AGI-284.6%Not measuredOnly Gemini 3.7 Flash measured
Chess puzzles66.0%Not measuredOnly Gemini 3.7 Flash measured
Mystery game puzzles37.0%Not measuredOnly Gemini 3.7 Flash measured
LMArena Text: hard prompts14951448Gemini 3.7 Flash
LMArena Text: expert15121464Gemini 3.7 Flash
LMArena Text: hard prompts in English14871456Gemini 3.7 Flash
LMArena Vision: diagrams13291283Gemini 3.7 Flash
LMArena Vision: homework13201310Gemini 3.7 Flash
Kagi LLM BenchmarkNot measured63.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 index30
Math benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
OTIS Mock AIME97.2%73.3%Gemini 3.7 Flash
FrontierMath, tiers 1 to 371.6%Not measuredOnly Gemini 3.7 Flash measured
FrontierMath, tier 436.6%Not measuredOnly Gemini 3.7 Flash measured
ProofBench58.0%Not measuredOnly Gemini 3.7 Flash measured
LMArena Text: math15111463Gemini 3.7 Flash
LMArena Text: mathematical work15021465Gemini 3.7 Flash
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index70
Knowledge benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
MMLU Pro90.1%Not measuredOnly Gemini 3.7 Flash measured
LegalBench (Vals AI)87.3%Not measuredOnly Gemini 3.7 Flash measured
CaseLaw (Vals AI)Not measured52.6%Only Gemma 4 31B measured
TaxEval (Vals AI)74.7%Not measuredOnly Gemini 3.7 Flash measured
MortgageTax (Vals AI)66.7%61.4%Gemini 3.7 Flash
MedCode (Vals AI)53.4%Not measuredOnly Gemini 3.7 Flash measured
SimpleQA Verified69.2%10.4%Gemini 3.7 Flash
LMArena Text: science15111457Gemini 3.7 Flash
LMArena Text: medicine and healthcare14941451Gemini 3.7 Flash
LMArena Text: legal and government14961438Gemini 3.7 Flash
LMArena Text: business and finance14791430Gemini 3.7 Flash
FACTS Benchmark Suite71.2%45.3%Gemini 3.7 Flash
Neither model has a result on the other 6 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index10
Web design benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
Design Arena: websites1303Not measuredOnly Gemini 3.7 Flash measured
Design Arena: UI components1296Not measuredOnly Gemini 3.7 Flash measured
Design Arena: game dev1317Not measuredOnly Gemini 3.7 Flash measured
Design Arena: data viz1315Not measuredOnly Gemini 3.7 Flash measured
Design Arena: 3D1307Not measuredOnly Gemini 3.7 Flash measured
Design Arena: all code categories1308Not measuredOnly Gemini 3.7 Flash measured
Design Arena: SVG1283Not measuredOnly Gemini 3.7 Flash measured
Design Arena: ASCII art1276Not measuredOnly Gemini 3.7 Flash measured
LiveBench design73.2%58.4%Gemini 3.7 Flash
GeneralLike-for-likePublic boards, shown as published, kept out of the index241
General benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 4 31BLeader
LiveBench data analysis68.0%53.3%Gemini 3.7 Flash
SAGE (Vals AI)49.2%55.0%Gemma 4 31B
MedScribe (Vals AI)83.9%Not measuredOnly Gemini 3.7 Flash measured
IFBenchNot measured75.6%Only Gemma 4 31B measured
Long context reasoning (AA-LCR)83.0%69.7%Gemini 3.7 Flash
DTBench96.8%82.7%Gemini 3.7 Flash
LMCA50.4%39.3%Gemini 3.7 Flash
Surface Evolver BenchNot measured30.6%Only Gemma 4 31B measured
Furniture assembly26.7%Not measuredOnly Gemini 3.7 Flash measured
LMArena Text14891443Gemini 3.7 Flash
LMArena Text: instruction following14841433Gemini 3.7 Flash
LMArena Text: creative writing14881417Gemini 3.7 Flash
LMArena Vision13141276Gemini 3.7 Flash
LMArena Text: English14831451Gemini 3.7 Flash
LMArena Text: non-English14871430Gemini 3.7 Flash
LMArena Text: Chinese15521475Gemini 3.7 Flash
LMArena Text: German1506Not measuredOnly Gemini 3.7 Flash measured
LMArena Text: Japanese1511Not measuredOnly Gemini 3.7 Flash measured
LMArena Text: Korean1481Not measuredOnly Gemini 3.7 Flash measured
LMArena Text: French15001436Gemini 3.7 Flash
LMArena Text: Spanish14951442Gemini 3.7 Flash
LMArena Text: Russian15151460Gemini 3.7 Flash
LMArena Text: Polish15031433Gemini 3.7 Flash
LMArena Text: multi-turn14851452Gemini 3.7 Flash
LMArena Text: longer queries14921446Gemini 3.7 Flash
LMArena Text: writing and language14911432Gemini 3.7 Flash
LMArena Text: entertainment and media14771405Gemini 3.7 Flash
LMArena Vision: English13091271Gemini 3.7 Flash
LMArena Vision: Chinese13941326Gemini 3.7 Flash
LMArena Vision: reading text13221282Gemini 3.7 Flash
LMArena Vision: humor12991280Gemini 3.7 Flash
LMArena Vision: captioningNot measured1218Only Gemma 4 31B measured
LMArena Vision: recognizing thingsNot measured1226Only Gemma 4 31B measured
LMArena Vision: creative writing13121285Gemini 3.7 Flash
LMArena DocumentNot measured1425Only 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
Image generation benchmarks for Gemini 3.7 Flash and Gemma 4 31B
BenchmarkGemini 3.7 FlashGemma 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 3.7 Flash$0.0026Fits in one request
Gemma 4 31B$0.0003Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemini 3.7 Flash$0.049Fits in one request
Gemma 4 31B$0.0082Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemini 3.7 Flash$0.188Fits 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 3.7 Flash and Gemma 4 31B
SpecificationGoogle Gemini 3.7 FlashGoogle Gemma 4 31B
MakerGoogleGoogle
WeightsNo public weights listedOpen weights
ReleasedAugust 13, 2026April 2, 2026
Context window1.05M262K
Input $/Mtok$0.75$0.14
Output $/Mtok$3.75$0.40
Coding index58.039.0
Independent measurements behind it62
Cost per solved task$1.78Not computable
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemini 3.7 Flash better than Gemma 4 31B for coding?

Pick Gemini 3.7 Flash for coding: it scores 58.0 on the Vibe Coding Index against 39.0 for Gemma 4 31B. Pick Gemma 4 31B for output tokens 9.4x cheaper ($0.40 vs $3.75 per million) and work measured by ALE-Bench or SAGE (Vals AI), where it leads.

Which is cheaper, Gemini 3.7 Flash or Gemma 4 31B?

Gemini 3.7 Flash costs $0.75 per million input tokens and $3.75 per million output tokens; Gemma 4 31B costs $0.14 and $0.40. Cost per solved task is known for Gemini 3.7 Flash only.

Which has the bigger context window, Gemini 3.7 Flash or Gemma 4 31B?

Gemini 3.7 Flash, with 1.05M tokens against 262K.

How many benchmarks is the Gemini 3.7 Flash vs Gemma 4 31B comparison based on?

60 benchmarks have a result for both models as of October 22, 2026. Gemini 3.7 Flash's coding index rests on 6 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-3-7-flash-vs-gemma-4-31b-it" title="Gemini 3.7 Flash 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-3-7-flash-vs-gemma-4-31b-it">LLMBenchmark.ai, Gemini 3.7 Flash vs Gemma 4 31B</a></p>