Enter opens the highlighted result. Esc closes.

Gemma 3 27B vs Gemma 4 31B

Gemma 4 31B leads Gemma 3 27B on the Artificial Analysis Intelligence Index, 14.7 to 4.9, and Gemma 3 27B costs 1.3x less per output token ($0.30 vs $0.40 per million). Updated October 22, 2026; 53 benchmarks have a result for both.

Gemma 3 27BGoogle
Coding
No data
Overall
31.4
Output $/M
$0.30
0
Gemma 4 31BGoogle
Coding
39.0
Overall
42.1
Output $/M
$0.40
53
vs boards won of 53 shared

Gemma 3 27B or Gemma 4 31B: which to pick

Only Gemma 4 31B has a coding score, 39.0 on the Vibe Coding Index; Gemma 3 27B has none, so the two cannot be ranked on coding.

Pick Gemma 3 27B for output tokens 1.3x cheaper ($0.30 vs $0.40 per million).

Shared results
53
Gemma 3 27B only
13
Gemma 4 31B only
18
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 3 27B not benchmarked, Gemma 4 31B 39.0 from 2 benchmarks.
Widest category
Math, 33.0 points apart on average over 3 shared benchmarks.
Widest single gap
Long context reasoning (AA-LCR): Gemma 3 27B 7.3% against Gemma 4 31B 69.7%, 62.3 points apart on a 0 to 100 scale.
Output price
Gemma 3 27B $0.30 against Gemma 4 31B $0.40 per million output tokens, 1.3x apart.
Context window
Gemma 3 27B takes 131K 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
CategoryGemma 3 27BBarsGemma 4 31BTies
Coding06
Intelligence02
Agentic work02
Reasoning09
Math03
Knowledge05
General026
All shared boards053
CodingLike-for-likeSix of these boards feed the Vibe Coding Index06
Coding benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
Aider polyglot4.9%Not measuredOnly Gemma 3 27B measured
LiveBench codingNot measured49.0%Only Gemma 4 31B measured
LMArena WebDevNot measured1367Only Gemma 4 31B measured
AA Coding Index10.143.4Gemma 4 31B
LiveCodeBench (Artificial Analysis run)13.7%Not measuredOnly Gemma 3 27B measured
SciCode23.3%45.5%Gemma 4 31B
Terminal-Bench Hard (Artificial Analysis run)3.8%36.4%Gemma 4 31B
WeirdMLNot measured52.3%Only Gemma 4 31B measured
ALE-BenchNot measured925.5Only Gemma 4 31B measured
LMArena Text: coding13221459Gemma 4 31B
LMArena Text: software and IT13541463Gemma 4 31B
LMArena WebDev: ReactNot measured1359Only Gemma 4 31B measured
LMArena WebDev: HTMLNot measured1380Only Gemma 4 31B measured
SciCode0.0%8.9%Gemma 4 31B
Neither model has a result on the other 25 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
AA Intelligence Index4.914.7Gemma 4 31B
Epoch Capabilities Index130.0143.0Gemma 4 31B
Agentic workLike-for-likePublic boards, shown as published, kept out of the index02
Agentic work benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
AA Agentic Index0.14.2Gemma 4 31B
LiveBench researchNot measured44.4%Only Gemma 4 31B measured
LiveBench browserNot measured4.0%Only Gemma 4 31B measured
LiveBench long agenticNot measured13.3%Only Gemma 4 31B measured
τ²-Bench Telecom10.5%65.5%Gemma 4 31B
Berkeley Function Calling Leaderboard (BFCL)29.5%Not measuredOnly Gemma 3 27B measured
Neither model has a result on the other 35 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index09
Reasoning benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
LiveBench reasoningNot measured68.3%Only Gemma 4 31B measured
GPQA Diamond (Artificial Analysis run)42.8%85.7%Gemma 4 31B
Humanity's Last Exam (Artificial Analysis run)4.4%23.6%Gemma 4 31B
GPQA Diamond (Epoch AI run)47.7%75.8%Gemma 4 31B
LMArena Text: hard prompts13401448Gemma 4 31B
LMArena Text: expert13041464Gemma 4 31B
LMArena Text: hard prompts in English13531456Gemma 4 31B
LMArena Vision: diagrams11561283Gemma 4 31B
LMArena Vision: homework11601310Gemma 4 31B
Kagi LLM Benchmark35.1%63.5%Gemma 4 31B
Neither model has a result on the other 12 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index03
Math benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
AA Math Index20.7Not measuredOnly Gemma 3 27B measured
AIME 2025 (Artificial Analysis run)20.7%Not measuredOnly Gemma 3 27B measured
OTIS Mock AIME22.5%73.3%Gemma 4 31B
MATH level 574.0%Not measuredOnly Gemma 3 27B measured
LMArena Text: math13121463Gemma 4 31B
LMArena Text: mathematical work13271465Gemma 4 31B
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index05
Knowledge benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
CaseLaw (Vals AI)Not measured52.6%Only Gemma 4 31B measured
MortgageTax (Vals AI)Not measured61.4%Only Gemma 4 31B measured
MMLU Pro (Artificial Analysis run)66.9%Not measuredOnly Gemma 3 27B measured
SimpleQA VerifiedNot measured10.4%Only Gemma 4 31B measured
GeoBench52.0%Not measuredOnly Gemma 3 27B measured
LMArena Text: science13831457Gemma 4 31B
LMArena Text: medicine and healthcare13911451Gemma 4 31B
LMArena Text: legal and government13751438Gemma 4 31B
LMArena Text: business and finance13601430Gemma 4 31B
FACTS Benchmark Suite29.1%45.3%Gemma 4 31B
Neither model has a result on the other 8 boards here
Web designDirectional onlyPublic boards, shown as published, kept out of the index1 board, none shared
Web design benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
LiveBench designNot measured58.4%Only Gemma 4 31B measured
Neither model has a result on the other 8 boards here
GeneralLike-for-likePublic boards, shown as published, kept out of the index026
General benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 4 31BLeader
LiveBench data analysisNot measured53.3%Only Gemma 4 31B measured
SAGE (Vals AI)Not measured55.0%Only Gemma 4 31B measured
IFBench31.8%75.6%Gemma 4 31B
Long context reasoning (AA-LCR)7.3%69.7%Gemma 4 31B
DTBench52.5%82.7%Gemma 4 31B
LMCA12.3%39.3%Gemma 4 31B
Fiction.LiveBench33.3%Not measuredOnly Gemma 3 27B measured
Creative writing (Lech Mazur)79.9%Not measuredOnly Gemma 3 27B measured
Surface Evolver BenchNot measured30.6%Only Gemma 4 31B measured
LMArena Text13581443Gemma 4 31B
LMArena Text: instruction following13211433Gemma 4 31B
LMArena Text: creative writing13451417Gemma 4 31B
LMArena Vision11651276Gemma 4 31B
LMArena Text: English13771451Gemma 4 31B
LMArena Text: non-English13341430Gemma 4 31B
LMArena Text: Chinese13461475Gemma 4 31B
LMArena Text: German1362Not measuredOnly Gemma 3 27B measured
LMArena Text: Japanese1287Not measuredOnly Gemma 3 27B measured
LMArena Text: Korean1308Not measuredOnly Gemma 3 27B measured
LMArena Text: French13681436Gemma 4 31B
LMArena Text: Spanish13491442Gemma 4 31B
LMArena Text: Russian13491460Gemma 4 31B
LMArena Text: Polish13451433Gemma 4 31B
LMArena Text: multi-turn13451452Gemma 4 31B
LMArena Text: longer queries13331446Gemma 4 31B
LMArena Text: writing and language13471432Gemma 4 31B
LMArena Text: entertainment and media13201405Gemma 4 31B
LMArena Vision: English11881271Gemma 4 31B
LMArena Vision: Chinese11641326Gemma 4 31B
LMArena Vision: reading text11561282Gemma 4 31B
LMArena Vision: humor11661280Gemma 4 31B
LMArena Vision: captioning11511218Gemma 4 31B
LMArena Vision: recognizing things11961226Gemma 4 31B
LMArena Vision: creative writing11771285Gemma 4 31B
LMArena DocumentNot measured1425Only Gemma 4 31B measured
Neither model has a result on the other 11 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Gemma 3 27B and Gemma 4 31B
BenchmarkGemma 3 27BGemma 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

