Price Per TokenPrice Per Token
Anthropic
Anthropic
vs
OpenAI
OpenAI

Claude Sonnet 4 vs GPT-4o

A detailed comparison of pricing, benchmarks, and capabilities

Sponsor Price Per Token Reach 5000+ developers comparing LLM APIs

116 out of our 296 tracked models have had a price change in January.

Make informed model choices with updates on pricing, new releases, and tools with our weekly newsletter.

Key Takeaways

Claude Sonnet 4 wins:

  • Larger context window
  • Higher intelligence benchmark
  • Better at coding
  • Better at math
  • Has reasoning mode

GPT-4o wins:

  • Cheaper input tokens
  • Cheaper output tokens
  • Faster response time
Price Advantage
GPT-4o
Benchmark Advantage
Claude Sonnet 4
Context Window
Claude Sonnet 4
Speed
GPT-4o

Pricing Comparison

Price Comparison

MetricClaude Sonnet 4GPT-4oWinner
Input (per 1M tokens)$3.00$2.50 GPT-4o
Output (per 1M tokens)$15.00$10.00 GPT-4o
Cache Read (per 1M)$300000.00$1250000.00 Claude Sonnet 4
Cache Write (per 1M)$3750000.00N/A Claude Sonnet 4
Using a 3:1 input/output ratio, GPT-4o is 27% cheaper overall.

Claude Sonnet 4 Providers

Amazon Bedrock $3.00 (Cheapest)
OpenRouter $3.00 (Cheapest)
Google $3.00 (Cheapest)
Anthropic $3.00 (Cheapest)

GPT-4o Providers

OpenAI $2.50 (Cheapest)
Vercel $2.50 (Cheapest)
OpenRouter $2.50 (Cheapest)
Azure $2.50 (Cheapest)

Benchmark Comparison

8
Benchmarks Compared
4
Claude Sonnet 4 Wins
1
GPT-4o Wins

Benchmark Scores

BenchmarkClaude Sonnet 4GPT-4oWinner
Intelligence Index
Overall intelligence score
32.715.6
Coding Index
Code generation & understanding
29.4--
Math Index
Mathematical reasoning
38.0--
MMLU Pro
Academic knowledge
83.7--
GPQA
Graduate-level science
68.352.1
LiveCodeBench
Competitive programming
44.931.7
Aider
Real-world code editing
61.374.4
AIME
Competition math
40.711.7
Claude Sonnet 4 significantly outperforms in coding benchmarks.

Cost vs Quality

X-axis:
Y-axis:
Loading chart...
Claude Sonnet 4
Other models

Context & Performance

Context Window

Claude Sonnet 4
1,000,000
tokens
Max output: 64,000 tokens
GPT-4o
128,000
tokens
Max output: 16,384 tokens
Claude Sonnet 4 has a 87% larger context window.

Speed Performance

MetricClaude Sonnet 4GPT-4oWinner
Tokens/second66.3 tok/s77.3 tok/s
Time to First Token1.90s0.51s
GPT-4o responds 17% faster on average.

Capabilities

Feature Comparison

FeatureClaude Sonnet 4GPT-4o
Vision (Image Input)
Tool/Function Calls
Reasoning Mode
Audio Input
Audio Output
PDF Input
Prompt Caching
Web Search

License & Release

PropertyClaude Sonnet 4GPT-4o
LicenseProprietaryProprietary
AuthorAnthropicOpenAI
ReleasedMay 2025May 2024

Claude Sonnet 4 Modalities

Input
imagetextfile
Output
text

GPT-4o Modalities

Input
textimagefile
Output
text

Related Comparisons

Compare Claude Sonnet 4 with:

Compare GPT-4o with:

Frequently Asked Questions

GPT-4o has cheaper input pricing at $2.50/M tokens. GPT-4o has cheaper output pricing at $10.00/M tokens.
Claude Sonnet 4 scores higher on coding benchmarks with a score of 29.4, compared to GPT-4o's score of N/A.
Claude Sonnet 4 has a 1,000,000 token context window, while GPT-4o has a 128,000 token context window.
Claude Sonnet 4 supports vision. GPT-4o supports vision.