Model comparison

Claude Sonnet 5 vs Gemma 4 31B IT

Claude Sonnet 5 is the stronger model overall, scoring 54.6 to 43.5 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.6

Rank #29 Confirmed

Gemma 4 31B IT Google

43.5

Rank #90 Confirmed

Summary

  • They share 32 benchmarks with published results for both. Claude Sonnet 5 scores higher in 9 categories and Gemma 4 31B IT in 0 categories; 5 gaps are clear of the uncertainty.
  • The widest gap is in math, where Claude Sonnet 5 leads 66.2 to 43.2.
  • 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.643.5
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 (#26), Gemma 4 31B IT: 42.3 (#108)

Coding benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena WebDev15411366
SciCode54.3%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.8 (#18), 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: 49.1 (#39), Gemma 4 31B IT: 27.2 (#122)

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.21142.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.2 (#27), Gemma 4 31B IT: 43.2 (#81)

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

Knowledge Claude Sonnet 5 leads

Claude Sonnet 5: 55.6 (#47), Gemma 4 31B IT: 37.9 (#151)

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

Multimodal Too close to call

Claude Sonnet 5: 42.4 (#31), Gemma 4 31B IT: 41.6 (#34)

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

Multilingual Too close to call

Claude Sonnet 5: 53.8 (#55), Gemma 4 31B IT: 53.8 (#57)

Multilingual benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena Non-English14311431
LMArena Chinese14771476
LMArena French14601435
LMArena Russian14511460
LMArena Spanish14371444
LMArena German1440—
LMArena Japanese1422—
LMArena Korean1411—

Instruction Following Too close to call

Claude Sonnet 5: 76.3 (#41), Gemma 4 31B IT: 75.5 (#61)

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

Long Context Too close to call

Claude Sonnet 5: 44.8 (#55), Gemma 4 31B IT: 44.2 (#71)

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

Writing & Preference Claude Sonnet 5 leads

Claude Sonnet 5: 69.2 (#25), Gemma 4 31B IT: 60.5 (#96)

Writing & Preference benchmarks
BenchmarkClaude Sonnet 5Gemma 4 31B IT
LMArena Text14421443
LMArena Creative Writing14161415
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.6 to 43.5 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 42.3 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