← All Comparisons

Claude Sonnet 4.6 vs GPT-5.2 Codex

A detailed comparison of Claude Sonnet 4.6 (Anthropic) and GPT-5.2 Codex (OpenAI) across pricing, performance, and features.

Pricing Comparison

MetricClaude Sonnet 4.6GPT-5.2 CodexDifference
Input / 1M tokens$3.00$1.75-42%
Output / 1M tokens$15.00$14.00-7%
Context window200K200K
Max output16K65.536K

Benchmark Comparison

BenchmarkClaude Sonnet 4.6GPT-5.2 Codex
MMLU-Pro86%89%
HumanEval94%95.5%
GPQA70%76%

Capabilities

CapabilityClaude Sonnet 4.6GPT-5.2 Codex
code
reasoning
text
tool-use
vision

Claude Sonnet 4.6 Strengths

  • Opus 4.5 quality at 1/5th the cost
  • Best value for production workloads
  • 1M context in beta

Claude Sonnet 4.6 Weaknesses

  • Long context pricing doubles above 200K
  • Slightly below Opus 4.6 on hardest tasks

GPT-5.2 Codex Strengths

  • Strong coding performance
  • Available via API now
  • 200K context window

GPT-5.2 Codex Weaknesses

  • Being superseded by 5.3
  • Higher output cost than some competitors

Quick Verdict

Best value: GPT-5.2 Codex is the more affordable option at $1.75/$14 per 1M tokens.

Higher benchmarks: GPT-5.2 Codex scores higher on average across available benchmarks (86.8% avg).

Choose GPT-5.2 Codex if cost matters most. Choose Claude Sonnet 4.6 if you need the best possible quality for complex tasks.

More Comparisons