Enter opens the highlighted result. Esc closes.

Gemma 3 27B vs Phi 4

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

Gemma 3 27BGoogle
Coding
No data
Overall
4.9
Output $/M
$0.30
36
Phi 4Microsoft
Coding
No data
Overall
5.9
Output $/M
$0.14
6
vs boards won of 43 shared, 1 tied

Decision reading

Neither model has a coding score yet, so the two cannot be ranked on coding.

Gemma 3 27B has the edge where the context window is larger, 131K against 16K tokens, and where what matters is LiveCodeBench (Artificial Analysis run) or AA Intelligence Index, where it leads.

Shared results
43
Gemma 3 27B only
19
Phi 4 only
2
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 3 27B not benchmarked, Phi 4 not benchmarked.
Widest category
Knowledge, 22.9 points apart on average over 5 shared benchmarks.
Widest single gap
LMArena Text: medicine and healthcare: Gemma 3 27B 1391 against Phi 4 1202, 31.6 points apart on a 0 to 100 scale.
Output price
Gemma 3 27B $0.30 against Phi 4 $0.14 per million output tokens, 2.1x apart.
Context window
Gemma 3 27B takes 131K tokens, Phi 4 16K.

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 27BBarsPhi 4Ties
Coding211 tie
Intelligence02
Agentic work10
Reasoning42
Math60
Knowledge41
General190
All shared boards3661 tie
CodingLike-for-likeSix of these boards feed the Vibe Coding Index21
Coding benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
Aider polyglot4.9%Not measuredOnly Gemma 3 27B measured
AA Coding Index10.1Not measuredOnly Gemma 3 27B measured
LiveCodeBench (Artificial Analysis run)13.7%23.1%Phi 4
SciCode23.3%Not measuredOnly Gemma 3 27B measured
Terminal-Bench Hard (Artificial Analysis run)3.8%3.8%Tie
LMArena Text: coding13221231Gemma 3 27B
LMArena Text: software and IT13541228Gemma 3 27B
Neither model has a result on the other 31 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
AA Intelligence Index4.95.9Phi 4
Epoch Capabilities Index130.0130.5Phi 4
Agentic workLike-for-likePublic boards, shown as published, kept out of the index10
Agentic work benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
AA Agentic Index0.1Not measuredOnly Gemma 3 27B measured
τ²-Bench Telecom10.5%0.0%Gemma 3 27B
BALROGNot measured11.6%Only Phi 4 measured
Neither model has a result on the other 36 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index42
Reasoning benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
GPQA Diamond (Artificial Analysis run)42.8%57.5%Phi 4
Humanity's Last Exam (Artificial Analysis run)4.4%3.8%Gemma 3 27B
GPQA Diamond (Epoch AI run)47.7%56.1%Phi 4
LMArena Text: hard prompts13401220Gemma 3 27B
LMArena Text: expert13041203Gemma 3 27B
LMArena Text: hard prompts in English13531230Gemma 3 27B
LMArena Vision: diagrams1156Not measuredOnly Gemma 3 27B measured
LMArena Vision: homework1160Not measuredOnly Gemma 3 27B measured
Neither model has a result on the other 13 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index60
Math benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
AA Math Index20.718.0Gemma 3 27B
AIME 2025 (Artificial Analysis run)20.7%18.0%Gemma 3 27B
OTIS Mock AIME22.5%13.8%Gemma 3 27B
MATH level 574.0%64.9%Gemma 3 27B
LMArena Text: math13121246Gemma 3 27B
LMArena Text: mathematical work13271254Gemma 3 27B
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index41
Knowledge benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
MMLU Pro (Artificial Analysis run)66.9%71.4%Phi 4
MMLUNot measured84.8%Only Phi 4 measured
GeoBench52.0%Not measuredOnly Gemma 3 27B measured
LMArena Text: science13831206Gemma 3 27B
LMArena Text: medicine and healthcare13911202Gemma 3 27B
LMArena Text: legal and government13751241Gemma 3 27B
LMArena Text: business and finance13601199Gemma 3 27B
Neither model has a result on the other 10 boards here
Web designNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Web design benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
Neither model has a result on 9 boards here
GeneralLike-for-likePublic boards, shown as published, kept out of the index190
General benchmarks for Gemma 3 27B and Phi 4
BenchmarkGemma 3 27BPhi 4Leader
IFBench31.8%23.5%Gemma 3 27B
Long context reasoning (AA-LCR)7.3%0.0%Gemma 3 27B
DTBench52.5%Not measuredOnly Gemma 3 27B measured
LMCA12.3%Not measuredOnly Gemma 3 27B measured
Fiction.LiveBench33.3%Not measuredOnly Gemma 3 27B measured
Creative writing (Lech Mazur)79.9%62.6%Gemma 3 27B
LMArena Text13581217Gemma 3 27B
LMArena Text: instruction following13211201Gemma 3 27B
LMArena Text: creative writing13451181Gemma 3 27B
LMArena Vision1165Not measuredOnly Gemma 3 27B measured
LMArena Text: English13771231Gemma 3 27B
LMArena Text: non-English13341197Gemma 3 27B
LMArena Text: Chinese13461212Gemma 3 27B
LMArena Text: German13621222Gemma 3 27B
LMArena Text: Japanese12871158Gemma 3 27B
LMArena Text: Korean13081151Gemma 3 27B
LMArena Text: French13681224Gemma 3 27B
LMArena Text: Spanish13491234Gemma 3 27B
LMArena Text: Russian13491209Gemma 3 27B
LMArena Text: Polish1345Not measuredOnly Gemma 3 27B measured
LMArena Text: multi-turn13451206Gemma 3 27B
LMArena Text: longer queries13331217Gemma 3 27B
LMArena Text: writing and language13471198Gemma 3 27B
LMArena Text: entertainment and media13201162Gemma 3 27B
LMArena Vision: English1188Not measuredOnly Gemma 3 27B measured
LMArena Vision: Chinese1164Not measuredOnly Gemma 3 27B measured
LMArena Vision: reading text1156Not measuredOnly Gemma 3 27B measured
LMArena Vision: humor1166Not measuredOnly Gemma 3 27B measured
LMArena Vision: captioning1151Not measuredOnly Gemma 3 27B measured
LMArena Vision: recognizing things1196Not measuredOnly Gemma 3 27B measured
LMArena Vision: creative writing1177Not measuredOnly Gemma 3 27B measured
Neither model has a result on the other 15 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 Phi 4
BenchmarkGemma 3 27BPhi 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 3 27B$0.0002Fits in one request
Phi 4$0.0001Fits in one request

