Enter opens the highlighted result. Esc closes.

Gemma 4 31B vs GPT-5.1

GPT-5.1 leads Gemma 4 31B on coding, 53.2 to 22.0 on the Vibe Coding Index, and Gemma 4 31B costs 28.6x less per output token ($0.35 vs $10.00 per million). Updated December 6, 2026; 55 benchmarks have a result for both.

Gemma 4 31BGoogle
Coding
22.0
Overall
35.6
Output $/M
$0.35
21
GPT-5.1OpenAI
Coding
53.2
Overall
62.9
Output $/M
$10.00
33
vs boards won of 55 shared, 1 tied

Gemma 4 31B or GPT-5.1: which to pick

Pick GPT-5.1 for coding: it scores 53.2 on the Vibe Coding Index against 22.0 for Gemma 4 31B.

Pick Gemma 4 31B for output tokens 28.6x cheaper ($0.35 vs $10.00 per million) and work measured by LMArena Text: coding or LMArena Text: software and IT, where it leads.

Shared results
55
Gemma 4 31B only
22
GPT-5.1 only
48
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
Gemma 4 31B 22.0 from 2 benchmarks, GPT-5.1 53.2 from 2 benchmarks.
Widest category
Agentic work, 16.4 points apart on average over 1 shared benchmark.
Widest single gap
SimpleQA Verified: Gemma 4 31B 10.4% against GPT-5.1 48.0%, 37.6 points apart on a 0 to 100 scale.
Output price
Gemma 4 31B $0.35 against GPT-5.1 $10.00 per million output tokens, 28.6x apart.
Context window
Gemma 4 31B takes 262K tokens, GPT-5.1 400K.

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 31BBarsGPT-5.1Ties
Coding34
Intelligence01
Agentic work01
Reasoning26
Math21
Knowledge061 tie
General1414
All shared boards21331 tie
CodingLike-for-likeSix of these boards feed the Vibe Coding Index34
Coding benchmarks for Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
SWE-bench VerifiedNot measured66.0%Only GPT-5.1 measured
LiveBench coding20.3%Not measuredOnly Gemma 4 31B measured
LMArena WebDev13711397GPT-5.1
LiveCodeBench (Vals AI)Not measured86.5%Only GPT-5.1 measured
SWE-bench Verified (Vals AI)Not measured69.8%Only GPT-5.1 measured
LiveCodeBench (Artificial Analysis run)Not measured86.8%Only GPT-5.1 measured
SciCode45.5%Not measuredOnly Gemma 4 31B measured
Terminal-Bench Hard (Artificial Analysis run)36.4%45.5%GPT-5.1
Terminal-Bench 4.0 (Artificial Analysis run)0.0%Not measuredOnly Gemma 4 31B measured
FrontierCode 2.00.0%Not measuredOnly Gemma 4 31B measured
Terminal-BenchNot measured47.6%Only GPT-5.1 measured
GSO-BenchNot measured13.7%Only GPT-5.1 measured
WeirdML52.3%60.8%GPT-5.1
ALE-Bench925.5Not measuredOnly Gemma 4 31B measured
LMArena Text: coding14591453Gemma 4 31B
LMArena Text: software and IT14631454Gemma 4 31B
LMArena WebDev: React13631306Gemma 4 31B
LMArena WebDev: HTML13801406GPT-5.1
LMArena WebDev: from an imageNot measured1419Only GPT-5.1 measured
SciCode8.9%Not measuredOnly Gemma 4 31B measured
GameBench 234.9Not measuredOnly Gemma 4 31B measured
Terminal-Bench 2.0Not measured47.6%Only GPT-5.1 measured
Neither model has a result on the other 30 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index01
Intelligence benchmarks for Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
AA Intelligence Index4.0Not measuredOnly Gemma 4 31B measured
Epoch Capabilities Index144.1150.9GPT-5.1
Agentic workLike-for-likePublic boards, shown as published, kept out of the index01
Agentic work benchmarks for Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
LiveBench research38.1%Not measuredOnly Gemma 4 31B measured
LiveBench browser0.0%Not measuredOnly Gemma 4 31B measured
LiveBench long agentic8.5%Not measuredOnly Gemma 4 31B measured
τ²-Bench Telecom65.5%81.9%GPT-5.1
DeepResearch BenchNot measured42.8%Only GPT-5.1 measured
Vending-Bench 2Not measured$1,473Only GPT-5.1 measured
LMArena SearchNot measured1199Only GPT-5.1 measured
MCP AtlasNot measured50.1%Only GPT-5.1 measured
Neither model has a result on the other 36 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index26
Reasoning benchmarks for Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
GPQA DiamondNot measured86.6%Only GPT-5.1 measured
LiveBench reasoning68.3%Not measuredOnly Gemma 4 31B measured
MMMU Pro (Vals AI)Not measured83.2%Only GPT-5.1 measured
GPQA Diamond (Artificial Analysis run)85.7%87.3%GPT-5.1
Humanity's Last Exam (Artificial Analysis run)23.6%28.5%GPT-5.1
HLE-Diamond (Artificial Analysis run)7.2%Not measuredOnly Gemma 4 31B measured
CritPt v2, hard subset (Artificial Analysis run)4.0%Not measuredOnly Gemma 4 31B measured
GPQA Diamond (Epoch AI run)75.8%87.6%GPT-5.1
ARC-AGINot measured72.8%Only GPT-5.1 measured
ARC-AGI-2Not measured17.6%Only GPT-5.1 measured
SimpleBenchNot measured53.2%Only GPT-5.1 measured
Chess puzzlesNot measured42.0%Only GPT-5.1 measured
Mystery game puzzlesNot measured19.0%Only GPT-5.1 measured
VPCTNot measured58.7%Only GPT-5.1 measured
LMArena Text: hard prompts14481457GPT-5.1
LMArena Text: expert14651469GPT-5.1
LMArena Text: hard prompts in English14561462GPT-5.1
LMArena Vision: diagrams12871264Gemma 4 31B
LMArena Vision: homework13101274Gemma 4 31B
Kagi LLM Benchmark63.5%Not measuredOnly 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 index21
Math benchmarks for Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
AIMENot measured93.3%Only GPT-5.1 measured
MGSM (Vals AI)Not measured93.0%Only GPT-5.1 measured
AIME 2025 (Artificial Analysis run)Not measured94.0%Only GPT-5.1 measured
OTIS Mock AIME73.3%88.6%GPT-5.1
LMArena Text: math14631447Gemma 4 31B
LMArena Text: mathematical work14641450Gemma 4 31B
MathArenaNot measured16.0%Only GPT-5.1 measured
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 GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
MMLU ProNot measured86.4%Only GPT-5.1 measured
LegalBench (Vals AI)Not measured85.7%Only GPT-5.1 measured
CaseLaw (Vals AI)52.6%73.4%GPT-5.1
CorpFin (Vals AI)Not measured63.8%Only GPT-5.1 measured
TaxEval (Vals AI)Not measured74.9%Only GPT-5.1 measured
MortgageTax (Vals AI)61.4%61.4%Tie
MedQA (Vals AI)Not measured96.4%Only GPT-5.1 measured
MedCode (Vals AI)Not measured52.7%Only GPT-5.1 measured
MMLU Pro (Artificial Analysis run)Not measured87.0%Only GPT-5.1 measured
AA-Omniscience-48.5Not measuredOnly Gemma 4 31B measured
SimpleQA Verified10.4%48.0%GPT-5.1
LMArena Text: science14561459GPT-5.1
LMArena Text: medicine and healthcare14501456GPT-5.1
LMArena Text: legal and government14381459GPT-5.1
LMArena Text: business and finance14311431GPT-5.1
FACTS Benchmark Suite50.1%Not measuredOnly Gemma 4 31B measured
PRBench FinanceNot measured48.0%Only GPT-5.1 measured
PRBench LegalNot measured48.0%Only GPT-5.1 measured
Neither model has a result on the other 3 boards here
Web designDirectional onlyPublic boards, shown as published, kept out of the index9 boards, none shared
Web design benchmarks for Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
Design Arena: websitesNot measured1227Only GPT-5.1 measured
Design Arena: UI componentsNot measured1146Only GPT-5.1 measured
Design Arena: game devNot measured1149Only GPT-5.1 measured
Design Arena: data vizNot measured1198Only GPT-5.1 measured
Design Arena: 3DNot measured986Only GPT-5.1 measured
Design Arena: all code categoriesNot measured1210Only GPT-5.1 measured
Design Arena: SVGNot measured1190Only GPT-5.1 measured
Design Arena: ASCII artNot measured1096Only GPT-5.1 measured
LiveBench design56.5%Not measuredOnly Gemma 4 31B measured
GeneralLike-for-likePublic boards, shown as published, kept out of the index1414
General benchmarks for Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
LiveBench data analysis53.3%Not measuredOnly Gemma 4 31B measured
SAGE (Vals AI)82.8%Not measuredOnly Gemma 4 31B measured
MedScribe (Vals AI)Not measured88.1%Only GPT-5.1 measured
IFBench75.6%72.9%Gemma 4 31B
Long context reasoning (AA-LCR)69.7%80.0%GPT-5.1
GDPval-AA630837GPT-5.1
DTBench82.7%90.1%GPT-5.1
LMCA39.3%43.9%GPT-5.1
CL-benchNot measured23.7%Only GPT-5.1 measured
Surface Evolver Bench30.6%Not measuredOnly Gemma 4 31B measured
CL-bench LifeNot measured17.3%Only GPT-5.1 measured
LMArena Text14431442Gemma 4 31B
LMArena Text: instruction following14341442GPT-5.1
LMArena Text: creative writing14151427GPT-5.1
LMArena Vision12791249Gemma 4 31B
LMArena Text: English14511451Gemma 4 31B
LMArena Text: non-English14311431GPT-5.1
LMArena Text: Chinese14761495GPT-5.1
LMArena Text: GermanNot measured1438Only GPT-5.1 measured
LMArena Text: JapaneseNot measured1455Only GPT-5.1 measured
LMArena Text: KoreanNot measured1400Only GPT-5.1 measured
LMArena Text: French14351450GPT-5.1
LMArena Text: Spanish14441432Gemma 4 31B
LMArena Text: Russian14611435Gemma 4 31B
LMArena Text: Polish14311440GPT-5.1
LMArena Text: multi-turn14521450Gemma 4 31B
LMArena Text: longer queries14451447GPT-5.1
LMArena Text: writing and language14311428Gemma 4 31B
LMArena Text: entertainment and media14051414GPT-5.1
LMArena Vision: English12731251Gemma 4 31B
LMArena Vision: Chinese13281271Gemma 4 31B
LMArena Vision: reading text12851254Gemma 4 31B
LMArena Vision: humor12791264Gemma 4 31B
LMArena Vision: captioning12091252GPT-5.1
LMArena Vision: recognizing things12281232GPT-5.1
LMArena Vision: creative writing12871267Gemma 4 31B
LMArena Document14351403Gemma 4 31B
MultiChallengeNot measured63.4%Only GPT-5.1 measured
EQ-Bench 41110Not measuredOnly Gemma 4 31B measured
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 Gemma 4 31B and GPT-5.1
BenchmarkGemma 4 31BGPT-5.1Leader
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
GPT-5.1$0.0063Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.0079Fits in one request
GPT-5.1$0.092Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.031Fits in one request
GPT-5.1$0.350Fits 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 GPT-5.1
SpecificationGoogle Gemma 4 31BOpenAI GPT-5.1
MakerGoogleOpenAI
WeightsOpen weightsNo public weights listed
ReleasedApril 2, 2026November 13, 2025
Context window262K400K
Input $/Mtok$0.1375$1.25
Output $/Mtok$0.35$10.00
Coding index22.053.2
Independent measurements behind it22
Cost per solved taskNot computable$1.02
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 4 31B better than GPT-5.1 for coding?

Pick GPT-5.1 for coding: it scores 53.2 on the Vibe Coding Index against 22.0 for Gemma 4 31B. Pick Gemma 4 31B for output tokens 28.6x cheaper ($0.35 vs $10.00 per million) and work measured by LMArena Text: coding or LMArena Text: software and IT, where it leads.

Which is cheaper, Gemma 4 31B or GPT-5.1?

Gemma 4 31B costs $0.1375 per million input tokens and $0.35 per million output tokens; GPT-5.1 costs $1.25 and $10.00. Cost per solved task is known for GPT-5.1 only.

Which has the bigger context window, Gemma 4 31B or GPT-5.1?

GPT-5.1, with 400K tokens against 262K.

How many benchmarks is the Gemma 4 31B vs GPT-5.1 comparison based on?

55 benchmarks have a result for both models as of December 6, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and GPT-5.1'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/gemma-4-31b-it-vs-gpt-5-1" title="Gemma 4 31B vs GPT-5.1, 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-gpt-5-1">LLMBenchmark.ai, Gemma 4 31B vs GPT-5.1</a></p>