Versus · AI tools

Claude Sonnet 5 vs Gemini 3.1 Pro

We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.

Verdict Our pick

The bar guide has a call.

The vectaai bar guide pointing at the verdict
  • Claude Sonnet 5 for agent work, coding tools and long prompts where Gemini's over-200k price bump would hurt.
  • Gemini 3.1 Pro if your work is heavy on video, audio or images, or you already live in Google's stack.

Compared here

  • 01Gemini 3.1 Pro
  • 02Claude Sonnet 5

Short answer

On paper they are close. Claude Sonnet 5 costs $2 per million input tokens and $10 per million output on Anthropic's pricing page; Gemini 3.1 Pro Preview costs $2 and $12 for prompts up to 200k tokens, rising to $4 and $18 above that. Both read around a million tokens of context. Anthropic says Sonnet 5 performs close to Opus 4.8 and is its "most agentic Sonnet model yet". Gemini 3.1 Pro takes text, images, video, audio and PDF in.

Pick Sonnet 5 for agent work, coding tools and long prompts where Gemini's over-200k price bump would hurt. Pick Gemini 3.1 Pro if your work is heavy on video, audio or images, or you already live in Google's stack. The catch: both have newer siblings. Anthropic now leads with Sonnet 5.5 (same $2/$10 price) and Google with the Gemini 4 family, and Gemini 3.1 Pro is still labelled preview. Test the newer ones before you commit.

At a glance

