Model comparison

Claude Sonnet 5 vs Gemma 4 31B IT

Claude Sonnet 5 is the stronger model overall, scoring 54.5 to 43.2 on the Noometry Index. Gemma 4 31B IT costs 26× less per token, which makes it the better buy when Claude Sonnet 5's lead doesn't matter for your workload.

Last verified . 32 shared benchmarks.

Claude Sonnet 5 Anthropic

54.5

Rank #26 Confirmed

Gemma 4 31B IT Google

43.2

Rank #85 Confirmed

Summary

  • They share 32 benchmarks with published results for both. Claude Sonnet 5 scores higher in 8 categories and Gemma 4 31B IT in 1 category; 6 gaps are clear of the uncertainty.
  • The widest gap is in math, where Claude Sonnet 5 leads 66.1 to 41.3.
  • The biggest single-benchmark swing is Chess Puzzles: 35% for Claude Sonnet 5 and 5% for Gemma 4 31B IT.
  • Gemma 4 31B IT is cheaper at $0.09 / $0.34 per million input/output tokens, against $2 / $10 for Claude Sonnet 5.
  • Claude Sonnet 5 accepts more context: 1M tokens versus 262K.
  • Gemma 4 31B IT has downloadable open weights; the other is API-only.

Side by side

Claude Sonnet 5 and Gemma 4 31B IT specifications
Claude Sonnet 5Gemma 4 31B IT
ProviderAnthropicGoogle
Noometry Index54.543.2
Released2026-06-292026-04-02
WeightsProprietaryOpen
Context window1M262K
Max output128K33K
Input $ / M tokens$2$0.09
Output $ / M tokens$10$0.34
Results tracked5135

Sponsored placements are available on pages like this one. Advertise on Noometry

Category by category

Coding Claude Sonnet 5 leads

Claude Sonnet 5: 55.5 (#20), Gemma 4 31B IT: 41.9 (#98)

Coding benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena WebDev15401364
SciCode53.6%43.4%
WeirdML68.8%52.3%
LMArena Coding14831459
ALE-Bench1,463925.5
DeepSWE53.8%—
FrontierCode42.7%—
CursorBench34.1%—
GSO37.3%—

Agentic & Tool Use Not comparable

Claude Sonnet 5: 42.7 (#16), Gemma 4 31B IT: —

Agentic & Tool Use benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
APEX-Agents54.5%—
GBAEval65.3%—
LMArena Search1194—
Vending-Bench 26,378—

Reasoning Claude Sonnet 5 leads

Claude Sonnet 5: 48.2 (#37), Gemma 4 31B IT: 26.4 (#119)

Reasoning benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
NYT Connections (extended)75.1%70.6%
CritPt16.9%1.4%
Chess Puzzles35%5%
LMArena Hard Prompts14611448
DTBench92.5%82.7%
LMCA50%39.3%
Surface Evolver Bench60%30.6%
Epoch Capabilities Index156.34142.74
SimpleBench60.6%—
Kagi LLM Benchmark—63.5%
Thematic Generalization—53%
Mystery Game Puzzles35%—
Bench to the Future 30.14—
ForecastBench61.1—

Math Claude Sonnet 5 leads

Claude Sonnet 5: 66.1 (#21), Gemma 4 31B IT: 41.3 (#72)

Math benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
OTIS Mock AIME 2024-202594.7%73.3%
LMArena Math14671464
FrontierMath (Tiers 1-3)65.6%—
FrontierMath Tier 429.3%—
ProofBench77%—

Knowledge Claude Sonnet 5 leads

Claude Sonnet 5: 55.7 (#42), Gemma 4 31B IT: 37.9 (#141)

Knowledge benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
GPQA Diamond90.5%75.8%
SimpleQA Verified33.7%10.4%
LMArena Expert14911465
Vectara Hallucination Rate—7.4%

Multimodal Claude Sonnet 5 leads

Claude Sonnet 5: 42.4 (#26), Gemma 4 31B IT: 41.0 (#32)

Multimodal benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena Vision12751278
LMArena Document14661425
Blueprint-Bench 224.9%—

Multilingual Too close to call

Claude Sonnet 5: 54.0 (#55), Gemma 4 31B IT: 54.0 (#52)

Multilingual benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena Non-English14311431
LMArena Chinese14751478
LMArena French14571436
LMArena Russian14521462
LMArena Spanish14361443
LMArena German1448—
LMArena Japanese1422—
LMArena Korean1411—

Instruction Following Too close to call

Claude Sonnet 5: 76.6 (#39), Gemma 4 31B IT: 75.6 (#58)

Instruction Following benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena Instruction Following14531433

Long Context Too close to call

Claude Sonnet 5: 44.8 (#53), Gemma 4 31B IT: 44.2 (#67)

Long Context benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena Longer Query14641446

Writing & Preference Claude Sonnet 5 leads

Claude Sonnet 5: 69.4 (#24), Gemma 4 31B IT: 60.7 (#92)

Writing & Preference benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena Text14431443
LMArena Creative Writing14161416
EQ-Bench Creative Writing17941368
EQ-Bench 412361120
LMArena Multi-Turn14541452

Frequently asked questions

Is Claude Sonnet 5 better than Gemma 4 31B IT?

Claude Sonnet 5 is the stronger model overall, scoring 54.5 to 43.2 on the Noometry Index. Gemma 4 31B IT costs 26× less per token, which makes it the better buy when Claude Sonnet 5's lead doesn't matter for your workload.

Which is cheaper, Claude Sonnet 5 or Gemma 4 31B IT?

Gemma 4 31B IT is cheaper. It lists at $0.09 per million input tokens and $0.34 per million output tokens; Claude Sonnet 5 lists at $2 and $10.

Is Claude Sonnet 5 or Gemma 4 31B IT better for coding?

Claude Sonnet 5 scores higher on coding benchmarks: 55.5 versus 41.9 in the Noometry coding category.

Which has the bigger context window?

Claude Sonnet 5 does, with 1M tokens against 262K.

How many benchmarks do Claude Sonnet 5 and Gemma 4 31B IT share?

32 benchmarks have published results for both models. Claude Sonnet 5 has 51 scored results on Noometry and Gemma 4 31B IT has 35.

Related comparisons

Go deeper