Enter opens the highlighted result. Esc closes.

Claude Sonnet 4.5 vs GPT-5.1-Codex

Updated October 21, 2026. 15 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.

Claude Sonnet 4.5Anthropic
Coding
59.1
Overall
20.7
Output $/M
$15.00
8
GPT-5.1-CodexOpenAI
Coding
50.5
Overall
23.7
Output $/M
$10.00
7
vs boards won of 15 shared

Decision reading

Pick Claude Sonnet 4.5 for coding: it scores 59.1 on the Vibe Coding Index against 50.5 for GPT-5.1-Codex.

Pick GPT-5.1-Codex when output tokens cost 1.5x less, or when a solved task costs $0.892 against $1.16.

Shared results
15
Claude Sonnet 4.5 only
77
GPT-5.1-Codex only
11
Like-for-like categories
4 of 9

Shared results can support a head-to-head reading. Results only one model has describe coverage, not superiority.

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.

At a glance

Coding index
Claude Sonnet 4.5 59.1 from 2 benchmarks, GPT-5.1-Codex 50.5 from 2 benchmarks.
Widest category
Coding, 9.8 points apart on average over 6 shared benchmarks.
Widest single gap
LiveCodeBench (Vals AI): Claude Sonnet 4.5 73.0% against GPT-5.1-Codex 85.5%, 12.5 points apart on a 0 to 100 scale.
Output price
Claude Sonnet 4.5 $15.00 against GPT-5.1-Codex $10.00 per million output tokens, 1.5x apart.
Context window
Claude Sonnet 4.5 takes 1M tokens, GPT-5.1-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.

