Enter opens the highlighted result. Esc closes.

Gemma 4 31B vs Qwen3.8 Max (0902)

Qwen3.8 Max (0902) leads Gemma 4 31B on coding, 62.4 to 39.0 on the Vibe Coding Index, and Gemma 4 31B costs 15.0x less per output token ($0.40 vs $6.00 per million). Updated October 22, 2026; 58 benchmarks have a result for both.

Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
1
Qwen3.8 Max (0902)Qwen
Coding
62.4
Overall
68.9
Output $/M
$6.00
57
vs boards won of 58 shared

Gemma 4 31B or Qwen3.8 Max (0902): which to pick

Pick Qwen3.8 Max (0902) for coding: it scores 62.4 on the Vibe Coding Index against 39.0 for Gemma 4 31B.

Pick Gemma 4 31B for output tokens 15.0x cheaper ($0.40 vs $6.00 per million) and work measured by SAGE (Vals AI), where it leads.

Shared results
58
Gemma 4 31B only
13
Qwen3.8 Max (0902) only
55
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
Gemma 4 31B 39.0 from 2 benchmarks, Qwen3.8 Max (0902) 62.4 from 5 benchmarks.
Widest category
Agentic work, 33.6 points apart on average over 4 shared benchmarks.
Widest single gap
AA Agentic Index: Gemma 4 31B 4.2 against Qwen3.8 Max (0902) 56.0, 51.8 points apart on a 0 to 100 scale.
Output price
Gemma 4 31B $0.40 against Qwen3.8 Max (0902) $6.00 per million output tokens, 15.0x apart.
Context window
Gemma 4 31B takes 262K tokens, Qwen3.8 Max (0902) 1M.

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
CategoryGemma 4 31BBarsQwen3.8 Max (0902)Ties
Coding08
Intelligence02
Agentic work04
Reasoning09
Math03
Knowledge06
Web design01
General124
All shared boards157
CodingLike-for-likeSix of these boards feed the Vibe Coding Index08
Coding benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
LiveBench coding49.0%60.3%Qwen3.8 Max (0902)
LMArena WebDev13671674Qwen3.8 Max (0902)
AA Coding Index43.476.2Qwen3.8 Max (0902)
LiveCodeBench (Vals AI)Not measured87.8%Only Qwen3.8 Max (0902) measured
SWE-bench Verified (Vals AI)Not measured85.6%Only Qwen3.8 Max (0902) measured
Terminal-Bench 4 (Vals AI)Not measured34.3%Only Qwen3.8 Max (0902) measured
Vibe Code Bench (Vals AI)Not measured64.7%Only Qwen3.8 Max (0902) measured
Code migration (Vals AI)Not measured24.0%Only Qwen3.8 Max (0902) measured
ProgramBench (Vals AI)Not measured0.0%Only Qwen3.8 Max (0902) measured
IOI (Vals AI)Not measured68.9%Only Qwen3.8 Max (0902) measured
Terminal-Bench 2.1 (Vals AI)Not measured67.4%Only Qwen3.8 Max (0902) measured
SWE-bench Multimodal (Vals AI)Not measured42.5%Only Qwen3.8 Max (0902) measured
Vibe Code Bench 1-100 (Vals AI)Not measured12.8%Only Qwen3.8 Max (0902) measured
SkillsBench (Vals AI)Not measured42.0%Only Qwen3.8 Max (0902) measured
CyberBench (Vals AI)Not measured28.6%Only Qwen3.8 Max (0902) measured
SciCode45.5%53.2%Qwen3.8 Max (0902)
Terminal-Bench Hard (Artificial Analysis run)36.4%Not measuredOnly Gemma 4 31B measured
FrontierSWENot measured17.8%Only Qwen3.8 Max (0902) measured
WeirdML52.3%Not measuredOnly Gemma 4 31B measured
ALE-Bench925.5Not measuredOnly Gemma 4 31B measured
LMArena Text: coding14591502Qwen3.8 Max (0902)
LMArena Text: software and IT14631498Qwen3.8 Max (0902)
LMArena WebDev: React13591692Qwen3.8 Max (0902)
LMArena WebDev: HTML13801649Qwen3.8 Max (0902)
LMArena WebDev: from an imageNot measured1637Only Qwen3.8 Max (0902) measured
SciCode8.9%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 13 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
AA Intelligence Index14.745.4Qwen3.8 Max (0902)
Epoch Capabilities Index143.0157.4Qwen3.8 Max (0902)
Agentic workLike-for-likePublic boards, shown as published, kept out of the index04
Agentic work benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
AA Agentic Index4.256.0Qwen3.8 Max (0902)
Design Arena: agents building web appsNot measured1300Only Qwen3.8 Max (0902) measured
Design Arena: agents building full-stack appsNot measured1305Only Qwen3.8 Max (0902) measured
Design Arena: agents building mobile appsNot measured1224Only Qwen3.8 Max (0902) measured
Design Arena: agents building Android appsNot measured1196Only Qwen3.8 Max (0902) measured
Design Arena: agents building Godot gamesNot measured1234Only Qwen3.8 Max (0902) measured
Design Arena: PowerPoint slidesNot measured1233Only Qwen3.8 Max (0902) measured
Design Arena: spreadsheetsNot measured967Only Qwen3.8 Max (0902) measured
LiveBench research44.4%69.9%Qwen3.8 Max (0902)
LiveBench browser4.0%32.0%Qwen3.8 Max (0902)
LiveBench long agentic13.3%42.3%Qwen3.8 Max (0902)
Finance Agent (Vals AI)Not measured50.6%Only Qwen3.8 Max (0902) measured
Tax Agent Bench (Vals AI)Not measured32.1%Only Qwen3.8 Max (0902) measured
Legal Research Bench (Vals AI)Not measured47.6%Only Qwen3.8 Max (0902) measured
Excel Modeling Benchmark (Vals AI)Not measured60.1%Only Qwen3.8 Max (0902) measured
Terminal-Bench-Science (Vals AI)Not measured12.9%Only Qwen3.8 Max (0902) measured
τ²-Bench Telecom65.5%Not measuredOnly Gemma 4 31B measured
APEX-AgentsNot measured63.3%Only Qwen3.8 Max (0902) measured
LMArena SearchNot measured1261Only Qwen3.8 Max (0902) measured
Neither model has a result on the other 22 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index09
Reasoning benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
GPQA DiamondNot measured93.7%Only Qwen3.8 Max (0902) measured
LiveBench reasoning68.3%88.2%Qwen3.8 Max (0902)
MysteryMechanism (Vals AI)Not measured23.9%Only Qwen3.8 Max (0902) measured
MMMU Pro (Vals AI)Not measured88.0%Only Qwen3.8 Max (0902) measured
GPQA Diamond (Artificial Analysis run)85.7%92.8%Qwen3.8 Max (0902)
Humanity's Last Exam (Artificial Analysis run)23.6%43.1%Qwen3.8 Max (0902)
GPQA Diamond (Epoch AI run)75.8%92.7%Qwen3.8 Max (0902)
Chess puzzlesNot measured46.0%Only Qwen3.8 Max (0902) measured
Mystery game puzzlesNot measured38.0%Only Qwen3.8 Max (0902) measured
LMArena Text: hard prompts14481496Qwen3.8 Max (0902)
LMArena Text: expert14641507Qwen3.8 Max (0902)
LMArena Text: hard prompts in English14561503Qwen3.8 Max (0902)
LMArena Vision: diagrams12831323Qwen3.8 Max (0902)
LMArena Vision: homework13101336Qwen3.8 Max (0902)
Kagi LLM Benchmark63.5%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 7 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index03
Math benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
OTIS Mock AIME73.3%100.0%Qwen3.8 Max (0902)
FrontierMath, tiers 1 to 3Not measured74.7%Only Qwen3.8 Max (0902) measured
FrontierMath, tier 4Not measured46.3%Only Qwen3.8 Max (0902) measured
ProofBenchNot measured58.0%Only Qwen3.8 Max (0902) measured
LMArena Text: math14631501Qwen3.8 Max (0902)
LMArena Text: mathematical work14651491Qwen3.8 Max (0902)
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index06
Knowledge benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
MMLU ProNot measured88.6%Only Qwen3.8 Max (0902) measured
LegalBench (Vals AI)Not measured83.6%Only Qwen3.8 Max (0902) measured
CaseLaw (Vals AI)52.6%Not measuredOnly Gemma 4 31B measured
CorpFin (Vals AI)Not measured65.8%Only Qwen3.8 Max (0902) measured
TaxEval (Vals AI)Not measured75.5%Only Qwen3.8 Max (0902) measured
MortgageTax (Vals AI)61.4%64.0%Qwen3.8 Max (0902)
MedCode (Vals AI)Not measured40.7%Only Qwen3.8 Max (0902) measured
SimpleQA Verified10.4%47.3%Qwen3.8 Max (0902)
LMArena Text: science14571512Qwen3.8 Max (0902)
LMArena Text: medicine and healthcare14511503Qwen3.8 Max (0902)
LMArena Text: legal and government14381492Qwen3.8 Max (0902)
LMArena Text: business and finance14301480Qwen3.8 Max (0902)
FACTS Benchmark Suite45.3%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 5 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index01
Web design benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
Design Arena: websitesNot measured1275Only Qwen3.8 Max (0902) measured
Design Arena: UI componentsNot measured1338Only Qwen3.8 Max (0902) measured
Design Arena: game devNot measured1312Only Qwen3.8 Max (0902) measured
Design Arena: data vizNot measured1281Only Qwen3.8 Max (0902) measured
Design Arena: 3DNot measured1336Only Qwen3.8 Max (0902) measured
Design Arena: all code categoriesNot measured1293Only Qwen3.8 Max (0902) measured
Design Arena: ASCII artNot measured1200Only Qwen3.8 Max (0902) measured
LiveBench design58.4%78.6%Qwen3.8 Max (0902)
Neither model has a result on the other 1 board here
GeneralLike-for-likePublic boards, shown as published, kept out of the index124
General benchmarks for Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)Leader
LiveBench data analysis53.3%78.4%Qwen3.8 Max (0902)
Public Benefits Bench (Vals AI)Not measured67.1%Only Qwen3.8 Max (0902) measured
SAGE (Vals AI)55.0%51.2%Gemma 4 31B
MedScribe (Vals AI)Not measured85.0%Only Qwen3.8 Max (0902) measured
Vals Multimodal IndexNot measured65.4%Only Qwen3.8 Max (0902) measured
IFBench75.6%Not measuredOnly Gemma 4 31B measured
Long context reasoning (AA-LCR)69.7%80.3%Qwen3.8 Max (0902)
DTBench82.7%92.0%Qwen3.8 Max (0902)
LMCA39.3%46.2%Qwen3.8 Max (0902)
Surface Evolver Bench30.6%Not measuredOnly Gemma 4 31B measured
Furniture assemblyNot measured20.0%Only Qwen3.8 Max (0902) measured
LMArena Text14431483Qwen3.8 Max (0902)
LMArena Text: instruction following14331481Qwen3.8 Max (0902)
LMArena Text: creative writing14171477Qwen3.8 Max (0902)
LMArena Vision12761313Qwen3.8 Max (0902)
LMArena Text: English14511491Qwen3.8 Max (0902)
LMArena Text: non-English14301473Qwen3.8 Max (0902)
LMArena Text: Chinese14751539Qwen3.8 Max (0902)
LMArena Text: GermanNot measured1478Only Qwen3.8 Max (0902) measured
LMArena Text: JapaneseNot measured1473Only Qwen3.8 Max (0902) measured
LMArena Text: KoreanNot measured1460Only Qwen3.8 Max (0902) measured
LMArena Text: French14361498Qwen3.8 Max (0902)
LMArena Text: Spanish14421489Qwen3.8 Max (0902)
LMArena Text: Russian14601482Qwen3.8 Max (0902)
LMArena Text: Polish14331471Qwen3.8 Max (0902)
LMArena Text: multi-turn14521489Qwen3.8 Max (0902)
LMArena Text: longer queries14461488Qwen3.8 Max (0902)
LMArena Text: writing and language14321477Qwen3.8 Max (0902)
LMArena Text: entertainment and media14051464Qwen3.8 Max (0902)
LMArena Vision: English12711311Qwen3.8 Max (0902)
LMArena Vision: Chinese13261358Qwen3.8 Max (0902)
LMArena Vision: reading text12821322Qwen3.8 Max (0902)
LMArena Vision: humor12801304Qwen3.8 Max (0902)
LMArena Vision: captioning1218Not measuredOnly Gemma 4 31B measured
LMArena Vision: recognizing things1226Not measuredOnly Gemma 4 31B measured
LMArena Vision: creative writing12851312Qwen3.8 Max (0902)
LMArena Document1425Not measuredOnly 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 Gemma 4 31B and Qwen3.8 Max (0902)
BenchmarkGemma 4 31BQwen3.8 Max (0902)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$0.0003Fits in one request
Qwen3.8 Max (0902)$0.0050Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.0082Fits in one request
Qwen3.8 Max (0902)$0.118Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.032Fits in one request
Qwen3.8 Max (0902)$0.460Fits 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 Gemma 4 31B and Qwen3.8 Max (0902)
SpecificationGoogle Gemma 4 31BQwen3.8 Max (0902)
MakerGoogleQwen
WeightsOpen weightsNo public weights listed
ReleasedApril 2, 2026September 3, 2026
Context window262K1M
Input $/Mtok$0.14$2.00
Output $/Mtok$0.40$6.00
Coding index39.062.4
Independent measurements behind it25
Cost per solved taskNot computable$1.32
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 4 31B better than Qwen3.8 Max (0902) for coding?