Gemma 3 27B$0.0002Fits in one request
Gemma 4 31B$0.0003Fits in one request

Gemma 3 27B costs less

Repository review

50K input + 3K output tokens

Gemma 3 27B$0.0049Fits in one request
Gemma 4 31B$0.0082Fits in one request

Gemma 3 27B costs less

Agent loop

200K input + 10K output tokens

Gemma 3 27B$0.019Exceeds the context window
Gemma 4 31B$0.032Fits in one request

Gemma 3 27B 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 3 27B and Gemma 4 31B
SpecificationGoogle Gemma 3 27BGoogle Gemma 4 31B
MakerGoogleGoogle
WeightsOpen weightsOpen weights
ReleasedMarch 12, 2025April 2, 2026
Context window131K262K
Input $/Mtok$0.08$0.14
Output $/Mtok$0.30$0.40
Coding indexNot benchmarked39.0
Independent measurements behind it02
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemma 3 27B better than Gemma 4 31B for coding?

Only Gemma 4 31B has a coding score, 39.0 on the Vibe Coding Index; Gemma 3 27B has none, so the two cannot be ranked on coding. Pick Gemma 3 27B for output tokens 1.3x cheaper ($0.30 vs $0.40 per million).

Which is cheaper, Gemma 3 27B or Gemma 4 31B?

Gemma 3 27B costs $0.08 per million input tokens and $0.30 per million output tokens; Gemma 4 31B costs $0.14 and $0.40. Cost per solved task is known for neither of them.

Which has the bigger context window, Gemma 3 27B or Gemma 4 31B?

Gemma 4 31B, with 262K tokens against 131K.

How many benchmarks is the Gemma 3 27B vs Gemma 4 31B comparison based on?

53 benchmarks have a result for both models as of October 22, 2026. Gemma 3 27B's coding index rests on 0 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