Claude Opus 4.8 vs Gemma 4 31B
Wins 7 of 8 areas
Coding · Agents · Reasoning · Facts · Images and charts · Math · Long documents
Wins 1 of 8 areas
Following instructions
Claude Opus 4.8 is the stronger all-rounder.Gemma 4 31B is cheaper and better at following instructions.
Scores updated · 35 tests both models report · How we compare
Where each one wins
Tests won in each of the eight areas we test. Each piece is one test, so a longer bar means more evidence; grey means the two scored within a point of each other.
- CodingWriting and fixing software70Claude Opus 4.87 of 7 tests
- AgentsCarrying out multi-step tasks on its own40Claude Opus 4.84 of 4 tests
- ReasoningHard problems that need careful thinking30Claude Opus 4.83 of 3 tests
- FactsGetting facts right instead of making them up30Claude Opus 4.83 of 3 tests
- MathCompetition and research-level math30Claude Opus 4.83 of 3 tests
- Images and chartsUnderstanding pictures, charts and video20Claude Opus 4.82 of 2 tests
- Long documentsFinding answers in very long texts10Claude Opus 4.81 of 1 test
- Following instructionsDoing exactly what it is asked01Gemma 4 31B1 of 1 test
Long documents and following instructions rest on a single test each.
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.
Gemma 4 31B costs 98% less for the same work.
The biggest differences
The tests each model wins by the widest margin, up to three each. Scores are out of 100.
Where Claude Opus 4.8 pulls ahead
- Avoids making up answers it doesn't knowAA-Omniscience · Non-hallucination+45.7points ahead
- Short factual questions, answered correctlySimpleQA Verified+42.6points ahead
- Real work tasks from 44 professionsGDPVal+41.7points ahead
Where Gemma 4 31B pulls ahead
- Follows unfamiliar, precisely checkable instructionsIFBench+13.4points ahead
Every test, side by side
All 35 tests both models report. The winning score is in its model's colour; marks a score checked independently.
CodingClaude Opus 4.8
- Terminal-Bench 2.1Claude Opus 4.8 by 41.284.643.4+41.2
- SWE-bench VerifiedClaude Opus 4.8 by 36.688.652+36.6
- SWE-bench ProClaude Opus 4.8 by 33.569.235.7+33.5
- SWE-bench MultilingualClaude Opus 4.8 by 32.784.451.7+32.7
- Terminal-Bench HardClaude Opus 4.8 by 21.958.336.4+21.9
- LMArena · WebDevClaude Opus 4.8 by 191 rating points15561365+191 rating
- SciCodeClaude Opus 4.8 by 8.954.445.5+8.9
AgentsClaude Opus 4.8
- GDPValClaude Opus 4.8 by 41.747.86.1+41.7
- MCP AtlasClaude Opus 4.8 by 2582.257.2+25
- Terminal-Bench 4.0Claude Opus 4.8 by 21.721.70+21.7
- τ-Bench V3 · BankingClaude Opus 4.8 by 19.434.214.8+19.4
ReasoningClaude Opus 4.8
- Humanity's Last ExamClaude Opus 4.8 by 25.148.723.6+25.1
- CritPtClaude Opus 4.8 by 19.520.91.4+19.5
- GPQA DiamondClaude Opus 4.8 by 6.39285.7+6.3
FactsClaude Opus 4.8
- AA-Omniscience · Non-hallucinationClaude Opus 4.8 by 45.760.715+45.7
- SimpleQA VerifiedClaude Opus 4.8 by 42.65310.4+42.6
- AA-Omniscience · AccuracyClaude Opus 4.8 by 28.848.820+28.8
Images and chartsClaude Opus 4.8
- CharXiv (RQ)Claude Opus 4.8 by 2289.967.9+22
- LMArena · VisionClaude Opus 4.8 by 18 rating points12951277+18 rating
MathClaude Opus 4.8
- HMMT Feb. 2026Claude Opus 4.8 by 18.395.577.2+18.3
- AIME 2026Claude Opus 4.8 by 10.810089.2+10.8
- IMOAnswerBenchClaude Opus 4.8 by 983.574.5+9
Following instructionsGemma 4 31B
- IFBenchGemma 4 31B by 13.462.275.6+13.4
Other results11 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.
- AA-OmniscienceClaude Opus 4.8 by 76.728.8-47.9+76.7
- NL2RepoClaude Opus 4.8 by 54.269.715.5+54.2
- Tool-DecathlonClaude Opus 4.8 by 38.759.921.2+38.7
- WideSearchClaude Opus 4.8 by 37.772.935.2+37.7
- AA Agentic IndexClaude Opus 4.8 by 35.942.66.7+35.9
- τ²-Bench Telecom (AA run)Claude Opus 4.8 by 34.594.459.9+34.5
- Terminal-Bench 2.0Claude Opus 4.8 by 31.774.642.9+31.7
- HLE (with tools)Claude Opus 4.8 by 31.457.926.5+31.4
- Artificial Analysis Coding IndexClaude Opus 4.8 by 30.974.343.4+30.9
- AA IntelligenceClaude Opus 4.8 by 27.141.814.7+27.1
- HMMT Nov. 2025Claude Opus 4.8 by 996.587.5+9
Questions people ask
Which is better, Claude Opus 4.8 or Gemma 4 31B?
Claude Opus 4.8 wins seven of the eight areas we test: coding, agents, reasoning, facts, images and charts, math and long documents. Gemma 4 31B wins following instructions, and costs 98% less.
Which is better for coding?
Claude Opus 4.8. It wins 7 of the 7 coding tests both models report; Gemma 4 31B wins none.
Which is cheaper?
Claude Opus 4.8 costs $5.00 per million input tokens and $25.00 per million output tokens; Gemma 4 31B costs $0.17 and $0.40. That makes Gemma 4 31B about 98% cheaper for the same work.
How do you compare the two?
We use the 35 benchmark tests both models have published scores on. The verdict counts the 24 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 11 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.