Phi 4 costs less

Repository review

50K input + 3K output tokens

Gemma 3 27B$0.0049Fits in one request
Phi 4$0.0039Exceeds the context window

Phi 4 costs less

Agent loop

200K input + 10K output tokens

Gemma 3 27B$0.019Exceeds the context window
Phi 4$0.015Exceeds the context window

Phi 4 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 Phi 4
SpecificationGoogle Gemma 3 27BMicrosoft Phi 4
MakerGoogleMicrosoft
WeightsOpen weightsOpen weights
ReleasedMarch 12, 2025January 10, 2025
Context window131K16K
Input $/Mtok$0.08$0.07
Output $/Mtok$0.30$0.14
Coding indexNot benchmarkedNot benchmarked
Independent measurements behind it00
Cost per solved taskNot computableNot computable
SourceOpenRouter listingOpenRouter listing

Questions

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

Neither model has a coding score yet, so the two cannot be ranked on coding. Gemma 3 27B has the edge where the context window is larger, 131K against 16K tokens, and where what matters is LiveCodeBench (Artificial Analysis run) or AA Intelligence Index, where it leads.

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

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

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

Gemma 3 27B, with 131K tokens against 16K.

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

43 benchmarks have a result for both models as of October 21, 2026. Gemma 3 27B's coding index rests on 0 independent benchmarks and Phi 4's on 0. Where only one model has a result, the page says so instead of naming a winner.

Compare next