Enter opens the highlighted result. Esc closes.

Gemini 3.5 Flash vs Gemma 4 31B

Gemini 3.5 Flash leads Gemma 4 31B on coding, 39.8 to 39.0 on the Vibe Coding Index, and Gemma 4 31B costs 22.5x less per output token ($0.40 vs $9.00 per million). Updated October 21, 2026; 58 benchmarks have a result for both.

Gemini 3.5 FlashGoogle
Coding
39.8
Overall
63.8
Output $/M
$9.00
56
Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
2
vs boards won of 58 shared

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

Gemini 3.5 Flash and Gemma 4 31B are level for coding, 39.8 against 39.0 on the Vibe Coding Index, so price and context decide.

Pick Gemma 4 31B for output tokens 22.5x cheaper ($0.40 vs $9.00 per million) and work measured by ALE-Bench or SAGE (Vals AI), where it leads. Pick Gemini 3.5 Flash for a larger context window (1.05M against 262K tokens) and work measured by LMArena WebDev or SciCode, where it leads.

Shared results
58
Gemini 3.5 Flash only
54
Gemma 4 31B only
13
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 3.5 Flash 39.8 from 4 benchmarks, Gemma 4 31B 39.0 from 2 benchmarks.
Widest category
Agentic work, 30.1 points apart on average over 1 shared benchmark.
Widest single gap
SimpleQA Verified: Gemini 3.5 Flash 66.2% against Gemma 4 31B 10.4%, 55.8 points apart on a 0 to 100 scale.
Output price
Gemini 3.5 Flash $9.00 against Gemma 4 31B $0.40 per million output tokens, 22.5x apart.
Context window
Gemini 3.5 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.5 FlashBarsGemma 4 31BTies
Coding91
Intelligence20
Agentic work10
Reasoning80
Math30
Knowledge70
General261
All shared boards562
CodingLike-for-likeSix of these boards feed the Vibe Coding Index91
Coding benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
LiveBench codingNot measured49.0%Only Gemma 4 31B measured
LMArena WebDev14991367Gemini 3.5 Flash
AA Coding IndexNot measured43.4Only Gemma 4 31B measured
LiveCodeBench (Vals AI)87.6%Not measuredOnly Gemini 3.5 Flash measured
SWE-bench Verified (Vals AI)78.8%Not measuredOnly Gemini 3.5 Flash measured
Terminal-Bench 4 (Vals AI)6.1%Not measuredOnly Gemini 3.5 Flash measured
Vibe Code Bench (Vals AI)48.7%Not measuredOnly Gemini 3.5 Flash measured
Code migration (Vals AI)26.8%Not measuredOnly Gemini 3.5 Flash measured
ProgramBench (Vals AI)0.0%Not measuredOnly Gemini 3.5 Flash measured
Terminal-Bench 2.1 (Vals AI)74.2%Not measuredOnly Gemini 3.5 Flash measured
SkillsBench (Vals AI)52.7%Not measuredOnly Gemini 3.5 Flash measured
SciCode53.9%45.5%Gemini 3.5 Flash
Terminal-Bench Hard (Artificial Analysis run)46.2%36.4%Gemini 3.5 Flash
WeirdML62.6%52.3%Gemini 3.5 Flash
ALE-Bench911.0925.5Gemma 4 31B
LMArena Text: coding14931459Gemini 3.5 Flash
LMArena Text: software and IT14941463Gemini 3.5 Flash
LMArena WebDev: React14951359Gemini 3.5 Flash
LMArena WebDev: HTML15221380Gemini 3.5 Flash
LMArena WebDev: from an image1504Not measuredOnly Gemini 3.5 Flash measured
SciCode12.3%8.9%Gemini 3.5 Flash
Neither model has a result on the other 18 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index20
Intelligence benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
AA Intelligence Index33.614.7Gemini 3.5 Flash
Epoch Capabilities Index154.9143.0Gemini 3.5 Flash
Agentic workLike-for-likePublic boards, shown as published, kept out of the index10
Agentic work benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
AA Agentic IndexNot measured4.2Only Gemma 4 31B measured
Design Arena: agents building web apps1202Not measuredOnly Gemini 3.5 Flash measured
Design Arena: agents building full-stack apps1197Not measuredOnly Gemini 3.5 Flash measured
Design Arena: agents building mobile apps1174Not measuredOnly Gemini 3.5 Flash measured
Design Arena: agents building Android apps1184Not measuredOnly Gemini 3.5 Flash measured
Design Arena: agents building Godot games1098Not measuredOnly Gemini 3.5 Flash measured
Design Arena: agents building games1180Not measuredOnly Gemini 3.5 Flash measured
Design Arena: HTML slides1142Not measuredOnly Gemini 3.5 Flash measured
Design Arena: PowerPoint slides1179Not measuredOnly Gemini 3.5 Flash measured
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
Finance Agent (Vals AI)57.9%Not measuredOnly Gemini 3.5 Flash measured
Tax Agent Bench (Vals AI)21.6%Not measuredOnly Gemini 3.5 Flash measured
Legal Research Bench (Vals AI)30.8%Not measuredOnly Gemini 3.5 Flash measured
Excel Modeling Benchmark (Vals AI)63.5%Not measuredOnly Gemini 3.5 Flash measured
Terminal-Bench-Science (Vals AI)5.7%Not measuredOnly Gemini 3.5 Flash measured
τ²-Bench Telecom95.6%65.5%Gemini 3.5 Flash
APEX-Agents27.5%Not measuredOnly Gemini 3.5 Flash measured
Vending-Bench 2$5,396Not measuredOnly Gemini 3.5 Flash measured
Neither model has a result on the other 21 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index80
Reasoning benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
GPQA Diamond92.7%Not measuredOnly Gemini 3.5 Flash measured
LiveBench reasoningNot measured68.3%Only Gemma 4 31B measured
MMMU Pro (Vals AI)88.3%Not measuredOnly Gemini 3.5 Flash measured
GPQA Diamond (Artificial Analysis run)92.2%85.7%Gemini 3.5 Flash
Humanity's Last Exam (Artificial Analysis run)42.7%23.6%Gemini 3.5 Flash
GPQA Diamond (Epoch AI run)92.8%75.8%Gemini 3.5 Flash
ARC-AGI92.5%Not measuredOnly Gemini 3.5 Flash measured
ARC-AGI-272.1%Not measuredOnly Gemini 3.5 Flash measured
SimpleBench76.7%Not measuredOnly Gemini 3.5 Flash measured
Chess puzzles45.0%Not measuredOnly Gemini 3.5 Flash measured
Mystery game puzzles32.0%Not measuredOnly Gemini 3.5 Flash measured
EBR-bench4.8%Not measuredOnly Gemini 3.5 Flash measured
LMArena Text: hard prompts14881448Gemini 3.5 Flash
LMArena Text: expert14951464Gemini 3.5 Flash
LMArena Text: hard prompts in English14831456Gemini 3.5 Flash
LMArena Vision: diagrams13231283Gemini 3.5 Flash
LMArena Vision: homework13301310Gemini 3.5 Flash
Kagi LLM BenchmarkNot measured63.5%Only Gemma 4 31B measured
Neither model has a result on the other 4 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index30
Math benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
OTIS Mock AIME95.6%73.3%Gemini 3.5 Flash
FrontierMath, tiers 1 to 362.8%Not measuredOnly Gemini 3.5 Flash measured
FrontierMath, tier 426.8%Not measuredOnly Gemini 3.5 Flash measured
ProofBench31.0%Not measuredOnly Gemini 3.5 Flash measured
LMArena Text: math15041463Gemini 3.5 Flash
LMArena Text: mathematical work14951465Gemini 3.5 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.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
MMLU Pro89.5%Not measuredOnly Gemini 3.5 Flash measured
LegalBench (Vals AI)83.6%Not measuredOnly Gemini 3.5 Flash measured
CaseLaw (Vals AI)Not measured52.6%Only Gemma 4 31B measured
CorpFin (Vals AI)64.7%Not measuredOnly Gemini 3.5 Flash measured
TaxEval (Vals AI)74.4%Not measuredOnly Gemini 3.5 Flash measured
MortgageTax (Vals AI)68.1%61.4%Gemini 3.5 Flash
MedCode (Vals AI)55.8%Not measuredOnly Gemini 3.5 Flash measured
SimpleQA Verified66.2%10.4%Gemini 3.5 Flash
LMArena Text: science14951457Gemini 3.5 Flash
LMArena Text: medicine and healthcare14831451Gemini 3.5 Flash
LMArena Text: legal and government14881438Gemini 3.5 Flash
LMArena Text: business and finance14671430Gemini 3.5 Flash
FACTS Benchmark Suite63.1%45.3%Gemini 3.5 Flash
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
Web design benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
Design Arena: websites1268Not measuredOnly Gemini 3.5 Flash measured
Design Arena: UI components1273Not measuredOnly Gemini 3.5 Flash measured
Design Arena: game dev1263Not measuredOnly Gemini 3.5 Flash measured
Design Arena: data viz1236Not measuredOnly Gemini 3.5 Flash measured
Design Arena: 3D1244Not measuredOnly Gemini 3.5 Flash measured
Design Arena: all code categories1266Not measuredOnly Gemini 3.5 Flash measured
Design Arena: SVG1254Not measuredOnly Gemini 3.5 Flash measured
Design Arena: ASCII art1254Not measuredOnly Gemini 3.5 Flash measured
LiveBench designNot measured58.4%Only Gemma 4 31B measured
GeneralLike-for-likePublic boards, shown as published, kept out of the index261
General benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 FlashGemma 4 31BLeader
LiveBench data analysisNot measured53.3%Only Gemma 4 31B measured
Public Benefits Bench (Vals AI)59.5%Not measuredOnly Gemini 3.5 Flash measured
SAGE (Vals AI)49.9%55.0%Gemma 4 31B
MedScribe (Vals AI)76.6%Not measuredOnly Gemini 3.5 Flash measured
Vals Multimodal Index62.9%Not measuredOnly Gemini 3.5 Flash measured
IFBench76.3%75.6%Gemini 3.5 Flash
Long context reasoning (AA-LCR)74.3%69.7%Gemini 3.5 Flash
DTBench94.7%82.7%Gemini 3.5 Flash
LMCA47.1%39.3%Gemini 3.5 Flash
Surface Evolver Bench58.1%30.6%Gemini 3.5 Flash
LMArena Text14821443Gemini 3.5 Flash
LMArena Text: instruction following14671433Gemini 3.5 Flash
LMArena Text: creative writing14701417Gemini 3.5 Flash
LMArena Vision13081276Gemini 3.5 Flash
LMArena Text: English14811451Gemini 3.5 Flash
LMArena Text: non-English14751430Gemini 3.5 Flash
LMArena Text: Chinese15271475Gemini 3.5 Flash
LMArena Text: German1494Not measuredOnly Gemini 3.5 Flash measured
LMArena Text: Japanese1486Not measuredOnly Gemini 3.5 Flash measured
LMArena Text: Korean1448Not measuredOnly Gemini 3.5 Flash measured
LMArena Text: French14901436Gemini 3.5 Flash
LMArena Text: Spanish14801442Gemini 3.5 Flash
LMArena Text: Russian14931460Gemini 3.5 Flash
LMArena Text: Polish15161433Gemini 3.5 Flash
LMArena Text: multi-turn14811452Gemini 3.5 Flash
LMArena Text: longer queries14831446Gemini 3.5 Flash
LMArena Text: writing and language14781432Gemini 3.5 Flash
LMArena Text: entertainment and media14591405Gemini 3.5 Flash
LMArena Vision: English13051271Gemini 3.5 Flash
LMArena Vision: Chinese13771326Gemini 3.5 Flash
LMArena Vision: reading text13171282Gemini 3.5 Flash
LMArena Vision: humor13211280Gemini 3.5 Flash
LMArena Vision: captioningNot measured1218Only Gemma 4 31B measured
LMArena Vision: recognizing thingsNot measured1226Only Gemma 4 31B measured
LMArena Vision: creative writing13011285Gemini 3.5 Flash
LMArena Document14631425Gemini 3.5 Flash
Neither model has a result on the other 10 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Gemini 3.5 Flash and Gemma 4 31B
BenchmarkGemini 3.5 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.5 Flash$0.0060Fits 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.5 Flash$0.102Fits 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.5 Flash$0.390Fits 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.5 Flash and Gemma 4 31B
SpecificationGoogle Gemini 3.5 FlashGoogle Gemma 4 31B
MakerGoogleGoogle
WeightsNo public weights listedOpen weights
ReleasedMay 19, 2026April 2, 2026
Context window1.05M262K
Input $/Mtok$1.50$0.14
Output $/Mtok$9.00$0.40
Coding index39.839.0
Independent measurements behind it42
Cost per solved task$1.21Not computable
SourceOpenRouter listingOpenRouter listing

Questions

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

Gemini 3.5 Flash and Gemma 4 31B are level for coding, 39.8 against 39.0 on the Vibe Coding Index, so price and context decide. Pick Gemma 4 31B for output tokens 22.5x cheaper ($0.40 vs $9.00 per million) and work measured by ALE-Bench or SAGE (Vals AI), where it leads. Pick Gemini 3.5 Flash for a larger context window (1.05M against 262K tokens) and work measured by LMArena WebDev or SciCode, where it leads.

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

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

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

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

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

58 benchmarks have a result for both models as of October 21, 2026. Gemini 3.5 Flash'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.

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-5-flash-vs-gemma-4-31b-it" title="Gemini 3.5 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-5-flash-vs-gemma-4-31b-it">LLMBenchmark.ai, Gemini 3.5 Flash vs Gemma 4 31B</a></p>