Skip to content
VECTOR WIREAI INTELLIGENCE
UTC

Claude Sonnet 4.5 vs Gemma 4 31B

Anthropic · released

Wins 4 of 8 areas

Coding · Agents · Facts · Long documents

Google · released

Wins 4 of 8 areas

Reasoning · Images and charts · Math · Following instructions

The two are evenly matched.Claude Sonnet 4.5 is better at coding and facts; Gemma 4 31B at reasoning and images and charts.

Scores updated · 50 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 Artificial Analysis
Gemma 4 31B$0.17 to read · $0.40 to write$0.57Price 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 Claude Sonnet 4.5 pulls ahead

  • Avoids making up answers it doesn't knowAA-Omniscience · Non-hallucination+35.9points aheadClaude Sonnet 4.550.9Gemma 4 31B15
  • Fixes real GitHub issues in Python projectsSWE-bench Verified+25.2points aheadClaude Sonnet 4.577.2Gemma 4 31B52
  • Short factual questions, answered correctlySimpleQA Verified+20.3points aheadClaude Sonnet 4.530.7Gemma 4 31B10.4

Where Gemma 4 31B pulls ahead

  • Follows unfamiliar, precisely checkable instructionsIFBench+18.3points aheadGemma 4 31B75.6Claude Sonnet 4.557.3
  • Recent programming contest problemsLiveCodeBench v6+16points aheadGemma 4 31B80Claude Sonnet 4.564
  • Multi-step tasks using many real software toolsMCP Atlas+13.4points aheadGemma 4 31B57.2Claude Sonnet 4.543.8

Every test, side by side

All 50 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

AgentsClaude Sonnet 4.5

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
  • 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?

Claude Sonnet 4.5 and Gemma 4 31B each win four of the eight areas we test. Claude Sonnet 4.5 wins coding, agents, facts and long documents; Gemma 4 31B wins reasoning, images and charts, math and following instructions. Gemma 4 31B costs 97% less.

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.17 and $0.40. That makes Gemma 4 31B about 97% cheaper for the same work.

How do you compare the two?

We use the 50 benchmark tests both models have published scores on. The verdict counts the 26 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.