Claude Opus 4.7 vs Gemma 4 31B
Wins 6 of 8 areas
Coding · Agents · Reasoning · Facts · Images and charts · Math
Wins 1 of 8 areas
Following instructions
Claude Opus 4.7 is the stronger all-rounder.Gemma 4 31B is cheaper and better at following instructions.
Scores updated · 40 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.77 of 7 tests
- AgentsCarrying out multi-step tasks on its own40Claude Opus 4.74 of 4 tests
- Images and chartsUnderstanding pictures, charts and video40Claude Opus 4.74 of 4 tests
- ReasoningHard problems that need careful thinking30Claude Opus 4.73 of 3 tests
- FactsGetting facts right instead of making them up31Claude Opus 4.73 of 4 tests
- MathCompetition and research-level math20Claude Opus 4.72 of 2 tests
- Following instructionsDoing exactly what it is asked01Gemma 4 31B1 of 1 test
- Long documentsFinding answers in very long texts11Even1 each
Following instructions rests on a single test.
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.7 pulls ahead
- Avoids making up answers it doesn't knowAA-Omniscience · Non-hallucination+42.7points ahead
- Short factual questions, answered correctlySimpleQA Verified+41.3points ahead
- Command-line tasks in a real terminalTerminal-Bench 2.1+39.7points ahead
Where Gemma 4 31B pulls ahead
- Follows unfamiliar, precisely checkable instructionsIFBench+17points ahead
- Finds one of eight look-alike replies in a long chatMRCR v2 8 needle 128k (average)+7.1points ahead
Every test, side by side
All 40 tests both models report. The winning score is in its model's colour; marks a score checked independently.
CodingClaude Opus 4.7
- Terminal-Bench 2.1Claude Opus 4.7 by 39.783.143.4+39.7
- SWE-bench VerifiedClaude Opus 4.7 by 35.687.652+35.6
- SWE-bench MultilingualClaude Opus 4.7 by 28.880.551.7+28.8
- SWE-bench ProClaude Opus 4.7 by 28.664.335.7+28.6
- LMArena · WebDevClaude Opus 4.7 by 193 rating points15581365+193 rating
- Terminal-Bench HardClaude Opus 4.7 by 15.151.536.4+15.1
- SciCodeClaude Opus 4.7 by 954.545.5+9
AgentsClaude Opus 4.7
- GDPValClaude Opus 4.7 by 36.742.86.1+36.7
- MCP AtlasClaude Opus 4.7 by 20.177.357.2+20.1
- τ-Bench V3 · BankingClaude Opus 4.7 by 19.834.614.8+19.8
- AA IT-Bench SREClaude Opus 4.7 by 9.446.737.3+9.4
ReasoningClaude Opus 4.7
- Humanity's Last ExamClaude Opus 4.7 by 18.742.323.6+18.7
- CritPtClaude Opus 4.7 by 10.6121.4+10.6
- GPQA DiamondClaude Opus 4.7 by 5.791.485.7+5.7
FactsClaude Opus 4.7
- AA-Omniscience · Non-hallucinationClaude Opus 4.7 by 42.757.715+42.7
- SimpleQA VerifiedClaude Opus 4.7 by 41.351.710.4+41.3
- AA-Omniscience · AccuracyClaude Opus 4.7 by 28.948.920+28.9
- Vectara HHEM hallucination ratelower is betterGemma 4 31B by 4.6127.4+4.6
Images and chartsClaude Opus 4.7
- CharXiv (RQ)Claude Opus 4.7 by 23.19167.9+23.1
- MMMU-ProClaude Opus 4.7 by 5.478.873.4+5.4
- MathVistaClaude Opus 4.7 by 5.184.479.3+5.1
- LMArena · VisionClaude Opus 4.7 by 36 rating points13131277+36 rating
MathClaude Opus 4.7
- HMMT Feb. 2026Claude Opus 4.7 by 16.793.977.2+16.7
- AIME 2026Claude Opus 4.7 by 6.695.889.2+6.6
Long documentsEven
- AA-LCRClaude Opus 4.7 by 978.769.7+9
- MRCR v2 8 needle 128k (average)Gemma 4 31B by 7.159.366.4+7.1
Following instructionsGemma 4 31B
- IFBenchGemma 4 31B by 1758.675.6+17
Other results13 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.7 by 75.227.3-47.9+75.2
- AA Agentic IndexClaude Opus 4.7 by 32.839.56.7+32.8
- Artificial Analysis Coding IndexClaude Opus 4.7 by 30.273.643.4+30.2
- τ²-Bench Telecom (AA run)Claude Opus 4.7 by 28.788.659.9+28.7
- HLE (with tools)Claude Opus 4.7 by 28.254.726.5+28.2
- Terminal-Bench 2.0Claude Opus 4.7 by 26.569.442.9+26.5
- AA IntelligenceClaude Opus 4.7 by 2640.714.7+26
- vectara_avg_summary_lengthClaude Opus 4.7 by 73.3 rating points149.175.8+73.3 rating
- vectara_factual_consistencyGemma 4 31B by 4.68892.6+4.6
- SimpleVQAClaude Opus 4.7 by 3.656.552.9+3.6
- RealWorldQAClaude Opus 4.7 by 3.375.672.3+3.3
- MMMLUClaude Opus 4.7 by 3.191.588.4+3.1
- vectara_answer_rateGemma 4 31B by 298100+2
Questions people ask
Which is better, Claude Opus 4.7 or Gemma 4 31B?
Claude Opus 4.7 wins six of the eight areas we test: coding, agents, reasoning, facts, images and charts and math. Gemma 4 31B wins following instructions, and costs 98% less. They are level on long documents.
Which is better for coding?
Claude Opus 4.7. It wins 7 of the 7 coding tests both models report; Gemma 4 31B wins none.
Which is cheaper?
Claude Opus 4.7 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 40 benchmark tests both models have published scores on. The verdict counts the 27 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 13 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.