Enter opens the highlighted result. Esc closes.

Gemini 3.8 Flash vs Gemma 4 31B

Gemini 3.8 Flash leads Gemma 4 31B on coding, 61.6 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 21, 2026; 63 benchmarks have a result for both.

Gemini 3.8 FlashGoogle
Coding
61.6
Overall
69.0
Output $/M
$3.75
62
Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
1
vs boards won of 63 shared

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

Pick Gemini 3.8 Flash for coding: it scores 61.6 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 SAGE (Vals AI), where it leads.

Shared results
63
Gemini 3.8 Flash only
65
Gemma 4 31B only
8
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.8 Flash 61.6 from 6 benchmarks, Gemma 4 31B 39.0 from 2 benchmarks.
Widest category
Agentic work, 36.9 points apart on average over 4 shared benchmarks.
Widest single gap
LiveBench browser: Gemini 3.8 Flash 64.0% against Gemma 4 31B 4.0%, 60.0 points apart on a 0 to 100 scale.
Output price
Gemini 3.8 Flash $3.75 against Gemma 4 31B $0.40 per million output tokens, 9.4x apart.
Context window
Gemini 3.8 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.8 FlashBarsGemma 4 31BTies
Coding110
Intelligence20
Agentic work40
Reasoning90
Math30
Knowledge70
Web design10
General251
All shared boards621
CodingLike-for-likeSix of these boards feed the Vibe Coding Index110
Coding benchmarks for Gemini 3.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
LiveBench coding82.2%49.0%Gemini 3.8 Flash
LMArena WebDev15851367Gemini 3.8 Flash
AA Coding Index76.343.4Gemini 3.8 Flash
LiveCodeBench (Vals AI)89.5%Not measuredOnly Gemini 3.8 Flash measured
SWE-bench Verified (Vals AI)80.0%Not measuredOnly Gemini 3.8 Flash measured
Terminal-Bench 4 (Vals AI)19.7%Not measuredOnly Gemini 3.8 Flash measured
Vibe Code Bench (Vals AI)78.7%Not measuredOnly Gemini 3.8 Flash measured
Code migration (Vals AI)36.5%Not measuredOnly Gemini 3.8 Flash measured
ProgramBench (Vals AI)1.0%Not measuredOnly Gemini 3.8 Flash measured
IOI (Vals AI)56.9%Not measuredOnly Gemini 3.8 Flash measured
Terminal-Bench 2.1 (Vals AI)81.3%Not measuredOnly Gemini 3.8 Flash measured
SWE-bench Multimodal (Vals AI)40.8%Not measuredOnly Gemini 3.8 Flash measured
Vibe Code Bench 1-100 (Vals AI)18.8%Not measuredOnly Gemini 3.8 Flash measured
SkillsBench (Vals AI)58.0%Not measuredOnly Gemini 3.8 Flash measured
CyberBench (Vals AI)43.8%Not measuredOnly Gemini 3.8 Flash measured
SciCode56.6%45.5%Gemini 3.8 Flash
Terminal-Bench Hard (Artificial Analysis run)Not measured36.4%Only Gemma 4 31B measured
FrontierCode41.2%Not measuredOnly Gemini 3.8 Flash measured
FrontierSWE19.6%Not measuredOnly Gemini 3.8 Flash measured
WeirdML84.8%52.3%Gemini 3.8 Flash
ALE-Bench1269.7925.5Gemini 3.8 Flash
LMArena Text: coding15081459Gemini 3.8 Flash
LMArena Text: software and IT15071463Gemini 3.8 Flash
LMArena WebDev: React15771359Gemini 3.8 Flash
LMArena WebDev: HTML16161380Gemini 3.8 Flash
LMArena WebDev: from an image1593Not measuredOnly Gemini 3.8 Flash measured
SciCode12.3%8.9%Gemini 3.8 Flash
Neither model has a result on the other 12 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index20
Intelligence benchmarks for Gemini 3.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
AA Intelligence Index40.914.7Gemini 3.8 Flash
Epoch Capabilities Index157.4143.0Gemini 3.8 Flash
Agentic workLike-for-likePublic boards, shown as published, kept out of the index40
Agentic work benchmarks for Gemini 3.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
AA Agentic Index40.24.2Gemini 3.8 Flash
Design Arena: agents building web apps1238Not measuredOnly Gemini 3.8 Flash measured
Design Arena: agents building full-stack apps1244Not measuredOnly Gemini 3.8 Flash measured
Design Arena: agents building mobile apps1236Not measuredOnly Gemini 3.8 Flash measured
Design Arena: agents building Android apps1074Not measuredOnly Gemini 3.8 Flash measured
Design Arena: agents building Godot games1273Not measuredOnly Gemini 3.8 Flash measured
Design Arena: PowerPoint slides1177Not measuredOnly Gemini 3.8 Flash measured
Design Arena: spreadsheets1056Not measuredOnly Gemini 3.8 Flash measured
LiveBench research79.1%44.4%Gemini 3.8 Flash
LiveBench browser64.0%4.0%Gemini 3.8 Flash
LiveBench long agentic30.1%13.3%Gemini 3.8 Flash
SREBench (Vals AI)11.1%Not measuredOnly Gemini 3.8 Flash measured
Finance Agent (Vals AI)61.4%Not measuredOnly Gemini 3.8 Flash measured
Tax Agent Bench (Vals AI)32.1%Not measuredOnly Gemini 3.8 Flash measured
Legal Research Bench (Vals AI)38.9%Not measuredOnly Gemini 3.8 Flash measured
Harvey's Legal Agent Benchmark (Vals AI)12.1%Not measuredOnly Gemini 3.8 Flash measured
Excel Modeling Benchmark (Vals AI)72.2%Not measuredOnly Gemini 3.8 Flash measured
BioMysteryBench (Vals AI)62.2%Not measuredOnly Gemini 3.8 Flash measured
Terminal-Bench-Science (Vals AI)8.6%Not measuredOnly Gemini 3.8 Flash measured
Vals Science Index35.8%Not measuredOnly Gemini 3.8 Flash measured
Time Horizon Index (Vals AI)18.8%Not measuredOnly Gemini 3.8 Flash measured
CUA-bench (Vals AI)4.2%Not measuredOnly Gemini 3.8 Flash measured
τ²-Bench TelecomNot measured65.5%Only Gemma 4 31B measured
APEX-Agents64.3%Not measuredOnly Gemini 3.8 Flash measured
Remote Labor Index5.8%Not measuredOnly Gemini 3.8 Flash measured
Vending-Bench 2$5,094Not measuredOnly Gemini 3.8 Flash measured
Neither model has a result on the other 15 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index90
Reasoning benchmarks for Gemini 3.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
GPQA Diamond94.4%Not measuredOnly Gemini 3.8 Flash measured
LiveBench reasoning89.3%68.3%Gemini 3.8 Flash
MysteryMechanism (Vals AI)36.5%Not measuredOnly Gemini 3.8 Flash measured
MMMU Pro (Vals AI)89.1%Not measuredOnly Gemini 3.8 Flash measured
GPQA Diamond (Artificial Analysis run)95.3%85.7%Gemini 3.8 Flash
Humanity's Last Exam (Artificial Analysis run)47.8%23.6%Gemini 3.8 Flash
GPQA Diamond (Epoch AI run)95.4%75.8%Gemini 3.8 Flash
ARC-AGI98.5%Not measuredOnly Gemini 3.8 Flash measured
ARC-AGI-289.2%Not measuredOnly Gemini 3.8 Flash measured
Chess puzzles58.0%Not measuredOnly Gemini 3.8 Flash measured
Mystery game puzzles47.0%Not measuredOnly Gemini 3.8 Flash measured
LMArena Text: hard prompts15091448Gemini 3.8 Flash
LMArena Text: expert15261464Gemini 3.8 Flash
LMArena Text: hard prompts in English15041456Gemini 3.8 Flash
LMArena Vision: diagrams13451283Gemini 3.8 Flash
LMArena Vision: homework13511310Gemini 3.8 Flash
Kagi LLM BenchmarkNot measured63.5%Only Gemma 4 31B measured
Neither model has a result on the other 5 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index30
Math benchmarks for Gemini 3.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
OTIS Mock AIME98.9%73.3%Gemini 3.8 Flash
FrontierMath, tiers 1 to 368.4%Not measuredOnly Gemini 3.8 Flash measured
FrontierMath, tier 422.0%Not measuredOnly Gemini 3.8 Flash measured
ProofBench48.0%Not measuredOnly Gemini 3.8 Flash measured
LMArena Text: math15321463Gemini 3.8 Flash
LMArena Text: mathematical work15191465Gemini 3.8 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.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
MMLU Pro90.2%Not measuredOnly Gemini 3.8 Flash measured
LegalBench (Vals AI)87.0%Not measuredOnly Gemini 3.8 Flash measured
CaseLaw (Vals AI)Not measured52.6%Only Gemma 4 31B measured
TaxEval (Vals AI)74.5%Not measuredOnly Gemini 3.8 Flash measured
MortgageTax (Vals AI)65.3%61.4%Gemini 3.8 Flash
MedCode (Vals AI)48.1%Not measuredOnly Gemini 3.8 Flash measured
SimpleQA Verified69.7%10.4%Gemini 3.8 Flash
LMArena Text: science15231457Gemini 3.8 Flash
LMArena Text: medicine and healthcare15081451Gemini 3.8 Flash
LMArena Text: legal and government14971438Gemini 3.8 Flash
LMArena Text: business and finance14791430Gemini 3.8 Flash
FACTS Benchmark Suite69.4%45.3%Gemini 3.8 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.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
Design Arena: websites1300Not measuredOnly Gemini 3.8 Flash measured
Design Arena: UI components1319Not measuredOnly Gemini 3.8 Flash measured
Design Arena: game dev1305Not measuredOnly Gemini 3.8 Flash measured
Design Arena: data viz1269Not measuredOnly Gemini 3.8 Flash measured
Design Arena: 3D1295Not measuredOnly Gemini 3.8 Flash measured
Design Arena: all code categories1304Not measuredOnly Gemini 3.8 Flash measured
Design Arena: SVG1295Not measuredOnly Gemini 3.8 Flash measured
Design Arena: ASCII art1265Not measuredOnly Gemini 3.8 Flash measured
LiveBench design72.7%58.4%Gemini 3.8 Flash
GeneralLike-for-likePublic boards, shown as published, kept out of the index251
General benchmarks for Gemini 3.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 FlashGemma 4 31BLeader
Vals Index56.0%Not measuredOnly Gemini 3.8 Flash measured
LiveBench data analysis54.0%53.3%Gemini 3.8 Flash
Public Benefits Bench (Vals AI)65.3%Not measuredOnly Gemini 3.8 Flash measured
SAGE (Vals AI)35.1%55.0%Gemma 4 31B
MedScribe (Vals AI)84.5%Not measuredOnly Gemini 3.8 Flash measured
IFBenchNot measured75.6%Only Gemma 4 31B measured
Long context reasoning (AA-LCR)84.0%69.7%Gemini 3.8 Flash
DTBench95.7%82.7%Gemini 3.8 Flash
LMCA52.9%39.3%Gemini 3.8 Flash
Surface Evolver Bench76.9%30.6%Gemini 3.8 Flash
Furniture assembly31.7%Not measuredOnly Gemini 3.8 Flash measured
LMArena Text14991443Gemini 3.8 Flash
LMArena Text: instruction following14921433Gemini 3.8 Flash
LMArena Text: creative writing14881417Gemini 3.8 Flash
LMArena Vision13151276Gemini 3.8 Flash
LMArena Text: English14981451Gemini 3.8 Flash
LMArena Text: non-English14911430Gemini 3.8 Flash
LMArena Text: Chinese15531475Gemini 3.8 Flash
LMArena Text: German1501Not measuredOnly Gemini 3.8 Flash measured
LMArena Text: Japanese1507Not measuredOnly Gemini 3.8 Flash measured
LMArena Text: Korean1464Not measuredOnly Gemini 3.8 Flash measured
LMArena Text: French14961436Gemini 3.8 Flash
LMArena Text: Spanish14871442Gemini 3.8 Flash
LMArena Text: Russian15141460Gemini 3.8 Flash
LMArena Text: Polish14971433Gemini 3.8 Flash
LMArena Text: multi-turn15031452Gemini 3.8 Flash
LMArena Text: longer queries15071446Gemini 3.8 Flash
LMArena Text: writing and language14941432Gemini 3.8 Flash
LMArena Text: entertainment and media14801405Gemini 3.8 Flash
LMArena Vision: English13181271Gemini 3.8 Flash
LMArena Vision: Chinese14161326Gemini 3.8 Flash
LMArena Vision: reading text13331282Gemini 3.8 Flash
LMArena Vision: humor13211280Gemini 3.8 Flash
LMArena Vision: captioningNot measured1218Only Gemma 4 31B measured
LMArena Vision: recognizing thingsNot measured1226Only Gemma 4 31B measured
LMArena Vision: creative writing12991285Gemini 3.8 Flash
LMArena DocumentNot measured1425Only Gemma 4 31B measured
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
Image generation benchmarks for Gemini 3.8 Flash and Gemma 4 31B
BenchmarkGemini 3.8 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.8 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.8 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.8 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.8 Flash and Gemma 4 31B
SpecificationGoogle Gemini 3.8 FlashGoogle Gemma 4 31B
MakerGoogleGoogle
WeightsNo public weights listedOpen weights
ReleasedSeptember 2, 2026April 2, 2026
Context window1.05M262K
Input $/Mtok$0.75$0.14
Output $/Mtok$3.75$0.40
Coding index61.639.0
Independent measurements behind it62
Cost per solved task$2.74Not computable
SourceOpenRouter listingOpenRouter listing

Questions

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

Pick Gemini 3.8 Flash for coding: it scores 61.6 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 SAGE (Vals AI), where it leads.

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

Gemini 3.8 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.8 Flash only.

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

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

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

63 benchmarks have a result for both models as of October 21, 2026. Gemini 3.8 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-8-flash-vs-gemma-4-31b-it" title="Gemini 3.8 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-8-flash-vs-gemma-4-31b-it">LLMBenchmark.ai, Gemini 3.8 Flash vs Gemma 4 31B</a></p>