Claude Sonnet 5 vs Gemini 3: A Full Comparison

Updated:
Ask AI about this article
Claude Sonnet 5 vs Gemini 3: A Full Comparison
In short. Gemini 3.1 Pro wins on "pure" reasoning (ARC-AGI-2, GPQA) and is the only one of the three that natively works with audio and video, not just text and images. Sonnet 5 wins on predictable long context billing and agent coding in the SWE-bench style. It's not one Gemini model that should be compared, but two — I'll explain why below.

I've already written a full technical breakdown of Sonnet 5 — architecture, effort levels, benchmarks, limitations — in a separate review. Here — only a direct comparison with the Gemini 3 lineup.

Contents

Two Gemini models instead of one

Unlike comparisons with GPT-5.5 or Kimi K2.5, there isn't one obvious competing model here. The Gemini 3 lineup simultaneously features Gemini 3.1 Pro — the flagship reasoning model released on February 19, 2026 — and Gemini 3.5 Flash, a cheaper mid-2026 model focused specifically on agent and coding tasks. Comparing Sonnet 5 to only one of them would be incomplete: Pro is the closest competitor in the "flagship" class, Flash is the closest in price positioning and coding focus.

Therefore, where deep reasoning and multimodality are discussed, I compare with Gemini 3.1 Pro. Where agent coding and price are discussed, I compare with Gemini 3.5 Flash. This is not an attempt to "force" a favorable comparison in each section, but an honest acknowledgment that Google does not have a direct equivalent to Sonnet 5 in the "mid-segment, agency-oriented" positioning.

Price and long context billing

Model Input (per 1M, ≤200K) Output (per 1M, ≤200K) Over 200K tokens
Claude Sonnet 5 $2 (then $3) $10 (then $15) No surcharge
Gemini 3.1 Pro $2 $12 Higher rate for the entire request
Gemini 3.5 Flash $1.50 $9

At the base rate up to 200K tokens, Gemini 3.1 Pro and Sonnet 5 (at their starting price) are almost identical for input tokens, but Gemini is more expensive for output. The key difference is in the long context billing mechanism: Google bills the entire request at a higher rate as soon as the input exceeds 200,000 tokens — meaning, unlike Sonnet 5, where the price per token is the same across the entire 1M window, Gemini has a clear threshold after which each request token (not just the excess ones) costs more.

This is the third different approach to long context billing that I'm analyzing in this cluster of articles: Sonnet 5 — flat price for the entire 1M, GPT-5.5 — threshold at 272K, Gemini 3.1 Pro — threshold at 200K. If your typical request regularly crosses a specific provider's threshold, it will impact your budget more than the difference in the base rate per token.

Context window and multimodality

Formally, the context windows are close: 1M tokens in Gemini 3.1 Pro versus 1M in Sonnet 5, although Gemini's maximum output is significantly smaller — 64K tokens versus 128K in Sonnet 5.

The real difference is not in the window size, but in what can be put into it. Gemini 3 is a natively multimodal model that works with text, images, audio, and video in a single request. Sonnet 5 accepts text, images, and files, but not audio or video directly. This is not about "better/worse" — it's about a different class of tasks: if you need to analyze an hour-long meeting recording or a call audio recording without a separate transcription step, Gemini 3.1 Pro can technically do it in one request, while Sonnet 5 would require a separate transcription tool at the pipeline's input. Read more about the specifics of LLM context windows in the article LLM Context Window: Why AI Forgets and How Much It Costs.

For the vast majority of tasks I work with in my own projects (text documents, code, RAG over PDFs), this difference is not critical — both models will perform equally well. But if your product works even partially with audio or video, this is the only criterion in this comparison that can settle the question even before considering benchmarks.

Claude Sonnet 5 vs Gemini 3: A Full Comparison

Programming Benchmarks