Pick Qwen3.8 Max (0902) for coding: it scores 62.4 on the Vibe Coding Index against 39.0 for Gemma 4 31B. Pick Gemma 4 31B for output tokens 15.0x cheaper ($0.40 vs $6.00 per million) and work measured by SAGE (Vals AI), where it leads.

Which is cheaper, Gemma 4 31B or Qwen3.8 Max (0902)?

Gemma 4 31B costs $0.14 per million input tokens and $0.40 per million output tokens; Qwen3.8 Max (0902) costs $2.00 and $6.00. Cost per solved task is known for Qwen3.8 Max (0902) only.

Which has the bigger context window, Gemma 4 31B or Qwen3.8 Max (0902)?

Qwen3.8 Max (0902), with 1M tokens against 262K.

How many benchmarks is the Gemma 4 31B vs Qwen3.8 Max (0902) comparison based on?

58 benchmarks have a result for both models as of October 22, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and Qwen3.8 Max (0902)'s on 5. 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/gemma-4-31b-it-vs-qwen3-8-max-0902" title="Gemma 4 31B vs Qwen3.8 Max (0902), 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/gemma-4-31b-it-vs-qwen3-8-max-0902">LLMBenchmark.ai, Gemma 4 31B vs Qwen3.8 Max (0902)</a></p>