Boards won, where both have a result
CategoryClaude Sonnet 4.5BarsGPT-5.1-CodexTies
Coding42
Intelligence01
Agentic work12
Web design32
All shared boards87
CodingLike-for-likeFour of these boards feed the Vibe Coding Index42
Coding benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
SWE-bench Verified74.8%66.0%Claude Sonnet 4.5
SWE-bench Multilingual67.0%Not measuredOnly Claude Sonnet 4.5 measured
LMArena WebDev13941337Claude Sonnet 4.5
AA Coding Index52.1Not measuredOnly Claude Sonnet 4.5 measured
LiveCodeBench (Vals AI)73.0%85.5%GPT-5.1-Codex
SWE-bench Verified (Vals AI)70.0%Not measuredOnly Claude Sonnet 4.5 measured
Vibe Code Bench (Vals AI)22.6%13.1%Claude Sonnet 4.5
LiveCodeBench (Artificial Analysis run)Not measured84.9%Only GPT-5.1-Codex measured
Terminal-Bench Hard (Artificial Analysis run)Not measured34.8%Only GPT-5.1-Codex measured
Terminal-Bench46.5%57.8%GPT-5.1-Codex
GSO-Bench14.7%Not measuredOnly Claude Sonnet 4.5 measured
WeirdML47.7%Not measuredOnly Claude Sonnet 4.5 measured
Cybench60.0%Not measuredOnly Claude Sonnet 4.5 measured
ALE-BenchNot measured1244.9Only GPT-5.1-Codex measured
LMArena Text: coding1488Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: software and IT1473Not measuredOnly Claude Sonnet 4.5 measured
LMArena WebDev: React1386Not measuredOnly Claude Sonnet 4.5 measured
LMArena WebDev: HTML13991346Claude Sonnet 4.5
Neither model has a result on the other 20 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index01
Intelligence benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
AA Intelligence Index20.723.7GPT-5.1-Codex
Epoch Capabilities Index146.7Not measuredOnly Claude Sonnet 4.5 measured
Agentic workLike-for-likePublic boards, shown as published, kept out of the index12
Agentic work benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
AA Agentic Index15.8Not measuredOnly Claude Sonnet 4.5 measured
Design Arena: agents building web apps10601018Claude Sonnet 4.5
Design Arena: agents building full-stack apps10501086GPT-5.1-Codex
Design Arena: agents building mobile apps11371191GPT-5.1-Codex
τ²-Bench TelecomNot measured83.0%Only GPT-5.1-Codex measured
METR time horizons67.4%Not measuredOnly Claude Sonnet 4.5 measured
Remote Labor Index2.1%Not measuredOnly Claude Sonnet 4.5 measured
GDPval42.5%Not measuredOnly Claude Sonnet 4.5 measured
DeepResearch Bench52.6%Not measuredOnly Claude Sonnet 4.5 measured
OSWorld62.9%Not measuredOnly Claude Sonnet 4.5 measured
Vending-Bench 2$3,839Not measuredOnly Claude Sonnet 4.5 measured
Neither model has a result on the other 28 boards here
ReasoningDirectional onlyPublic boards, shown as published, kept out of the index15 boards, none shared
Reasoning benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
GPQA Diamond81.6%Not measuredOnly Claude Sonnet 4.5 measured
MMMU Pro (Vals AI)79.3%Not measuredOnly Claude Sonnet 4.5 measured
GPQA Diamond (Artificial Analysis run)Not measured86.0%Only GPT-5.1-Codex measured
Humanity's Last Exam (Artificial Analysis run)Not measured25.7%Only GPT-5.1-Codex measured
GPQA Diamond (Epoch AI run)82.3%Not measuredOnly Claude Sonnet 4.5 measured
ARC-AGI63.7%Not measuredOnly Claude Sonnet 4.5 measured
ARC-AGI-213.6%Not measuredOnly Claude Sonnet 4.5 measured
SimpleBench54.3%Not measuredOnly Claude Sonnet 4.5 measured
Chess puzzles10.0%Not measuredOnly Claude Sonnet 4.5 measured
Mystery game puzzles17.0%Not measuredOnly Claude Sonnet 4.5 measured
EBR-bench2.4%Not measuredOnly Claude Sonnet 4.5 measured
VPCT39.8%Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: hard prompts1462Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: expert1483Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: hard prompts in English1471Not measuredOnly 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 index11 boards, none shared
Math benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
AIME88.2%Not measuredOnly Claude Sonnet 4.5 measured
MGSM (Vals AI)94.3%Not measuredOnly Claude Sonnet 4.5 measured
AA Math IndexNot measured95.7Only GPT-5.1-Codex measured
AIME 2025 (Artificial Analysis run)Not measured95.7%Only GPT-5.1-Codex measured
OTIS Mock AIME77.8%Not measuredOnly Claude Sonnet 4.5 measured
FrontierMath, tiers 1 to 323.9%Not measuredOnly Claude Sonnet 4.5 measured
FrontierMath, tier 42.4%Not measuredOnly Claude Sonnet 4.5 measured
ProofBench19.0%Not measuredOnly Claude Sonnet 4.5 measured
MATH level 597.7%Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: math1449Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: mathematical work1462Not measuredOnly Claude Sonnet 4.5 measured
Neither model has a result on the other 2 boards here
KnowledgeDirectional onlyPublic boards, shown as published, kept out of the index14 boards, none shared
Knowledge benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
MMLU Pro87.4%Not measuredOnly Claude Sonnet 4.5 measured
LegalBench (Vals AI)84.1%Not measuredOnly Claude Sonnet 4.5 measured
CaseLaw (Vals AI)62.2%Not measuredOnly Claude Sonnet 4.5 measured
CorpFin (Vals AI)62.0%Not measuredOnly Claude Sonnet 4.5 measured
TaxEval (Vals AI)73.3%Not measuredOnly Claude Sonnet 4.5 measured
MortgageTax (Vals AI)64.0%Not measuredOnly Claude Sonnet 4.5 measured
MedQA (Vals AI)94.7%Not measuredOnly Claude Sonnet 4.5 measured
MedCode (Vals AI)44.1%Not measuredOnly Claude Sonnet 4.5 measured
MMLU Pro (Artificial Analysis run)Not measured86.0%Only GPT-5.1-Codex measured
SimpleQA Verified30.7%Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: science1448Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: medicine and healthcare1444Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: legal and government1451Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: business and finance1440Not measuredOnly Claude Sonnet 4.5 measured
Neither model has a result on the other 3 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index32
Web design benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
Design Arena: websites11901162Claude Sonnet 4.5
Design Arena: UI components11731237GPT-5.1-Codex
Design Arena: game dev11661138Claude Sonnet 4.5
Design Arena: data viz11671213GPT-5.1-Codex
Design Arena: 3D1158Not measuredOnly Claude Sonnet 4.5 measured
Design Arena: all code categories11831153Claude Sonnet 4.5
Design Arena: SVG1114Not measuredOnly Claude Sonnet 4.5 measured
Design Arena: ASCII art1204Not measuredOnly 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
General benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
SAGE (Vals AI)36.1%Not measuredOnly Claude Sonnet 4.5 measured
MedScribe (Vals AI)84.5%Not measuredOnly Claude Sonnet 4.5 measured
IFBenchNot measured70.0%Only GPT-5.1-Codex measured
Long context reasoning (AA-LCR)Not measured69.3%Only GPT-5.1-Codex measured
DTBench83.2%Not measuredOnly Claude Sonnet 4.5 measured
LMCA38.8%Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text1438Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: instruction following1459Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: creative writing1442Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: English1450Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: non-English1425Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: Chinese1460Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: German1427Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: Japanese1390Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: Korean1402Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: French1459Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: Spanish1458Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: Russian1437Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: Polish1423Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: multi-turn1465Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: longer queries1475Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: writing and language1442Not measuredOnly Claude Sonnet 4.5 measured
LMArena Text: entertainment and media1428Not measuredOnly Claude Sonnet 4.5 measured
LMArena Document1450Not measuredOnly 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
Image generation benchmarks for Claude Sonnet 4.5 and GPT-5.1-Codex
BenchmarkClaude Sonnet 4.5GPT-5.1-CodexLeader
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