Benchmark Claude Sonnet 5 Gemini 3.1 Pro Gemini 3.5 Flash
SWE-bench Pro 63.2% —* 55.1%
SWE-bench Verified 85.2% 80.6% —*
Terminal-Bench 2.1 80.4% —* 76.2%

* Google has not published a comparable figure for this specific benchmark and version — I am not inventing a number that is not in the official materials.

On SWE-bench Verified, Sonnet 5 leads Gemini 3.1 Pro (80.6%) by approximately 4.5 points. With the price competitor Gemini 3.5 Flash, the gap on SWE-bench Pro and Terminal-Bench is slightly larger — 8 and 4 points respectively — which is logical, as Flash is clearly positioned as a budget, not a flagship, model for coding.

Important: Google directly admits that on specialized coding benchmarks (Terminal-Bench 2.0, SWE-Bench Pro), competitors lead, not Gemini 3.1 Pro — the company itself focuses its claims of leadership around reasoning benchmarks, not coding. This aligns with the figures above and adds to their credibility — when a lab itself does not claim leadership where it loses, it's a good sign that the rest of the stated figures are also not manipulated.

Reasoning and Scientific Tasks

Here, the advantage is clearly on Google's side. On ARC-AGI-2 — an abstract reasoning benchmark considered one of the most difficult for LLMs — Gemini 3.1 Pro shows 77.1%, which is more than double the result of the previous version, Gemini 3 Pro (31.1%). On GPQA Diamond (doctoral level scientific questions), the result is 94.3%.

There is no direct comparable figure for Sonnet 5 on ARC-AGI-2 in Anthropic's official materials — I cannot correctly compare these specific numbers. However, the very prioritization of the two companies here is telling: Anthropic clearly optimizes Sonnet 5 for agent utility (completing tasks, coding, computer use), while Google in this release clearly pushes "pure" reasoning and scientific-mathematical tasks. For research teams where the success metric is the correct answer to a complex scientific question, not the execution of a multi-step business process, this is a real reason to consider Gemini 3.1 Pro first.

Agent Capabilities and Google Antigravity

Google promotes Gemini 3's agent capabilities through a separate platform, Antigravity — an environment where the model directly controls a code editor, terminal, and browser for end-to-end task execution, conceptually similar to what Claude does through computer use and Claude Code.

On OSWorld (computer use), Gemini 3.1 Pro shows 78.4% — close to Sonnet 5's performance (81.2%) in the same class of tasks, with a difference of a few points. On agent workflows (MCP Atlas), Gemini claims 83.6%, although there is no direct equivalent of this benchmark in Anthropic's materials for direct comparison.

Practically, both ecosystems currently offer a similar set of agent primitives — browser control, terminal, MCP integrations. The choice between them at the level of "who performs the agent task better" is now closer to parity than the 5-10 point difference often highlighted in the marketing materials of both companies.

Ecosystem Integration

This is a non-technical but practically important factor that was not present in the comparison with GPT-5.5 or Kimi. Gemini 3 is deeply integrated into the Google ecosystem — Workspace (Docs, Sheets, Gmail), Vertex AI, Android Studio, NotebookLM. If a team is already working within Google Workspace, connecting Gemini does not require separate integration work — the model is already "inside" familiar tools.

In my own practice, I build agent pipelines on Spring AI on top of various model providers precisely because being tied to one ecosystem is a trade-off that should be understood in advance. Anthropic, conversely, does not try to be part of a broader productivity stack — Sonnet 5 is available via API, Bedrock, Vertex AI, and integration always happens on the developer's side. For a team already deep in Google Workspace, this is a real argument in favor of Gemini beyond any benchmarks. For a team with an independent, custom agent stack (like mine), this advantage is irrelevant — both models are equally accessible via a standard API call.

Summary Comparison Table

Criterion Winner
Price per token (base rate) Approximate parity
Long context pricing Claude Sonnet 5 (no threshold)
Multimodality (audio/video) Gemini 3.1 Pro (the only one of the three)
SWE-bench Verified/Pro Claude Sonnet 5
Abstract reasoning (ARC-AGI-2, GPQA) Gemini 3.1 Pro
Computer use (OSWorld) Approximate parity
Ecosystem integration Depends on the team's existing stack

