Skip to content
VECTOR WIREAI INTELLIGENCE
UTC

Claude Sonnet 4.5 vs Gemma 4 31B

Anthropic · released

Wins 3 of 8 areas

Coding · Facts · Long documents

Google · released

Wins 4 of 8 areas

Reasoning · Images and charts · Math · Following instructions

Gemma 4 31B wins more areas, narrowly.Claude Sonnet 4.5 is better at coding.

Scores updated · 52 tests both models report · How we compare

What it costs

Prices per million tokens, roughly 750,000 words. The bars show the cost of a million tokens read plus a million written.

Claude Sonnet 4.5$3.00 to read · $15.00 to write$18Price from Anthropic's own price page
Gemma 4 31B$0.15 to read · $0.40 to write$0.55Price from Artificial Analysis

Gemma 4 31B costs 97% less for the same work.

The biggest differences

The three tests each model wins by the widest margin. Scores are out of 100.

Where Gemma 4 31B pulls ahead

  • Follows unfamiliar, precisely checkable instructionsIFBench+18.3points aheadGemma 4 31B75.6Claude Sonnet 4.557.3
  • Finds hard-to-locate facts by browsing the webBrowseComp+17.4points aheadGemma 4 31B37Claude Sonnet 4.519.6
  • Recent programming contest problemsLiveCodeBench v6+16points aheadGemma 4 31B80Claude Sonnet 4.564

Where Claude Sonnet 4.5 pulls ahead

Every test, side by side

All 52 tests both models report. The winning score is in its model's colour; marks a score checked independently.

CodingClaude Sonnet 4.5

Full coding ranking

AgentsEven

Full agents ranking

ReasoningGemma 4 31B

Full reasoning ranking

FactsClaude Sonnet 4.5

Full facts ranking

Images and chartsGemma 4 31B

Full images and charts ranking

MathGemma 4 31B

Full math ranking

Long documentsClaude Sonnet 4.5
  • LongBench v2Claude Sonnet 4.5 by 8.961.852.9+8.9
  • AA-LCRClaude Sonnet 4.5 by 2.672.369.7+2.6

Full long documents ranking

Following instructionsGemma 4 31B
  • IFBenchGemma 4 31B by 18.357.375.6+18.3

Full following instructions ranking

Other results24 tests, not counted

Tests outside the eight areas. They are not counted above: several are summary scores built from other tests, or the same test under another name.

Questions people ask

Which is better, Claude Sonnet 4.5 or Gemma 4 31B?

Gemma 4 31B wins four of the eight areas we test: reasoning, images and charts, math and following instructions. Claude Sonnet 4.5 wins coding, facts and long documents. They are level on agents.

Which is better for coding?

Claude Sonnet 4.5. It wins 5 of the 8 coding tests both models report; Gemma 4 31B wins 1, and 2 are ties.

Which is cheaper?

Claude Sonnet 4.5 costs $3.00 per million input tokens and $15.00 per million output tokens; Gemma 4 31B costs $0.15 and $0.40. That makes Gemma 4 31B about 97% cheaper for the same work.

How do you compare the two?

We use the 52 benchmark tests both models have published scores on. The verdict counts the 28 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 24 are listed but not counted, because several are summary scores or repeat a test. Each score is the one shown on the model's own page.