Claude Sonnet 5 or Gemini 3.8 Flash: which to choose?

Claude Sonnet 5 (Anthropic) and Gemini 3.8 Flash (Google DeepMind) compared point by point: measured performance, pricing, context and capabilities.

Data as of October 22, 2026

Side-by-side comparison

CriterionClaude Sonnet 5Gemini 3.8 Flash
DeveloperAnthropicGoogle DeepMind
ReleasedJune 30, 2026September 2, 2026
Capability index79.3 / 10083.7 / 100
Input price$2$0.75
Output price$10$3.75
Cost of a typical task$0.06$0.023
Context window1,000,000 tokens1,048,576 tokens
Maximum output50,000 tokens65,536 tokens
Reasoning modeYesYes
Tool callingYesYes
Accepted inputstext, image, PDFtext, image, video, audio, PDF
Open weightsNoNo
Knowledge cutoffJanuary 31, 2026Not disclosed

Two models head to head

This comparison pits two mid-range models, balancing quality and cost against each other: Claude Sonnet 5 and Gemini 3.8 Flash, one from Anthropic, the other from Google DeepMind. The first dates from June 30, 2026, the second from September 2, 2026.

All figures below come from public sources checked on October 22, 2026: models.dev and OpenRouter for prices and capabilities, Epoch AI for scores.

Performance

On our capability index, Claude Sonnet 5 scores 79.3 out of 100 and Gemini 3.8 Flash 83.7. Gemini 3.8 Flash leads by 4.4 points.

On the 5 benchmarks reported for both, Claude Sonnet 5 wins 1 time and Gemini 3.8 Flash 4:

  • GPQA Diamond (PhD-level science questions): Claude Sonnet 5 90.5%, Gemini 3.8 Flash 95.4%
  • OTIS Mock AIME (competition mathematics problems): Claude Sonnet 5 94.7%, Gemini 3.8 Flash 98.9%
  • FrontierMath (very hard research-level mathematics): Claude Sonnet 5 65.6%, Gemini 3.8 Flash 68.4%
  • FrontierCode (advanced programming tasks): Claude Sonnet 5 42.7%, Gemini 3.8 Flash 41.2%
  • APEX-Agents (professional tasks carried out by an agent): Claude Sonnet 5 54.5%, Gemini 3.8 Flash 64.3%

Budget

Claude Sonnet 5 costs $2 per million input tokens and $10 per million output tokens; Gemini 3.8 Flash costs $0.75 and $3.75.

For a typical agent task (read 20,000 tokens, write 2,000), expect $0.06 with Claude Sonnet 5 versus $0.023 with Gemini 3.8 Flash. Gemini 3.8 Flash is 2.7 times cheaper, a gap that adds up quickly over 1,000 tasks: $37.5 difference.

Run the numbers with your own volumes in the agent cost calculator.

Context and capabilities

Gemini 3.8 Flash reads more in one go: 1,048,576 tokens of context (roughly 1,573 pages), versus 1,000,000 for Claude Sonnet 5.

Reasoning mode: Claude Sonnet 5 yes, Gemini 3.8 Flash yes. Tool calling: Claude Sonnet 5 yes, Gemini 3.8 Flash yes. Image input: Claude Sonnet 5 yes, Gemini 3.8 Flash yes.

Neither publishes its weights: both are used through an API.

In short

Our reading of the data:

  • Choose Gemini 3.8 Flash for a higher capability index, a lower cost and a more recent release.

This verdict relies on public figures; it does not replace a trial on your own tasks.

Other comparisons

Frequently asked questions

Claude Sonnet 5 or Gemini 3.8 Flash: which is better?

On our index (Epoch AI data), Claude Sonnet 5 scores 79.3 and Gemini 3.8 Flash 83.7 out of 100. The best choice also depends on price and on your use case.

Which one is cheaper?

Gemini 3.8 Flash. To read 20,000 tokens and write 2,000, expect $0.06 with Claude Sonnet 5 and $0.023 with Gemini 3.8 Flash (prices as of October 22, 2026).

Which one has the larger context window?

Gemini 3.8 Flash, with 1,048,576 tokens versus 1,000,000.

Can I run Claude Sonnet 5 or Gemini 3.8 Flash on my own servers?

No: both are closed models, available through an API.

Data sources

Data as of October 22, 2026

Report an error

Does a figure, a date or a fact look wrong? Tell us: every report is checked.