Model comparison

Claude Sonnet 4 vs GPT-5.1-Codex

Claude Sonnet 4 is the stronger model overall, scoring 40.8 to 38.6 on the Noometry Index. GPT-5.1-Codex costs 1.7× less per token, which makes it the better buy when Claude Sonnet 4's lead doesn't matter for your workload.

Last verified . 3 shared benchmarks.

Claude Sonnet 4 Anthropic

40.8

Rank #145 Confirmed

GPT-5.1-Codex OpenAI

38.6

Rank #186 Reported

Summary

  • They share 3 benchmarks with published results for both. Claude Sonnet 4 scores higher in 3 categories and GPT-5.1-Codex in 0 categories; 2 gaps are clear of the uncertainty.
  • The widest gap is in math, where Claude Sonnet 4 leads 43.3 to 30.3.
  • GPT-5.1-Codex is cheaper at $1.25 / $10 per million input/output tokens, against $3 / $15 for Claude Sonnet 4.
  • GPT-5.1-Codex accepts more context: 400K tokens versus 200K.

Side by side

Claude Sonnet 4 and GPT-5.1-Codex specifications
Claude Sonnet 4GPT-5.1-Codex
ProviderAnthropicOpenAI
Noometry Index40.838.6
Released2025-05-222025-11-12
WeightsProprietaryProprietary
Context window200K400K
Max output64K128K
Input $ / M tokens$3$1.25
Output $ / M tokens$15$10
Results tracked586

Sponsored placements are available on pages like this one. Advertise on Noometry

Category by category

Coding Claude Sonnet 4 leads

Claude Sonnet 4: 43.5 (#88), GPT-5.1-Codex: 41.9 (#116)

Coding benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
SWE-bench Verified (bash only)64.9%66%
ALE-Bench655.351,245
Aider Polyglot61.3%—
LMArena WebDev—1337
SciCode40%—
GSO4.9%—
WeirdML46.1%—
LMArena Coding1414—

Agentic & Tool Use Too close to call

Claude Sonnet 4: 38.5 (#31), GPT-5.1-Codex: 38.0 (#33)

Agentic & Tool Use benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
METR Time Horizons62%70.8%
Terminal-Bench—60.4%
TheAgentCompany33.1%—
Cybench35%—
DeepResearch Bench46.6%—
OSWorld43.9%—

Reasoning Not comparable

Claude Sonnet 4: 22.9 (#187), GPT-5.1-Codex: —

Reasoning benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
ARC-AGI-25.9%—
SimpleBench45.5%—
Kagi LLM Benchmark73%—
ARC-AGI-140%—
CritPt0.3%—
EnigmaEval3.1%—
LMArena Hard Prompts1372—
DTBench77.1%—
LMCA29%—
Epoch Capabilities Index141.69—
ForecastBench60.2—

Math Claude Sonnet 4 leads

Claude Sonnet 4: 43.3 (#80), GPT-5.1-Codex: 30.3 (#235)

Math benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
OTIS Mock AIME 2024-202571.1%—
ProofBench—9%
Omni-MATH60.2%—
LMArena Math1375—
MATH Level 584.4%—
FrontierMath (Feb 2025 set)4.1%—
FrontierMath Tier 4 (v1)0%—

Knowledge Not comparable

Claude Sonnet 4: 41.8 (#108), GPT-5.1-Codex: —

Knowledge benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
GPQA Diamond79.2%—
Humanity's Last Exam7.8%—
MMLU-Pro84.3%—
Confabulations13.2%—
Vectara Hallucination Rate10.3%—
GPQA (HELM)70.6%—
LMArena Expert1372—

Multimodal Not comparable

Claude Sonnet 4: 26.2 (#121), GPT-5.1-Codex: —

Multimodal benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
LMArena Vision1191—
GeoBench37%—
VPCT34%—
MindCube44.8%—

Multilingual Not comparable

Claude Sonnet 4: 46.7 (#156), GPT-5.1-Codex: —

Multilingual benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
LMArena Non-English1333—
LMArena Chinese1350—
LMArena French1363—
LMArena German1331—
LMArena Japanese1302—
LMArena Korean1291—
LMArena Russian1355—
LMArena Spanish1357—

Instruction Following Not comparable

Claude Sonnet 4: 71.7 (#145), GPT-5.1-Codex: —

Instruction Following benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
IFEval84%—
LMArena Instruction Following1376—

Long Context Not comparable

Claude Sonnet 4: 33.7 (#259), GPT-5.1-Codex: —

Long Context benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
Fiction.LiveBench46.9%—
LMArena Longer Query1398—

Writing & Preference Not comparable

Claude Sonnet 4: 57.1 (#132), GPT-5.1-Codex: —

Writing & Preference benchmarks
BenchmarkClaude Sonnet 4GPT-5.1-Codex
LMArena Text1351—
LMArena Creative Writing1345—
Short-Story Creative Writing81.4%—
EQ-Bench Creative Writing1483—
WildBench83.8%—
LMArena Multi-Turn1376—

Frequently asked questions

Is Claude Sonnet 4 better than GPT-5.1-Codex?

Claude Sonnet 4 is the stronger model overall, scoring 40.8 to 38.6 on the Noometry Index. GPT-5.1-Codex costs 1.7× less per token, which makes it the better buy when Claude Sonnet 4's lead doesn't matter for your workload.

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

GPT-5.1-Codex is cheaper. It lists at $1.25 per million input tokens and $10 per million output tokens; Claude Sonnet 4 lists at $3 and $15.

Is Claude Sonnet 4 or GPT-5.1-Codex better for coding?

Claude Sonnet 4 scores higher on coding benchmarks: 43.5 versus 41.9 in the Noometry coding category.

Which has the bigger context window?

GPT-5.1-Codex does, with 400K tokens against 200K.

How many benchmarks do Claude Sonnet 4 and GPT-5.1-Codex share?

3 benchmarks have published results for both models. Claude Sonnet 4 has 58 scored results on Noometry and GPT-5.1-Codex has 6.

Related comparisons

Go deeper