Claude Sonnet 4.5$0.011Fits in one request
GPT-5.1-Codex$0.0063Fits in one request

GPT-5.1-Codex costs less

Repository review

50K input + 3K output tokens

Claude Sonnet 4.5$0.195Fits in one request
GPT-5.1-Codex$0.092Fits in one request

GPT-5.1-Codex costs less

Agent loop

200K input + 10K output tokens

Claude Sonnet 4.5$0.750Fits in one request
GPT-5.1-Codex$0.350Fits in one request

GPT-5.1-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.

Specifications of Claude Sonnet 4.5 and GPT-5.1-Codex
SpecificationAnthropic Claude Sonnet 4.5OpenAI GPT-5.1-Codex
MakerAnthropicOpenAI
WeightsNo public weights listedNo public weights listed
ReleasedSeptember 29, 2025November 13, 2025
Context window1M400K
Input $/Mtok$3.00$1.25
Output $/Mtok$15.00$10.00
Coding index59.150.5
Independent measurements behind it22
Cost per solved task$1.16$0.892
SourceOpenRouter listingOpenRouter listing

Questions

Is Claude Sonnet 4.5 better than GPT-5.1-Codex for coding?

Pick Claude Sonnet 4.5 for coding: it scores 59.1 on the Vibe Coding Index against 50.5 for GPT-5.1-Codex. Pick GPT-5.1-Codex when output tokens cost 1.5x less, or when a solved task costs $0.892 against $1.16.

Which is cheaper, Claude Sonnet 4.5 or GPT-5.1-Codex?

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. Per solved SWE-bench Verified task, Claude Sonnet 4.5 costs $1.16 and GPT-5.1-Codex $0.892.

Which has the bigger context window, Claude Sonnet 4.5 or GPT-5.1-Codex?

Claude Sonnet 4.5, with 1M tokens against 400K.

How many benchmarks is the Claude Sonnet 4.5 vs GPT-5.1-Codex comparison based on?

15 benchmarks have a result for both models as of October 21, 2026. Claude Sonnet 4.5's coding index rests on 2 independent benchmarks and GPT-5.1-Codex's on 2. Where only one model has a result, the page says so instead of naming a winner.

Compare next

Embed this comparison on your site

Free under CC BY 4.0, while the source link stays visible. Preview the frame · Terms and other embeds

<iframe src="https://llmbenchmark.ai/embed/compare/claude-sonnet-4-5-vs-gpt-5-1-codex" title="Claude Sonnet 4.5 vs GPT-5.1-Codex, LLMBenchmark.ai" width="100%" height="360" style="border:0;max-width:100%" loading="lazy"></iframe>
<p style="font:13px/1.4 sans-serif;margin:6px 0 0">Source: <a href="https://llmbenchmark.ai/compare/claude-sonnet-4-5-vs-gpt-5-1-codex">LLMBenchmark.ai, Claude Sonnet 4.5 vs GPT-5.1-Codex</a></p>