Claude Sonnet 4.5 vs GPT-5.1 Codex
Wins 2 of 7 areas
Coding · Long documents
Wins 4 of 7 areas
Agents · Reasoning · Images and charts · Following instructions
GPT-5.1 Codex wins more areas, narrowly.Claude Sonnet 4.5 is better at coding.
Scores updated · 20 tests both models report · How we compare
Where each one wins
Tests won in each of the seven 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.
- ReasoningHard problems that need careful thinking03GPT-5.1 Codex3 of 3 tests
- AgentsCarrying out multi-step tasks on its own01GPT-5.1 Codex1 of 1 test
- Images and chartsUnderstanding pictures, charts and video01GPT-5.1 Codex1 of 1 test
- Following instructionsDoing exactly what it is asked01GPT-5.1 Codex1 of 1 test
- CodingWriting and fixing software30Claude Sonnet 4.53 of 4 tests · 1 tie
- Long documentsFinding answers in very long texts10Claude Sonnet 4.51 of 1 test
- FactsGetting facts right instead of making them up11Even1 each
Agents, images and charts, 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-5.1 Codex costs 38% 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.1 Codex pulls ahead
- Real work tasks from 44 professionsGDPVal+14.1points ahead
- Follows unfamiliar, precisely checkable instructionsIFBench+12.7points ahead
- Very hard expert questions across many subjectsHumanity's Last Exam+7.9points ahead
Where Claude Sonnet 4.5 pulls ahead
- Avoids making up answers it doesn't knowAA-Omniscience · Non-hallucination+28.1points ahead
- Code for real scientific research problemsSciCode+5.5points ahead
- Fixes real GitHub issues in Python projectsSWE-bench Verified+3.5points ahead
Every test, side by side
All 20 tests both models report. The winning score is in its model's colour; marks a score checked independently.
CodingClaude Sonnet 4.5
- LMArena · WebDevClaude Sonnet 4.5 by 58 rating points13941336+58 rating
- SciCodeClaude Sonnet 4.5 by 5.545.740.2+5.5
- SWE-bench VerifiedClaude Sonnet 4.5 by 3.577.273.7+3.5
- Terminal-Bench Hardtie35.634.8tie
ReasoningGPT-5.1 Codex
- Humanity's Last ExamGPT-5.1 Codex by 7.917.825.7+7.9
- CritPtGPT-5.1 Codex by 4.61.15.7+4.6
- GPQA DiamondGPT-5.1 Codex by 2.683.486+2.6
FactsEven
- AA-Omniscience · Non-hallucinationClaude Sonnet 4.5 by 28.150.922.8+28.1
- AA-Omniscience · AccuracyGPT-5.1 Codex by 732.939.9+7
Images and chartsGPT-5.1 Codex
- MMMU-ProGPT-5.1 Codex by 3.868.772.5+3.8
Following instructionsGPT-5.1 Codex
- IFBenchGPT-5.1 Codex by 12.757.370+12.7
Other results7 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 Agentic IndexGPT-5.1 Codex by 33.217.550.7+33.2
- Artificial Analysis Coding IndexClaude Sonnet 4.5 by 15.552.136.6+15.5
- AA-OmniscienceClaude Sonnet 4.5 by 6.4-0.1-6.5+6.4
- swe_bench_bashClaude Sonnet 4.5 by 5.471.466+5.4
- τ²-Bench Telecom (AA run)GPT-5.1 Codex by 4.978.183+4.9
- AA IntelligenceGPT-5.1 Codex by 320.723.7+3
- Terminal-Bench 2.0GPT-5.1 Codex by 2.85052.8+2.8
Questions people ask
Which is better, Claude Sonnet 4.5 or GPT-5.1 Codex?
GPT-5.1 Codex wins four of the seven areas where both have results: agents, reasoning, images and charts and following instructions. Claude Sonnet 4.5 wins coding and long documents. They are level on facts.
Which is better for coding?
Claude Sonnet 4.5. It wins 3 of the 4 coding tests both models report; GPT-5.1 Codex wins none, and 1 is a tie.
Which is cheaper?
Claude Sonnet 4.5 costs $3.00 per million input tokens and $15.00 per million output tokens; GPT-5.1 Codex costs $1.25 and $10.00. That makes GPT-5.1 Codex about 38% cheaper for the same work.
How do you compare the two?
We use the 20 benchmark tests both models have published scores on. The verdict counts the 13 tests in the eight capability areas, and a gap under one point (ten on rating-style scales) counts as a tie. The other 7 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.