Gemma 4 31B vs GPT-5
Wins 1 of 8 areas
Following instructions
Wins 7 of 8 areas
Coding · Agents · Reasoning · Facts · Images and charts · Math · Long documents
GPT-5 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 software35GPT-55 of 8 tests
- FactsGetting facts right instead of making them up13GPT-53 of 4 tests
- ReasoningHard problems that need careful thinking02GPT-52 of 3 tests · 1 tie
- AgentsCarrying out multi-step tasks on its own02GPT-52 of 2 tests
- Images and chartsUnderstanding pictures, charts and video12GPT-52 of 4 tests · 1 tie
- MathCompetition and research-level math01GPT-51 of 1 test
- Long documentsFinding answers in very long texts01GPT-51 of 1 test
- Following instructionsDoing exactly what it is asked10Gemma 4 31B1 of 1 test
Math, 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 95% less for the same work.
The biggest differences
The three tests each model wins by the widest margin. Scores are out of 100.
Where GPT-5 pulls ahead
- Short factual questions, answered correctlySimpleQA Verified+39.7points ahead
- Fixes real GitHub issues in Python projectsSWE-bench Verified+22.9points ahead
- Answers hard knowledge questions correctlyAA-Omniscience · Accuracy+20.3points ahead
Where Gemma 4 31B pulls ahead
- Command-line tasks in a real terminalTerminal-Bench 2.1+8.2points ahead
- Hard command-line tasks in a real terminalTerminal-Bench Hard+3.8points ahead
- Code for real scientific research problemsSciCode+2.6points 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.
CodingGPT-5
- SWE-bench VerifiedGPT-5 by 22.95274.9+22.9
- Terminal-Bench 2.1Gemma 4 31B by 8.243.435.2+8.2
- LiveCodeBench v6GPT-5 by 78087+7
- SWE-bench ProGPT-5 by 6.135.741.8+6.1
- LMArena · WebDevGPT-5 by 53 rating points13651418+53 rating
- Terminal-Bench HardGemma 4 31B by 3.836.432.6+3.8
- SWE-bench MultilingualGPT-5 by 3.651.755.3+3.6
- SciCodeGemma 4 31B by 2.645.542.9+2.6
AgentsGPT-5
- GDPValGPT-5 by 14.96.121+14.9
- τ-Bench V3 · BankingGPT-5 by 7.314.822.1+7.3
ReasoningGPT-5
- Humanity's Last ExamGPT-5 by 4.923.628.5+4.9
- CritPtGPT-5 by 4.31.45.7+4.3
- GPQA Diamondtie85.785.4tie
FactsGPT-5
- SimpleQA VerifiedGPT-5 by 39.710.450.1+39.7
- AA-Omniscience · AccuracyGPT-5 by 20.32040.3+20.3
- Vectara HHEM hallucination ratelower is betterGemma 4 31B by 7.77.415.1+7.7
- AA-Omniscience · Non-hallucinationGPT-5 by 2.81517.8+2.8
Images and chartsGPT-5
- CharXiv (RQ)GPT-5 by 13.267.981.1+13.2
- LMArena · VisionGemma 4 31B by 69 rating points12771208+69 rating
- MMMUGPT-5 by 3.880.484.2+3.8
- MMMU-Protie73.474.2tie
Following instructionsGemma 4 31B
- IFBenchGemma 4 31B by 2.575.673.1+2.5
Other results16 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-OmniscienceGPT-5 by 39.2-47.9-8.7+39.2
- τ²-Bench Telecom (AA run)GPT-5 by 24.959.984.8+24.9
- AA Agentic IndexGPT-5 by 19.86.726.5+19.8
- HLE (with tools)GPT-5 by 8.726.535.2+8.7
- vectara_avg_summary_lengthGPT-5 by 86.9 rating points75.8162.7+86.9 rating
- AA IntelligenceGPT-5 by 8.314.723+8.3
- Terminal-Bench 2.0Gemma 4 31B by 7.742.935.2+7.7
- vectara_factual_consistencyGemma 4 31B by 7.792.684.9+7.7
- Artificial Analysis Coding IndexGemma 4 31B by 5.643.437.8+5.6
- τ²-BenchGPT-5 by 5.576.982.4+5.5
- MMLU-ProGPT-5 by 1.985.287.1+1.9
- HMMT Nov. 2025GPT-5 by 1.787.589.2+1.7
- MMLU-ReduxGPT-5 by 1.693.795.3+1.6
- GPQA (unspecified)GPT-5 by 1.484.385.7+1.4
- HMMT Feb. 2025tie88.788.3tie
- vectara_answer_ratetie10099.9tie
Questions people ask
Which is better, Gemma 4 31B or GPT-5?
GPT-5 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 95% less.
Which is better for coding?
GPT-5. It wins 5 of the 8 coding tests both models report; Gemma 4 31B wins 3.
Which is cheaper?
Gemma 4 31B costs $0.17 per million input tokens and $0.40 per million output tokens; GPT-5 costs $1.25 and $10.00. That makes Gemma 4 31B about 95% 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 24 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 16 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.