Model Comparison

Claude Sonnet 4 vs GPT-5 Codex

GPT-5 Codex significantly outperforms across most benchmarks.

Performance Benchmarks

Comparative analysis across standard metrics

1 benchmarks

Claude Sonnet 4 outperforms in 0 benchmarks, while GPT-5 Codex is better at 1 benchmark (SWE-Bench Verified).

GPT-5 Codex significantly outperforms across most benchmarks.

Thu May 14 2026 • llm-stats.com

Arena Performance

Human preference votes

Context Window

Maximum input and output token capacity

Only Claude Sonnet 4 specifies input context (200,000 tokens). Only Claude Sonnet 4 specifies output context (64,000 tokens).

Anthropic
Claude Sonnet 4
Input200,000 tokens
Output64,000 tokens
OpenAI
GPT-5 Codex
Input- tokens
Output- tokens
Thu May 14 2026 • llm-stats.com

Input Capabilities

Supported data types and modalities

Claude Sonnet 4 supports multimodal inputs, whereas GPT-5 Codex does not.

Claude Sonnet 4 can handle both text and other forms of data like images, making it suitable for multimodal applications.

Claude Sonnet 4

Text
Images
Audio
Video

GPT-5 Codex

Text
Images
Audio
Video

License

Usage and distribution terms

Both models are licensed under proprietary licenses.

Both models have usage restrictions defined by their respective organizations.

Claude Sonnet 4

Proprietary

Closed source

GPT-5 Codex

Proprietary

Closed source

Release Timeline

When each model was launched

Claude Sonnet 4 was released on 2025-05-22, while GPT-5 Codex was released on 2025-09-15.

GPT-5 Codex is 4 months newer than Claude Sonnet 4.

Claude Sonnet 4

May 22, 2025

11 months ago

GPT-5 Codex

Sep 15, 2025

8 months ago

3mo newer

Knowledge Cutoff

When training data ends

GPT-5 Codex has a documented knowledge cutoff of 2024-09-30, while Claude Sonnet 4's cutoff date is not specified.

We can confirm GPT-5 Codex's training data extends to 2024-09-30, but cannot make a direct comparison without Claude Sonnet 4's cutoff date.

Claude Sonnet 4

GPT-5 Codex

Sep 2024

Outputs Comparison

Notice missing or incorrect data?Start an Issue discussion

Key Takeaways

Larger context window (200,000 tokens)
Supports multimodal inputs
Higher SWE-Bench Verified score (74.5% vs 72.7%)
AnthropicClaude Sonnet 4
OpenAIGPT-5 Codex

Detailed Comparison

AI Model Comparison Table
Feature
Anthropic
Claude Sonnet 4
OpenAI
GPT-5 Codex

FAQ

Common questions about Claude Sonnet 4 vs GPT-5 Codex.

Which is better, Claude Sonnet 4 or GPT-5 Codex?

GPT-5 Codex significantly outperforms across most benchmarks. Claude Sonnet 4 is made by Anthropic and GPT-5 Codex is made by OpenAI. The best choice depends on your use case — compare their benchmark scores, pricing, and capabilities above.

How does Claude Sonnet 4 compare to GPT-5 Codex in benchmarks?

Claude Sonnet 4 scores MMMLU: 86.5%, TAU-bench Retail: 80.5%, GPQA: 75.4%, MMMU: 74.4%, SWE-Bench Verified: 72.7%. GPT-5 Codex scores SWE-Bench Verified: 74.5%.

What are the context window sizes for Claude Sonnet 4 and GPT-5 Codex?

Claude Sonnet 4 supports 200K tokens and GPT-5 Codex supports an unknown number of tokens. A larger context window lets you process longer documents, conversations, or codebases in a single request.

What are the main differences between Claude Sonnet 4 and GPT-5 Codex?

Key differences include multimodal support (yes vs no). See the full comparison above for benchmark-by-benchmark results.

Who makes Claude Sonnet 4 and GPT-5 Codex?

Claude Sonnet 4 is developed by Anthropic and GPT-5 Codex is developed by OpenAI.