Claude Sonnet 4.5 vs GPT-5.2-Codex
GPT-5.2-Codex leads Claude Sonnet 4.5 on coding, 45.4 to 39.5 on the Vibe Coding Index, at about the same output price ($14.00 vs $15.00 per million). Updated October 22, 2026; 13 benchmarks have a result for both.
Claude Sonnet 4.5 or GPT-5.2-Codex: which to pick
Pick GPT-5.2-Codex for coding: it scores 45.4 on the Vibe Coding Index against 39.5 for Claude Sonnet 4.5.
Pick Claude Sonnet 4.5 for a larger context window (1M against 400K tokens) and work measured by SWE-bench Verified or SWE-bench Multilingual, where it leads.
- Shared results
- 13
- Claude Sonnet 4.5 only
- 82
- GPT-5.2-Codex only
- 9
- Like-for-like categories
- 3 of 9
Only benchmarks that tested both models count toward a pick; a result only one model has is shown but not compared.
Which one for your work
Each card is decided by one number both models carry. Where only one has it, the card says so and makes no call.
Coding
Vibe Coding Index, six public coding benchmarks
GPT-5.2-Codex
GPT-5.2-Codex scores 45.4 against 39.5.
3 benchmarks behind each score
Intelligence
AA Intelligence Index
GPT-5.2-Codex
GPT-5.2-Codex leads, 28.5 against 20.7.
Same board, both measured
Agentic work
AA Agentic Index
No call
Only Claude Sonnet 4.5 has a AA Agentic Index result, 15.8.
Directional only
Reasoning
GPQA Diamond
No call
Only Claude Sonnet 4.5 has a GPQA Diamond result, 81.6%.
Directional only
Math
AIME
No call
Only Claude Sonnet 4.5 has a AIME result, 88.2%.
Directional only
Knowledge
MMLU Pro
No call
Only Claude Sonnet 4.5 has a MMLU Pro result, 87.4%.
Directional only
Web design
Design Arena: websites
No call
Only Claude Sonnet 4.5 has a Design Arena: websites result, 1189.
Directional only
Long documents
Listed context window
Claude Sonnet 4.5
Claude Sonnet 4.5 takes 1M tokens against 400K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
GPT-5.2-Codex
Claude Sonnet 4.5 $0.011, GPT-5.2-Codex $0.0088 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
GPT-5.2-Codex
Claude Sonnet 4.5 $1.16, GPT-5.2-Codex $0.43.
Published attempt cost and pass rate
At a glance
- Coding index
- Claude Sonnet 4.5 39.5 from 3 benchmarks, GPT-5.2-Codex 45.4 from 3 benchmarks.
- Widest category
- Coding, 9.0 points apart on average over 9 shared benchmarks.
- Widest single gap
- Terminal-Bench: Claude Sonnet 4.5 46.5% against GPT-5.2-Codex 66.5%, 20.0 points apart on a 0 to 100 scale.
- Output price
- Claude Sonnet 4.5 $15.00 against GPT-5.2-Codex $14.00 per million output tokens, 1.1x apart.
- Context window
- Claude Sonnet 4.5 takes 1M tokens, GPT-5.2-Codex 400K.
Benchmark by benchmark
First the score: boards each model leads, per category, where both have a result. Then every board, a category to a fold; bars are each result on a 0 to 100 scale, so compare the two in a row, not one row with another.
| Category | Claude Sonnet 4.5 | Bars | GPT-5.2-Codex | Ties |
|---|---|---|---|---|
| Coding | 5 | 4 | ||
| Intelligence | 0 | 1 | ||
| Agentic work | 3 | 0 | ||
| All shared boards | 8 | 5 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index54
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| SWE-bench Verified | 74.8% | 72.8% | Claude Sonnet 4.5 |
| SWE-bench Multilingual | 67.0% | 66.3% | Claude Sonnet 4.5 |
| LMArena WebDev | 1394 | 1339 | Claude Sonnet 4.5 |
| AA Coding Index | 52.1 | Not measured | Only Claude Sonnet 4.5 measured |
| LiveCodeBench (Vals AI) | 73.0% | 88.0% | GPT-5.2-Codex |
| SWE-bench Verified (Vals AI) | 70.0% | 72.4% | GPT-5.2-Codex |
| Vibe Code Bench (Vals AI) | 22.6% | 37.9% | GPT-5.2-Codex |
| Terminal-Bench Hard (Artificial Analysis run) | Not measured | 37.1% | Only GPT-5.2-Codex measured |
| Terminal-Bench | 46.5% | 66.5% | GPT-5.2-Codex |
| GSO-Bench | 14.7% | Not measured | Only Claude Sonnet 4.5 measured |
| WeirdML | 47.7% | Not measured | Only Claude Sonnet 4.5 measured |
| Cybench | 60.0% | Not measured | Only Claude Sonnet 4.5 measured |
| ALE-Bench | Not measured | 1299.9 | Only GPT-5.2-Codex measured |
| LMArena Text: coding | 1488 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: software and IT | 1473 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena WebDev: React | 1386 | 1329 | Claude Sonnet 4.5 |
| LMArena WebDev: HTML | 1399 | 1348 | Claude Sonnet 4.5 |
| Neither model has a result on the other 22 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index01
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| AA Intelligence Index | 20.7 | 28.5 | GPT-5.2-Codex |
| Epoch Capabilities Index | 146.7 | Not measured | Only Claude Sonnet 4.5 measured |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index30
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| AA Agentic Index | 15.8 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: agents building web apps | 1060 | 1051 | Claude Sonnet 4.5 |
| Design Arena: agents building full-stack apps | 1050 | 993 | Claude Sonnet 4.5 |
| Design Arena: agents building mobile apps | 1137 | 1090 | Claude Sonnet 4.5 |
| Design Arena: agents building Android apps | Not measured | 1176 | Only GPT-5.2-Codex measured |
| Design Arena: agents building Godot games | Not measured | 1142 | Only GPT-5.2-Codex measured |
| τ²-Bench Telecom | Not measured | 92.1% | Only GPT-5.2-Codex measured |
| METR time horizons | 67.4% | Not measured | Only Claude Sonnet 4.5 measured |
| Remote Labor Index | 2.1% | Not measured | Only Claude Sonnet 4.5 measured |
| GDPval | 42.5% | Not measured | Only Claude Sonnet 4.5 measured |
| DeepResearch Bench | 52.6% | Not measured | Only Claude Sonnet 4.5 measured |
| OSWorld | 62.9% | Not measured | Only Claude Sonnet 4.5 measured |
| Vending-Bench 2 | $3,839 | Not measured | Only Claude Sonnet 4.5 measured |
| Berkeley Function Calling Leaderboard (BFCL) | 73.2% | Not measured | Only Claude Sonnet 4.5 measured |
| Neither model has a result on the other 27 boards here | |||
ReasoningDirectional onlyPublic boards, shown as published, kept out of the index16 boards, none shared
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| GPQA Diamond | 81.6% | Not measured | Only Claude Sonnet 4.5 measured |
| MMMU Pro (Vals AI) | 79.3% | Not measured | Only Claude Sonnet 4.5 measured |
| GPQA Diamond (Artificial Analysis run) | Not measured | 89.9% | Only GPT-5.2-Codex measured |
| Humanity's Last Exam (Artificial Analysis run) | Not measured | 35.7% | Only GPT-5.2-Codex measured |
| GPQA Diamond (Epoch AI run) | 82.3% | Not measured | Only Claude Sonnet 4.5 measured |
| ARC-AGI | 63.7% | Not measured | Only Claude Sonnet 4.5 measured |
| ARC-AGI-2 | 13.6% | Not measured | Only Claude Sonnet 4.5 measured |
| SimpleBench | 54.3% | Not measured | Only Claude Sonnet 4.5 measured |
| Chess puzzles | 10.0% | Not measured | Only Claude Sonnet 4.5 measured |
| Mystery game puzzles | 17.0% | Not measured | Only Claude Sonnet 4.5 measured |
| EBR-bench | 2.4% | Not measured | Only Claude Sonnet 4.5 measured |
| VPCT | 39.8% | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: hard prompts | 1462 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: expert | 1483 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: hard prompts in English | 1471 | Not measured | Only Claude Sonnet 4.5 measured |
| Kagi LLM Benchmark | 57.9% | Not measured | Only Claude Sonnet 4.5 measured |
| Neither model has a result on the other 6 boards here | |||
MathDirectional onlyPublic boards, shown as published, kept out of the index9 boards, none shared
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| AIME | 88.2% | Not measured | Only Claude Sonnet 4.5 measured |
| MGSM (Vals AI) | 94.3% | Not measured | Only Claude Sonnet 4.5 measured |
| OTIS Mock AIME | 77.8% | Not measured | Only Claude Sonnet 4.5 measured |
| FrontierMath, tiers 1 to 3 | 23.9% | Not measured | Only Claude Sonnet 4.5 measured |
| FrontierMath, tier 4 | 2.4% | Not measured | Only Claude Sonnet 4.5 measured |
| ProofBench | 19.0% | Not measured | Only Claude Sonnet 4.5 measured |
| MATH level 5 | 97.7% | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: math | 1449 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: mathematical work | 1462 | Not measured | Only Claude Sonnet 4.5 measured |
| Neither model has a result on the other 4 boards here | |||
KnowledgeDirectional onlyPublic boards, shown as published, kept out of the index14 boards, none shared
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| MMLU Pro | 87.4% | Not measured | Only Claude Sonnet 4.5 measured |
| LegalBench (Vals AI) | 84.1% | Not measured | Only Claude Sonnet 4.5 measured |
| CaseLaw (Vals AI) | 62.2% | Not measured | Only Claude Sonnet 4.5 measured |
| CorpFin (Vals AI) | 62.0% | Not measured | Only Claude Sonnet 4.5 measured |
| TaxEval (Vals AI) | 73.3% | Not measured | Only Claude Sonnet 4.5 measured |
| MortgageTax (Vals AI) | 64.0% | Not measured | Only Claude Sonnet 4.5 measured |
| MedQA (Vals AI) | 94.7% | Not measured | Only Claude Sonnet 4.5 measured |
| MedCode (Vals AI) | 44.1% | Not measured | Only Claude Sonnet 4.5 measured |
| SimpleQA Verified | 30.7% | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: science | 1448 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: medicine and healthcare | 1444 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: legal and government | 1451 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: business and finance | 1440 | Not measured | Only Claude Sonnet 4.5 measured |
| FACTS Benchmark Suite | 40.6% | Not measured | Only Claude Sonnet 4.5 measured |
| Neither model has a result on the other 4 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index8 boards, none shared
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| Design Arena: websites | 1189 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: UI components | 1170 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: game dev | 1166 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: data viz | 1167 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: 3D | 1157 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: all code categories | 1182 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: SVG | 1115 | Not measured | Only Claude Sonnet 4.5 measured |
| Design Arena: ASCII art | 1205 | Not measured | Only Claude Sonnet 4.5 measured |
| Neither model has a result on the other 1 board here | |||
GeneralDirectional onlyPublic boards, shown as published, kept out of the index24 boards, none shared
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| SAGE (Vals AI) | 36.1% | Not measured | Only Claude Sonnet 4.5 measured |
| MedScribe (Vals AI) | 84.5% | Not measured | Only Claude Sonnet 4.5 measured |
| IFBench | Not measured | 77.6% | Only GPT-5.2-Codex measured |
| Long context reasoning (AA-LCR) | Not measured | 82.3% | Only GPT-5.2-Codex measured |
| DTBench | 83.2% | Not measured | Only Claude Sonnet 4.5 measured |
| LMCA | 38.8% | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text | 1438 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: instruction following | 1459 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: creative writing | 1442 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: English | 1450 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: non-English | 1425 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: Chinese | 1460 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: German | 1427 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: Japanese | 1390 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: Korean | 1402 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: French | 1459 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: Spanish | 1458 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: Russian | 1437 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: Polish | 1423 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: multi-turn | 1465 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: longer queries | 1475 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: writing and language | 1442 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Text: entertainment and media | 1428 | Not measured | Only Claude Sonnet 4.5 measured |
| LMArena Document | 1450 | Not measured | Only Claude Sonnet 4.5 measured |
| Neither model has a result on the other 22 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Claude Sonnet 4.5 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| Neither model has a result on 5 boards here | |||
What each workload costs
Three fixed token mixes at each model's listed price, so per-token rates become a bill.
Chat turn
1K input + 500 output tokens
GPT-5.2-Codex costs less
Repository review
50K input + 3K output tokens
GPT-5.2-Codex costs less
Agent loop
200K input + 10K output tokens
GPT-5.2-Codex costs less
Listed OpenRouter rates, without cache or batch discounts. A workload that does not fit a model's context window would need splitting.
Specification differences
The leading value in a row is marked; a row with a missing value names no leader. Our two rows are marked in red.
| Specification | Anthropic Claude Sonnet 4.5 | OpenAI GPT-5.2-Codex |
|---|---|---|
| Maker | Anthropic | OpenAI |
| Weights | No public weights listed | No public weights listed |
| Released | September 29, 2025 | January 14, 2026 |
| Context window | 1M | 400K |
| Input $/Mtok | $3.00 | $1.75 |
| Output $/Mtok | $15.00 | $14.00 |
| Coding index | 39.5 | 45.4 |
| Independent measurements behind it | 3 | 3 |
| Cost per solved task | $1.16 | $0.43 |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Claude Sonnet 4.5 better than GPT-5.2-Codex for coding?
Pick GPT-5.2-Codex for coding: it scores 45.4 on the Vibe Coding Index against 39.5 for Claude Sonnet 4.5. Pick Claude Sonnet 4.5 for a larger context window (1M against 400K tokens) and work measured by SWE-bench Verified or SWE-bench Multilingual, where it leads.
Which is cheaper, Claude Sonnet 4.5 or GPT-5.2-Codex?
Claude Sonnet 4.5 costs $3.00 per million input tokens and $15.00 per million output tokens; GPT-5.2-Codex costs $1.75 and $14.00. Per solved SWE-bench Verified task, Claude Sonnet 4.5 costs $1.16 and GPT-5.2-Codex $0.43.
Which has the bigger context window, Claude Sonnet 4.5 or GPT-5.2-Codex?
Claude Sonnet 4.5, with 1M tokens against 400K.
How many benchmarks is the Claude Sonnet 4.5 vs GPT-5.2-Codex comparison based on?
13 benchmarks have a result for both models as of October 22, 2026. Claude Sonnet 4.5's coding index rests on 3 independent benchmarks and GPT-5.2-Codex's on 3. Where only one model has a result, the page says so instead of naming a winner.