From Anthropic's pricing docs, its Sonnet 5 announcement and Sonnet page, and Google AI Studio's pricing, models and deprecations pages, read 3 December 2026. US dollars per million tokens.
Claude Sonnet 5Gemini 3.1 Pro (Preview)
MakerAnthropicGoogle
Released30 June 202619 February 2026 (per Google's deprecations table)
StatusAvailable; Sonnet 5.5 is the newer SonnetPreview; no shutdown date announced
Input price$2$2 up to 200k prompt; $4 above
Output price$10$12 up to 200k prompt; $18 above
Batch discount50% ($1 / $5)Not checked for this page
Context window1M tokens at standard pricing (Claude 4.6 and later)1,048,576 input, 65,536 output
InputsNot listed on the pages we readText, image, video, audio, PDF
Free API tierNone; credits from $5Not available for this model
In the consumer appDefault model on Claude Free and Pro at launchNot checked for this page

Money talk first. Neither Anthropic nor Google pays us for this page and there are no affiliate links on it. Display ads may appear around it. We did not run a benchmark. Every number below comes from Anthropic's and Google's own pages, read on 3 December 2026. Where they do not say something, we say that.

The short answer

These two are near neighbours on price and context size. The real differences are what they are built to be good at, how the price behaves on long prompts, and the fact that each company has already shipped something newer.

Price: close until your prompts get long

Per million tokensClaude Sonnet 5Gemini 3.1 Pro Preview
Input$2$2 (prompts up to 200k), $4 above
Output$10$12 (up to 200k), $18 above
Cache hits$0.20Not checked for this page
Batch$1 in, $5 outNot checked for this page

Two details from Anthropic's pricing docs worth knowing:

  • Sonnet 5's $2/$10 started as introductory pricing. Anthropic made it the standard price; the planned move to $3/$15 on 1 September 2026 "will not occur".
  • Claude 4.6 and later models charge the same per-token rate across the whole 1M context. A 900k-token request costs the same per token as a 9k one.

Google's pricing page does the opposite: Gemini 3.1 Pro Preview gets more expensive per token once a prompt goes over 200k tokens. If you feed whole codebases or long document piles, that matters.

One more Anthropic footnote: newer Claude models use a tokenizer that produces roughly 30% more tokens for the same text (the Sonnet 5 post says 1.0 to 1.35 times, depending on content). Compare real bills, not just rates.

What each is built for

Claude Sonnet 5. The launch post (30 June 2026) calls it "the most agentic Sonnet model yet", says it performs close to Opus 4.8 at a lower price, and says it improves substantially on Sonnet 4.6 in reasoning, tool use, coding and knowledge work. It also says its cybersecurity capabilities are well below Opus 4.8 and launched with cyber safeguards on by default. It was the default model for Claude Free and Pro at launch.

Gemini 3.1 Pro. Google's model page lists 1,048,576 input tokens, 65,536 output tokens, and inputs of text, image, video, audio and PDF, with text out. The deprecations table dates it 19 February 2026, still in preview, with no shutdown date announced.

So, roughly: Sonnet 5 for agents and tools that take actions; Gemini 3.1 Pro when your input is a pile of mixed media.

Two cost examples, worked out

Using only the list prices above, before caching or batch discounts:

A normal job: 1 million input tokens and 200,000 output tokens, every prompt under 200k.

  • Sonnet 5: $2 + (0.2 x $10) = $4.00
  • Gemini 3.1 Pro: $2 + (0.2 x $12) = $4.40

A long-prompt job: one 500,000-token prompt with 10,000 tokens of answer.

  • Sonnet 5: (0.5 x $2) + (0.01 x $10) = $1.10
  • Gemini 3.1 Pro: (0.5 x $4) + (0.01 x $18) = $2.18

So on normal prompts they are within about 10% of each other. On very long prompts Gemini 3.1 Pro costs roughly twice as much. Remember the tokenizer note above: the same text can be more tokens on newer Claude models, so count your real usage before trusting the sum.

Small print that moves the Sonnet 5 bill

The headline $2 in, $10 out is the easy part. Anthropic's pricing docs add a few lines that change real invoices. Sonnet 5 is priced at $2 in and $10 out per million tokens, and the page says the introductory price is now the standard price, so the planned rise to $3 and $15 on 1 September 2026 will not happen.

  • Caching: a 5 minute cache write is $2.50 per million tokens and a 1 hour write is $4. A cache hit is $0.20 on Sonnet 5. Sonnet 5.5 is cheaper at $0.10 per million for cache hits. A 5 minute write pays for itself after one cache read, a 1 hour write after two.
  • Batch: 50% off, so $1 in and $5 out on both Sonnet 5 and 5.5. Fast mode does not work with the Batch API.
  • Data location: asking for US only inference adds a 1.1x multiplier on all token prices for Claude 4.6 and later models. Global routing, the default, uses standard pricing.
  • Web search: $10 per 1,000 searches on top of tokens. Web fetch has no extra charge beyond tokens.
  • Code execution: free when used with web search or web fetch. Otherwise each organization gets 1,550 free hours a month, then $0.05 per hour per container.
  • Tool overhead: turning tools on adds a hidden system prompt. For Sonnet 5 that is 354 tokens with tool choice auto and 474 with any or a specific tool.
  • No free tier: the API has no free tier, and the minimum credit purchase is $5.

Google's side has its own switches, such as the price step above 200k tokens covered above. The lesson is the same for both: price your real prompt, with caching and tools on, not the table row.

Who should pick which

Your jobLean towardsWhy
Coding agents, tool callingSonnet 5Anthropic's stated focus; flat long-context price
Very long prompts (over 200k)Sonnet 5Gemini's rate goes up above 200k
Video, audio, PDFs in one promptGemini 3.1 ProListed input types cover all of them
Already on Google CloudGemini 3.1 ProFewer vendors, one bill
Cheapest output tokensSonnet 5$10 vs $12 per million
Stable production modelNeither, read onBoth have newer versions

The catch: both have newer siblings

This is the part older comparisons miss.

  • Anthropic now leads with Claude Sonnet 5.5. Its Sonnet page says it came out on 28 September 2026 as the successor to Sonnet 5, at the same $2 and $10 per million tokens, with a 1M context. Cache hits are cheaper ($0.10 vs $0.20).
  • Google lists a Gemini 4 family on its models page: Carbon (its strongest reasoning model), Neon and Hydrogen, all with 1M-token context. Gemini 3.1 Pro is still preview.

If you are starting fresh in December 2026, test Sonnet 5.5 and a Gemini 4 model too. If you have a working product on Sonnet 5 or Gemini 3.1 Pro, there is no fire: neither has an announced shutdown on the pages we read.

Using them in the apps instead of the API

Most people searching this are not paying per token. They are choosing a chat app.

  • Claude: Sonnet 5 was the default on Claude Free and Pro at launch. Bigger plans buy more usage, not a smarter Sonnet; our Claude Pro vs Max page explains the plans.
  • Gemini: which model the Gemini app uses on which plan was not part of what we read for this page.

For a broader pick across chat apps, see best AI chatbots. For other model match-ups, see Claude Opus 4.6 vs Gemini 3.5 Flash and Gemini 3 Pro vs gpt-oss-120b.

Switching between them without pain

  1. Keep prompts plain. Model-specific tricks break when you switch.
  2. Save a test set. Twenty real prompts with answers you liked. Run it on any model you consider.
  3. Watch output length. Output tokens cost five to six times input on both. A chattier model costs more even at the same rate.
  4. Use a router or a thin wrapper in your code, so a model change is one line.

What we could not confirm

  • Head-to-head benchmark numbers from the vendors: Anthropic's post shows charts without numbers in the text, and we did not use third-party leaderboards, which disagree with each other.
  • Gemini 3.1 Pro's knowledge cutoff: not stated on the model page.
  • Which Gemini plan uses Gemini 3.1 Pro in the consumer app.

How we checked

We read Anthropic's Sonnet 5 announcement, Sonnet page and API pricing docs, and Google AI Studio's pricing, Gemini 3.1 Pro model page, models list and deprecations page on 3 December 2026. Models change monthly; the vendor page always wins. More on how we pick.

Questions people ask

Is Claude Sonnet 5 better than Gemini 3.1 Pro?

It depends on the job and nobody's official page settles it. Anthropic says Sonnet 5 is close to Opus 4.8 and strong at agentic work. Google pitches Gemini 3.1 Pro on broad multimodal input. Third-party benchmark sites disagree with each other. Run your own ten hardest prompts through both; that beats any leaderboard.

Which is cheaper, Sonnet 5 or Gemini 3.1 Pro?

Sonnet 5 on the official pages: $2 in and $10 out per million tokens, flat across its 1M context. Gemini 3.1 Pro Preview is $2 in and $12 out up to a 200k-token prompt, then $4 and $18. Output usually dominates the bill, so Sonnet 5 is cheaper for most workloads.

Do Sonnet 5 and Gemini 3.1 Pro have a free tier?

Not on the API. Anthropic's pricing docs say the Claude API has no free tier and credits start at $5. Google's pricing page lists Gemini 3.1 Pro Preview's free tier as not available. In the consumer apps, Anthropic said Sonnet 5 was the default model for Claude Free users at launch.

Should I use Sonnet 5.5 instead of Sonnet 5?

Probably test it. Anthropic's Sonnet page says Sonnet 5.5 came out on 28 September 2026 as the successor to Sonnet 5, at the same $2 and $10 per million tokens, and cheaper cache hits. If your app works well on Sonnet 5, switching is a model ID change; check your outputs first.

What is the context window of Sonnet 5 and Gemini 3.1 Pro?

Anthropic's pricing docs say Claude 4.6 and later models include the full 1M token context at standard pricing. Google's model page lists Gemini 3.1 Pro Preview at 1,048,576 input tokens and 65,536 output tokens. In practice both fit a large codebase or a stack of documents.

Sources

Every fact above comes from these pages. Prices change, so each one carries the date we read it.

  1. Anthropic: Claude Sonnet 5 announcement, checked 3 Dec 2026
  2. Anthropic: Claude Sonnet page, checked 3 Dec 2026
  3. Claude API pricing docs, checked 3 Dec 2026
  4. Google AI Studio: Gemini API pricing, checked 3 Dec 2026
  5. Google AI Studio: Gemini 3.1 Pro model page, checked 3 Dec 2026
  6. Google AI Studio: Deprecations, checked 3 Dec 2026