Claude Sonnet 4 vs gpt-oss-20b
Wins 4 of 6 areas
Coding · Agents · Facts · Long documents
Wins 1 of 6 areas
Following instructions
Claude Sonnet 4 is the stronger all-rounder.gpt-oss-20b is cheaper and better at following instructions.
Scores updated · 31 tests both models report · How we compare
Where each one wins
Tests won in each of the six areas where both have results. 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 software51Claude Sonnet 45 of 6 tests
- FactsGetting facts right instead of making them up20Claude Sonnet 42 of 2 tests
- AgentsCarrying out multi-step tasks on its own21Claude Sonnet 42 of 3 tests
- Long documentsFinding answers in very long texts10Claude Sonnet 41 of 1 test
- Following instructionsDoing exactly what it is asked01gpt-oss-20b1 of 1 test
- ReasoningHard problems that need careful thinking11Even1 each · 1 tie
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.
gpt-oss-20b costs 99% less for the same work.
The biggest differences
The three tests each model wins by the widest margin. Scores are out of 100.
Where Claude Sonnet 4 pulls ahead
- Avoids making up answers it doesn't knowAA-Omniscience · Non-hallucination+65points ahead
- Reasons across sets of long documentsAA-LCR+35.6points ahead
- Command-line tasks in a real terminalTerminal-Bench 2.1+22.4points ahead
Where gpt-oss-20b pulls ahead
- Finds hard-to-locate facts by browsing the webBrowseComp+16.1points ahead
- Recent programming contest problemsLiveCodeBench v6+12.5points ahead
- Follows unfamiliar, precisely checkable instructionsIFBench+10.4points ahead
Every test, side by side
All 31 tests both models report. The winning score is in its model's colour; marks a score checked independently.
CodingClaude Sonnet 4
- Terminal-Bench 2.1Claude Sonnet 4 by 22.436.313.9+22.4
- Terminal-Bench HardClaude Sonnet 4 by 20.531.110.6+20.5
- SWE-bench VerifiedClaude Sonnet 4 by 20.372.752.4+20.3
- SWE-bench MultilingualClaude Sonnet 4 by 1556.941.9+15
- LiveCodeBench v6gpt-oss-20b by 12.548.561+12.5
- SciCodeClaude Sonnet 4 by 1.14038.9+1.1
AgentsClaude Sonnet 4
- BrowseCompgpt-oss-20b by 16.112.228.3+16.1
- GDPValClaude Sonnet 4 by 9.79.70+9.7
- τ-Bench V3 · BankingClaude Sonnet 4 by 9.716.77+9.7
ReasoningEven
- GPQA DiamondClaude Sonnet 4 by 8.977.768.8+8.9
- CritPtgpt-oss-20b by 1.10.31.4+1.1
- Humanity's Last Examtie10.711tie
FactsClaude Sonnet 4
- AA-Omniscience · Non-hallucinationClaude Sonnet 4 by 6570.95.9+65
- AA-Omniscience · AccuracyClaude Sonnet 4 by 6.722.716+6.7
Following instructionsgpt-oss-20b
- IFBenchgpt-oss-20b by 10.454.765.1+10.4
Other results15 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 Sonnet 4 by 63.20.2-63+63.2
- TAU-bench (retail)Claude Sonnet 4 by 25.780.554.8+25.7
- AIME 2025gpt-oss-20b by 18.770.589.2+18.7
- Artificial Analysis Coding IndexClaude Sonnet 4 by 16.937.620.7+16.9
- AA IntelligenceClaude Sonnet 4 by 9.918.99+9.9
- XSTestClaude Sonnet 4 by 9.496.687.2+9.4
- MMLU-ProClaude Sonnet 4 by 7.383.776.4+7.3
- τ²-Bench Telecom (AA run)Claude Sonnet 4 by 4.464.660.2+4.4
- τ²-Benchgpt-oss-20b by 2.545.247.7+2.5
- AIR-Bench 2024Claude Sonnet 4 by 2.388.386+2.3
- IFEvaltie87.686.7tie
- HarmBenchtie9898.7tie
- anthropic_red_teamtie99.299.7tie
- bbqtie96.696.7tie
- simple_safety_teststie100100tie
Questions people ask
Which is better, Claude Sonnet 4 or gpt-oss-20b?
Claude Sonnet 4 wins four of the six areas where both have results: coding, agents, facts and long documents. gpt-oss-20b wins following instructions, and costs 99% less. They are level on reasoning.
Which is better for coding?
Claude Sonnet 4. It wins 5 of the 6 coding tests both models report; gpt-oss-20b wins 1.
Which is cheaper?
Claude Sonnet 4 costs $3.00 per million input tokens and $15.00 per million output tokens; gpt-oss-20b costs $0.07 and $0.18. That makes gpt-oss-20b about 99% cheaper for the same work.
How do you compare the two?
We use the 31 benchmark tests both models have published scores on. The verdict counts the 16 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 15 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.