Enter opens the highlighted result. Esc closes.

Gemma 4 31B vs GPT-5.2

Updated October 21, 2026. 56 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.

Gemma 4 31BGoogle
Coding
38.3
Overall
14.7
Output $/M
$0.40
35
GPT-5.2OpenAI
Coding
58.9
Overall
30.4
Output $/M
$14.00
21
vs boards won of 56 shared

Decision reading

Pick GPT-5.2 for coding: it scores 58.9 on the Vibe Coding Index against 38.3 for Gemma 4 31B.

Pick Gemma 4 31B when output tokens cost 35.0x less, or when what matters is LMArena Text: coding or LMArena Text: software and IT, where it leads.

Shared results
56
Gemma 4 31B only
12
GPT-5.2 only
55
Like-for-like categories
7 of 9

Shared results can support a head-to-head reading. Results only one model has describe coverage, not superiority.

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 38.3 from 2 benchmarks, GPT-5.2 58.9 from 2 benchmarks.
Widest category
Agentic work, 19.3 points apart on average over 1 shared benchmark.
Widest single gap
SimpleQA Verified: Gemma 4 31B 10.4% against GPT-5.2 37.1%, 26.7 points apart on a 0 to 100 scale.
Output price
Gemma 4 31B $0.40 against GPT-5.2 $14.00 per million output tokens, 35.0x apart.
Context window
Gemma 4 31B takes 262K tokens, GPT-5.2 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.2Ties
Coding25
Intelligence02
Agentic work01
Reasoning53
Math21
Knowledge43
General226
All shared boards3521
CodingLike-for-likeFour of these boards feed the Vibe Coding Index25
Coding benchmarks for Gemma 4 31B and GPT-5.2
BenchmarkGemma 4 31BGPT-5.2Leader
SWE-bench VerifiedNot measured72.8%Only GPT-5.2 measured
SWE-bench MultilingualNot measured66.7%Only GPT-5.2 measured
LiveBench coding49.0%Not measuredOnly Gemma 4 31B measured
LMArena WebDev13671417GPT-5.2
AA Coding Index43.4Not measuredOnly Gemma 4 31B measured
LiveCodeBench (Vals AI)Not measured85.4%Only GPT-5.2 measured
SWE-bench Verified (Vals AI)Not measured75.8%Only GPT-5.2 measured
Vibe Code Bench (Vals AI)Not measured53.5%Only GPT-5.2 measured
LiveCodeBench (Artificial Analysis run)Not measured89.4%Only GPT-5.2 measured
SciCode45.5%Not measuredOnly Gemma 4 31B measured
Terminal-Bench Hard (Artificial Analysis run)36.4%47.0%GPT-5.2
Terminal-BenchNot measured64.9%Only GPT-5.2 measured
GSO-BenchNot measured27.5%Only GPT-5.2 measured
WeirdML52.3%72.2%GPT-5.2
ALE-Bench925.51293.5GPT-5.2
LMArena Text: coding14591442Gemma 4 31B
LMArena Text: software and IT14631434Gemma 4 31B
LMArena WebDev: React1359Not measuredOnly Gemma 4 31B measured
LMArena WebDev: HTML13801427GPT-5.2
Neither model has a result on the other 19 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 4 31B and GPT-5.2
BenchmarkGemma 4 31BGPT-5.2Leader
AA Intelligence Index14.730.4GPT-5.2
Epoch Capabilities Index143.0153.7GPT-5.2
Agentic workLike-for-likePublic boards, shown as published, kept out of the index01
Agentic work benchmarks for Gemma 4 31B and GPT-5.2
BenchmarkGemma 4 31BGPT-5.2Leader
AA Agentic Index4.2Not measuredOnly Gemma 4 31B measured
Design Arena: agents building web appsNot measured1086Only GPT-5.2 measured
Design Arena: agents building full-stack appsNot measured1043Only GPT-5.2 measured
Design Arena: agents building mobile appsNot measured1094Only GPT-5.2 measured
Design Arena: agents building Android appsNot measured1064Only GPT-5.2 measured
Design Arena: agents building Godot gamesNot measured1142Only GPT-5.2 measured
LiveBench research44.4%Not measuredOnly Gemma 4 31B measured
LiveBench browser4.0%Not measuredOnly Gemma 4 31B measured
LiveBench long agentic13.3%Not measuredOnly Gemma 4 31B measured
τ²-Bench Telecom65.5%84.8%GPT-5.2
METR time horizonsNot measured75.3%Only GPT-5.2 measured
Remote Labor IndexNot measured2.5%Only GPT-5.2 measured
GDPvalNot measured49.7%Only GPT-5.2 measured
DeepResearch BenchNot measured41.1%Only GPT-5.2 measured
Vending-Bench 2Not measured$3,591Only GPT-5.2 measured
Neither model has a result on the other 24 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index53
Reasoning benchmarks for Gemma 4 31B and GPT-5.2
BenchmarkGemma 4 31BGPT-5.2Leader
GPQA DiamondNot measured91.7%Only GPT-5.2 measured
LiveBench reasoning68.3%Not measuredOnly Gemma 4 31B measured
MMMU Pro (Vals AI)Not measured86.7%Only GPT-5.2 measured
GPQA Diamond (Artificial Analysis run)85.7%90.3%GPT-5.2
Humanity's Last Exam (Artificial Analysis run)23.6%37.7%GPT-5.2
GPQA Diamond (Epoch AI run)75.8%91.4%GPT-5.2
ARC-AGINot measured86.2%Only GPT-5.2 measured
ARC-AGI-2Not measured52.9%Only GPT-5.2 measured
SimpleBenchNot measured45.8%Only GPT-5.2 measured
Chess puzzlesNot measured48.0%Only GPT-5.2 measured
Mystery game puzzlesNot measured23.0%Only GPT-5.2 measured
EBR-benchNot measured23.0%Only GPT-5.2 measured
VPCTNot measured84.0%Only GPT-5.2 measured
LMArena Text: hard prompts14481428Gemma 4 31B
LMArena Text: expert14641445Gemma 4 31B
LMArena Text: hard prompts in English14561431Gemma 4 31B
LMArena Vision: diagrams12831265Gemma 4 31B
LMArena Vision: homework13101276Gemma 4 31B
Neither model has a result on the other 3 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index21
Math benchmarks for Gemma 4 31B and GPT-5.2
BenchmarkGemma 4 31BGPT-5.2Leader
AIMENot measured96.9%Only GPT-5.2 measured
MGSM (Vals AI)Not measured94.0%Only GPT-5.2 measured
AA Math IndexNot measured99.0Only GPT-5.2 measured
AIME 2025 (Artificial Analysis run)Not measured99.0%Only GPT-5.2 measured
OTIS Mock AIME73.3%96.1%GPT-5.2
FrontierMath, tiers 1 to 3Not measured67.4%Only GPT-5.2 measured
FrontierMath, tier 4Not measured31.7%Only GPT-5.2 measured
ProofBenchNot measured15.0%Only GPT-5.2 measured
LMArena Text: math14631440Gemma 4 31B
LMArena Text: mathematical work14651442Gemma 4 31B
Neither model has a result on the other 3 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index43
Knowledge benchmarks for Gemma 4 31B and GPT-5.2
BenchmarkGemma 4 31BGPT-5.2Leader
MMLU ProNot measured86.2%Only GPT-5.2 measured
LegalBench (Vals AI)Not measured82.8%Only GPT-5.2 measured
CaseLaw (Vals AI)52.6%66.0%GPT-5.2
CorpFin (Vals AI)Not measured65.9%Only GPT-5.2 measured
TaxEval (Vals AI)Not measured75.8%Only GPT-5.2 measured
MortgageTax (Vals AI)61.4%67.1%GPT-5.2
MedQA (Vals AI)Not measured94.1%Only GPT-5.2 measured
MedCode (Vals AI)Not measured49.8%Only GPT-5.2 measured
MMLU Pro (Artificial Analysis run)Not measured87.4%Only GPT-5.2 measured
SimpleQA Verified10.4%37.1%GPT-5.2
LMArena Text: science14571425Gemma 4 31B
LMArena Text: medicine and healthcare14511425Gemma 4 31B
LMArena Text: legal and government14381427Gemma 4 31B
LMArena Text: business and finance14301414Gemma 4 31B
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.2
BenchmarkGemma 4 31BGPT-5.2Leader
Design Arena: websitesNot measured1196Only GPT-5.2 measured
Design Arena: UI componentsNot measured1190Only GPT-5.2 measured
Design Arena: game devNot measured1196Only GPT-5.2 measured
Design Arena: data vizNot measured1202Only GPT-5.2 measured
Design Arena: 3DNot measured1079Only GPT-5.2 measured
Design Arena: all code categoriesNot measured1171Only GPT-5.2 measured
Design Arena: SVGNot measured1137Only GPT-5.2 measured
Design Arena: ASCII artNot measured1153Only GPT-5.2 measured
LiveBench design58.4%Not measuredOnly Gemma 4 31B measured
GeneralLike-for-likePublic boards, shown as published, kept out of the index226
General benchmarks for Gemma 4 31B and GPT-5.2
BenchmarkGemma 4 31BGPT-5.2Leader
LiveBench data analysis53.3%Not measuredOnly Gemma 4 31B measured
SAGE (Vals AI)55.0%49.3%Gemma 4 31B
MedScribe (Vals AI)Not measured84.4%Only GPT-5.2 measured
IFBench75.6%75.4%Gemma 4 31B
Long context reasoning (AA-LCR)69.7%82.7%GPT-5.2
DTBench82.7%90.9%GPT-5.2
LMCA39.3%43.9%GPT-5.2
CL-benchNot measured18.2%Only GPT-5.2 measured
Surface Evolver Bench30.6%Not measuredOnly Gemma 4 31B measured
Furniture assemblyNot measured38.3%Only GPT-5.2 measured
LMArena Text14431416Gemma 4 31B
LMArena Text: instruction following14331409Gemma 4 31B
LMArena Text: creative writing14171376Gemma 4 31B
LMArena Vision12761246Gemma 4 31B
LMArena Text: English14511422Gemma 4 31B
LMArena Text: non-English14301405Gemma 4 31B
LMArena Text: Chinese14751447Gemma 4 31B
LMArena Text: GermanNot measured1444Only GPT-5.2 measured
LMArena Text: JapaneseNot measured1420Only GPT-5.2 measured
LMArena Text: KoreanNot measured1374Only GPT-5.2 measured
LMArena Text: French14361454GPT-5.2
LMArena Text: Spanish14421413Gemma 4 31B
LMArena Text: Russian14601415Gemma 4 31B
LMArena Text: Polish14331426Gemma 4 31B
LMArena Text: multi-turn14521419Gemma 4 31B
LMArena Text: longer queries14461413Gemma 4 31B
LMArena Text: writing and language14321392Gemma 4 31B
LMArena Text: entertainment and media14051378Gemma 4 31B
LMArena Vision: English12711243Gemma 4 31B
LMArena Vision: Chinese13261305Gemma 4 31B
LMArena Vision: reading text12821257Gemma 4 31B
LMArena Vision: humor12801227Gemma 4 31B
LMArena Vision: captioning12181267GPT-5.2
LMArena Vision: recognizing things12261232GPT-5.2
LMArena Vision: creative writing12851225Gemma 4 31B
LMArena Document14251405Gemma 4 31B
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.2
BenchmarkGemma 4 31BGPT-5.2Leader
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.0004Fits in one request
GPT-5.2$0.0088Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.011Fits in one request
GPT-5.2$0.130Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.044Fits in one request
GPT-5.2$0.490Fits 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.2
SpecificationGoogle Gemma 4 31BOpenAI GPT-5.2
MakerGoogleOpenAI
WeightsOpen weightsNo public weights listed
ReleasedApril 2, 2026December 10, 2025
Context window262K400K
Input $/Mtok$0.20$1.75
Output $/Mtok$0.40$14.00
Coding index38.358.9
Independent measurements behind it22
Cost per solved taskNot computable$1.91
SourceOpenRouter listingOpenRouter listing

Questions

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

Pick GPT-5.2 for coding: it scores 58.9 on the Vibe Coding Index against 38.3 for Gemma 4 31B. Pick Gemma 4 31B when output tokens cost 35.0x less, or when what matters is LMArena Text: coding or LMArena Text: software and IT, where it leads.

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

Gemma 4 31B costs $0.20 per million input tokens and $0.40 per million output tokens; GPT-5.2 costs $1.75 and $14.00. Cost per solved task is known for GPT-5.2 only.

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

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

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

56 benchmarks have a result for both models as of October 21, 2026. Gemma 4 31B's coding index rests on 2 independent benchmarks and GPT-5.2'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-2" title="Gemma 4 31B vs GPT-5.2, 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-2">LLMBenchmark.ai, Gemma 4 31B vs GPT-5.2</a></p>