Enter opens the highlighted result. Esc closes.

Gemma 4 31B vs GPT-5.4

GPT-5.4 leads Gemma 4 31B on coding, 64.4 to 39.0 on the Vibe Coding Index, and Gemma 4 31B costs 37.5x less per output token ($0.40 vs $15.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
3
GPT-5.4OpenAI
Coding
64.4
Overall
69.6
Output $/M
$15.00
55
vs boards won of 58 shared

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

Pick GPT-5.4 for coding: it scores 64.4 on the Vibe Coding Index against 39.0 for Gemma 4 31B.

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

Shared results
58
Gemma 4 31B only
13
GPT-5.4 only
52
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 39.0 from 2 benchmarks, GPT-5.4 64.4 from 3 benchmarks.
Widest category
Agentic work, 21.6 points apart on average over 1 shared benchmark.
Widest single gap
SimpleQA Verified: Gemma 4 31B 10.4% against GPT-5.4 45.1%, 34.7 points apart on a 0 to 100 scale.
Output price
Gemma 4 31B $0.40 against GPT-5.4 $15.00 per million output tokens, 37.5x apart.
Context window
Gemma 4 31B takes 262K tokens, GPT-5.4 1.05M.

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.4Ties
Coding09
Intelligence02
Agentic work01
Reasoning09
Math03
Knowledge07
General324
All shared boards355
CodingLike-for-likeSix of these boards feed the Vibe Coding Index09
Coding benchmarks for Gemma 4 31B and GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
LiveBench coding49.0%Not measuredOnly Gemma 4 31B measured
LMArena WebDev13671464GPT-5.4
AA Coding Index43.471.1GPT-5.4
LiveCodeBench (Vals AI)Not measured84.1%Only GPT-5.4 measured
SWE-bench Verified (Vals AI)Not measured78.2%Only GPT-5.4 measured
Vibe Code Bench (Vals AI)Not measured67.4%Only GPT-5.4 measured
Code migration (Vals AI)Not measured35.0%Only GPT-5.4 measured
ProgramBench (Vals AI)Not measured0.5%Only GPT-5.4 measured
SkillsBench (Vals AI)Not measured51.7%Only GPT-5.4 measured
SciCode45.5%Not measuredOnly Gemma 4 31B measured
Terminal-Bench Hard (Artificial Analysis run)36.4%57.6%GPT-5.4
Terminal-BenchNot measured81.8%Only GPT-5.4 measured
GSO-BenchNot measured31.4%Only GPT-5.4 measured
WeirdML52.3%77.7%GPT-5.4
MirrorCodeNot measured15.6%Only GPT-5.4 measured
ALE-Bench925.51607.0GPT-5.4
LMArena Text: coding14591496GPT-5.4
LMArena Text: software and IT14631491GPT-5.4
LMArena WebDev: React13591454GPT-5.4
LMArena WebDev: HTML13801478GPT-5.4
LMArena WebDev: from an imageNot measured1436Only GPT-5.4 measured
SciCode8.9%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 17 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 4 31B and GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
AA Intelligence Index14.739.0GPT-5.4
Epoch Capabilities Index143.0157.3GPT-5.4
Agentic workLike-for-likePublic boards, shown as published, kept out of the index01
Agentic work benchmarks for Gemma 4 31B and GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
AA Agentic Index4.2Not measuredOnly Gemma 4 31B measured
Design Arena: agents building web appsNot measured1059Only GPT-5.4 measured
Design Arena: agents building full-stack appsNot measured1017Only GPT-5.4 measured
Design Arena: agents building mobile appsNot measured1087Only GPT-5.4 measured
Design Arena: agents building Android appsNot measured1031Only GPT-5.4 measured
Design Arena: agents building Godot gamesNot measured1135Only GPT-5.4 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%87.1%GPT-5.4
APEX-AgentsNot measured52.4%Only GPT-5.4 measured
METR time horizonsNot measured74.3%Only GPT-5.4 measured
DeepResearch BenchNot measured35.1%Only GPT-5.4 measured
PostTrainBenchNot measured19.0%Only GPT-5.4 measured
Vending-Bench 2Not measured$6,144Only GPT-5.4 measured
Neither model has a result on the other 26 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index09
Reasoning benchmarks for Gemma 4 31B and GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
GPQA DiamondNot measured91.7%Only GPT-5.4 measured
LiveBench reasoning68.3%Not measuredOnly Gemma 4 31B measured
MMMU Pro (Vals AI)Not measured87.5%Only GPT-5.4 measured
GPQA Diamond (Artificial Analysis run)85.7%92.0%GPT-5.4
Humanity's Last Exam (Artificial Analysis run)23.6%43.7%GPT-5.4
GPQA Diamond (Epoch AI run)75.8%93.3%GPT-5.4
ARC-AGINot measured93.7%Only GPT-5.4 measured
ARC-AGI-2Not measured74.0%Only GPT-5.4 measured
Chess puzzlesNot measured48.0%Only GPT-5.4 measured
Mystery game puzzlesNot measured37.0%Only GPT-5.4 measured
EBR-benchNot measured25.4%Only GPT-5.4 measured
LMArena Text: hard prompts14481485GPT-5.4
LMArena Text: expert14641507GPT-5.4
LMArena Text: hard prompts in English14561479GPT-5.4
LMArena Vision: diagrams12831327GPT-5.4
LMArena Vision: homework13101336GPT-5.4
Kagi LLM Benchmark63.5%63.8%GPT-5.4
Neither model has a result on the other 5 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index03
Math benchmarks for Gemma 4 31B and GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
AIMENot measured96.7%Only GPT-5.4 measured
OTIS Mock AIME73.3%97.8%GPT-5.4
FrontierMath, tiers 1 to 3Not measured78.6%Only GPT-5.4 measured
FrontierMath, tier 4Not measured49.0%Only GPT-5.4 measured
ProofBenchNot measured56.0%Only GPT-5.4 measured
LMArena Text: math14631488GPT-5.4
LMArena Text: mathematical work14651497GPT-5.4
Neither model has a result on the other 6 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index07
Knowledge benchmarks for Gemma 4 31B and GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
MMLU ProNot measured87.5%Only GPT-5.4 measured
LegalBench (Vals AI)Not measured86.0%Only GPT-5.4 measured
CaseLaw (Vals AI)52.6%63.8%GPT-5.4
CorpFin (Vals AI)Not measured65.3%Only GPT-5.4 measured
TaxEval (Vals AI)Not measured74.0%Only GPT-5.4 measured
MortgageTax (Vals AI)61.4%68.3%GPT-5.4
MedQA (Vals AI)Not measured96.1%Only GPT-5.4 measured
MedCode (Vals AI)Not measured41.3%Only GPT-5.4 measured
SimpleQA Verified10.4%45.1%GPT-5.4
LMArena Text: science14571479GPT-5.4
LMArena Text: medicine and healthcare14511458GPT-5.4
LMArena Text: legal and government14381486GPT-5.4
LMArena Text: business and finance14301474GPT-5.4
FACTS Benchmark Suite45.3%Not measuredOnly Gemma 4 31B measured
Neither model has a result on the other 4 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.4
BenchmarkGemma 4 31BGPT-5.4Leader
Design Arena: websitesNot measured1198Only GPT-5.4 measured
Design Arena: UI componentsNot measured1212Only GPT-5.4 measured
Design Arena: game devNot measured1194Only GPT-5.4 measured
Design Arena: data vizNot measured1196Only GPT-5.4 measured
Design Arena: 3DNot measured1065Only GPT-5.4 measured
Design Arena: all code categoriesNot measured1179Only GPT-5.4 measured
Design Arena: SVGNot measured1141Only GPT-5.4 measured
Design Arena: ASCII artNot measured1188Only GPT-5.4 measured
LiveBench design58.4%Not measuredOnly Gemma 4 31B measured
GeneralLike-for-likePublic boards, shown as published, kept out of the index324
General benchmarks for Gemma 4 31B and GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
LiveBench data analysis53.3%Not measuredOnly Gemma 4 31B measured
SAGE (Vals AI)55.0%43.3%Gemma 4 31B
MedScribe (Vals AI)Not measured77.5%Only GPT-5.4 measured
IFBench75.6%73.9%Gemma 4 31B
Long context reasoning (AA-LCR)69.7%82.0%GPT-5.4
DTBench82.7%94.4%GPT-5.4
LMCA39.3%52.0%GPT-5.4
CL-benchNot measured27.9%Only GPT-5.4 measured
Surface Evolver Bench30.6%Not measuredOnly Gemma 4 31B measured
Furniture assemblyNot measured37.5%Only GPT-5.4 measured
CL-bench LifeNot measured21.7%Only GPT-5.4 measured
LMArena Text14431469GPT-5.4
LMArena Text: instruction following14331469GPT-5.4
LMArena Text: creative writing14171439GPT-5.4
LMArena Vision12761303GPT-5.4
LMArena Text: English14511467GPT-5.4
LMArena Text: non-English14301465GPT-5.4
LMArena Text: Chinese14751520GPT-5.4
LMArena Text: GermanNot measured1472Only GPT-5.4 measured
LMArena Text: JapaneseNot measured1485Only GPT-5.4 measured
LMArena Text: KoreanNot measured1449Only GPT-5.4 measured
LMArena Text: French14361493GPT-5.4
LMArena Text: Spanish14421452GPT-5.4
LMArena Text: Russian14601480GPT-5.4
LMArena Text: Polish14331472GPT-5.4
LMArena Text: multi-turn14521482GPT-5.4
LMArena Text: longer queries14461473GPT-5.4
LMArena Text: writing and language14321458GPT-5.4
LMArena Text: entertainment and media14051438GPT-5.4
LMArena Vision: English12711301GPT-5.4
LMArena Vision: Chinese13261354GPT-5.4
LMArena Vision: reading text12821312GPT-5.4
LMArena Vision: humor12801284GPT-5.4
LMArena Vision: captioning1218Not measuredOnly Gemma 4 31B measured
LMArena Vision: recognizing things12261251GPT-5.4
LMArena Vision: creative writing12851283Gemma 4 31B
LMArena Document14251471GPT-5.4
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 GPT-5.4
BenchmarkGemma 4 31BGPT-5.4Leader
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.4$0.010Fits in one request

Gemma 4 31B costs less

Repository review

50K input + 3K output tokens

Gemma 4 31B$0.0082Fits in one request
GPT-5.4$0.170Fits in one request

Gemma 4 31B costs less

Agent loop

200K input + 10K output tokens

Gemma 4 31B$0.032Fits in one request
GPT-5.4$0.650Fits 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.4
SpecificationGoogle Gemma 4 31BOpenAI GPT-5.4
MakerGoogleOpenAI
WeightsOpen weightsNo public weights listed
ReleasedApril 2, 2026March 5, 2026
Context window262K1.05M
Input $/Mtok$0.14$2.50
Output $/Mtok$0.40$15.00
Coding index39.064.4
Independent measurements behind it23
Cost per solved taskNot computable$1.02
SourceOpenRouter listingOpenRouter listing

Questions

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

Pick GPT-5.4 for coding: it scores 64.4 on the Vibe Coding Index against 39.0 for Gemma 4 31B. Pick Gemma 4 31B for output tokens 37.5x cheaper ($0.40 vs $15.00 per million) and work measured by SAGE (Vals AI) or IFBench, where it leads.

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

Gemma 4 31B costs $0.14 per million input tokens and $0.40 per million output tokens; GPT-5.4 costs $2.50 and $15.00. Cost per solved task is known for GPT-5.4 only.

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

GPT-5.4, with 1.05M tokens against 262K.

How many benchmarks is the Gemma 4 31B vs GPT-5.4 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 GPT-5.4's on 3. 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-4" title="Gemma 4 31B vs GPT-5.4, 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-4">LLMBenchmark.ai, Gemma 4 31B vs GPT-5.4</a></p>