This table consciously does not boil down to a single winner more than any other in this cluster — it even has fewer clear wins than the comparison with GPT-5.5 or Kimi. This honestly reflects the situation: Gemini 3 and Sonnet 5 are optimized for different priorities (reasoning + multimodality versus agent utility + predictable economics), rather than competing in the exact same category.

What to choose for multimodal tasks

If the product works directly with video or audio (analyzing meeting recordings, processing media files without separate transcription) — Gemini 3.1 Pro is the only one of the three models in this comparison that does this natively in one request. The choice here doesn't require long deliberation.

What to choose for scientific/research tasks

For tasks with a high weight of "pure" abstract reasoning — scientific hypotheses, complex mathematics, tasks like ARC-AGI-2 — Gemini 3.1 Pro's numbers are stronger according to the official data of both companies. I would consider Gemini 3.1 Pro as the first candidate for research workflows, rather than for production agents.

What to choose for agent coding in production

On SWE-bench Verified/Pro and Terminal-Bench, Sonnet 5 is ahead of both Gemini models, and the pricing of long context without a threshold provides more predictable economics for agents that actively use a large context window. For production code agents, I would start testing with Sonnet 5, and keep Gemini 3.1 Pro as a candidate for tasks where stronger reasoning is needed, rather than raw execution speed of code changes.

Frequently Asked Questions

Which Gemini model should Sonnet 5 be compared to correctly?
With both, depending on the task. Gemini 3.1 Pro is a direct competitor in the "flagship" class: compare it if you are interested in reasoning, scientific tasks, or multimodality. Gemini 3.5 Flash is a competitor in terms of price positioning and agent coding: compare it if the main criterion is the cost per token for mass agent usage. Taking the "average" between the two Gemini models as a single comparison point is not recommended — it will give a distorted picture, as Pro and Flash are optimized for different scenarios, and no single number describes both simultaneously.

Does Sonnet 5 work with video and audio?
No, it does not accept them directly — the model is limited to text, images, and file inputs. Gemini 3.1 Pro is the only one of the three models in this comparison with native support for audio and video in a single request, without a separate transcription stage or pre-processing of the media file. If you need to process video or audio through Sonnet 5, you will have to add a separate transcription tool (e.g., Whisper or similar) at the input of your own pipeline — this is technically possible, but adds a separate step and dependency that is not present when working directly with Gemini.

Which model is better for coding?
According to official benchmarks (SWE-bench Verified — 85.2% vs 80.6%; SWE-bench Pro — 63.2% vs 55.1% for Gemini 3.5 Flash; Terminal-Bench 2.1 — 80.4% vs 76.2%), Sonnet 5 is ahead of both Gemini models by approximately 4-8 points depending on the specific benchmark. It is important to consider the context: Google itself does not claim leadership on these specialized coding benchmarks and focuses its marketing claims around reasoning metrics — meaning this is not a contradictory, but a consistent picture from both sides. If coding is the primary use case, I would start testing with Sonnet 5, rather than Gemini models.

Does Gemini have a surcharge for long context?
Yes, and this is one of the most practical differences in this comparison. As soon as the input request exceeds the threshold of 200 thousand tokens, Google charges for the *entire* request at a higher rate — not just the tokens beyond the threshold. Sonnet 5 has no such threshold at all: the price per token is the same for the entire 1 million token window, from the first to the last. This is the third different approach to long context pricing among the models I am analyzing in this cluster of articles (GPT-5.5 has a threshold at 272 thousand). Practical implication: if your typical requests regularly cross the 200K mark — calculate not the nominal price per token, but the expected cost of a typical request considering the threshold, otherwise the budget for Gemini may turn out to be larger than it seems at first glance from the price list.


Read also: