Price Per TokenPrice Per Token
Anthropic
Anthropic
vs
Google
Google

Claude Sonnet 4 vs Gemini 2.5 Flash

A detailed comparison of pricing, benchmarks, and capabilities

OpenClaw

Deploy OpenClaw in Under 1 Minute We handle hosting, scaling, and maintenance

114 out of our 303 tracked models have had a price change in February.

Get our weekly newsletter on pricing changes, new releases, and tools.

Key Takeaways

Claude Sonnet 4 wins:

  • Higher intelligence benchmark
  • Better at coding

Gemini 2.5 Flash wins:

  • Cheaper input tokens
  • Cheaper output tokens
  • Larger context window
  • Faster response time
  • Better at math
Price Advantage
Gemini 2.5 Flash
Benchmark Advantage
Claude Sonnet 4
Context Window
Gemini 2.5 Flash
Speed
Gemini 2.5 Flash

Pricing Comparison

Price Comparison

MetricClaude Sonnet 4Gemini 2.5 FlashWinner
Input (per 1M tokens)$3.00$0.30 Gemini 2.5 Flash
Output (per 1M tokens)$15.00$2.50 Gemini 2.5 Flash
Cache Read (per 1M)$0.30$0.03 Gemini 2.5 Flash
Cache Write (per 1M)$3.75$0.08 Gemini 2.5 Flash
Using a 3:1 input/output ratio, Gemini 2.5 Flash is 86% cheaper overall.

Claude Sonnet 4 Providers

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

Gemini 2.5 Flash Providers

Vercel $0.30 (Cheapest)
Google AI Studio $0.30 (Cheapest)
Google $0.30 (Cheapest)

Benchmark Comparison

8
Benchmarks Compared
4
Claude Sonnet 4 Wins
3
Gemini 2.5 Flash Wins

Benchmark Scores

BenchmarkClaude Sonnet 4Gemini 2.5 FlashWinner
Intelligence Index
Overall intelligence score
33.021.1
Coding Index
Code generation & understanding
30.617.8
Math Index
Mathematical reasoning
38.060.3
MMLU Pro
Academic knowledge
83.780.9
GPQA
Graduate-level science
68.368.3-
LiveCodeBench
Competitive programming
44.949.5
Aider
Real-world code editing
61.355.1
AIME
Competition math
40.750.0
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
Gemini 2.5 Flash
1,048,576
tokens
Max output: 65,535 tokens
Gemini 2.5 Flash has a 5% larger context window.

Speed Performance

MetricClaude Sonnet 4Gemini 2.5 FlashWinner
Tokens/second69.8 tok/s246.2 tok/s
Time to First Token1.17s0.47s
Gemini 2.5 Flash responds 253% faster on average.

Capabilities

Feature Comparison

FeatureClaude Sonnet 4Gemini 2.5 Flash
Vision (Image Input)
Tool/Function Calls
Reasoning Mode
Audio Input
Audio Output
PDF Input
Prompt Caching
Web Search

License & Release

PropertyClaude Sonnet 4Gemini 2.5 Flash
LicenseProprietaryProprietary
AuthorAnthropicGoogle
ReleasedMay 2025Jun 2025

Claude Sonnet 4 Modalities

Input
imagetextfile
Output
text

Gemini 2.5 Flash Modalities

Input
fileimagetextaudiovideo
Output
text

Related Comparisons

Compare Claude Sonnet 4 with:

Compare Gemini 2.5 Flash with:

Frequently Asked Questions

Gemini 2.5 Flash has cheaper input pricing at $0.30/M tokens. Gemini 2.5 Flash has cheaper output pricing at $2.50/M tokens.
Claude Sonnet 4 scores higher on coding benchmarks with a score of 30.6, compared to Gemini 2.5 Flash's score of 17.8.
Claude Sonnet 4 has a 1,000,000 token context window, while Gemini 2.5 Flash has a 1,048,576 token context window.
Claude Sonnet 4 supports vision. Gemini 2.5 Flash supports vision.