Claude Opus 4.8 vs Gemini 3.1 Pro

June 2026's two strongest frontier models with fully published benchmarks, head to head. Coding accuracy or cheap strong reasoning — that's the choice.

By benchr Editorial Team · · View changelog

Claude Opus 4.8 vs Gemini 3.1 Pro: evidence layers and comparison routes.
Model researchThe visual for Claude Opus 4.8 vs Gemini 3.1 Pro pairs evidence layers and comparison routes.
Opus SWE-bench Verified 88.6 vs Gemini's 80.6
Gemini ARC-AGI-2 77.1 Opus didn't publish
Input price $5 vs $2 Opus / Gemini per 1M
GPQA Diamond 93.6 / 94.3 Separate provider reports

These are the two frontier models with the most complete public benchmark records right now, and they pull in different directions. Claude Opus 4.8 was Anthropic's flagship Opus when this ran, built around coding and agentic work. Gemini 3.1 Pro is Google's frontier preview, cheaper and tuned to win the hardest abstract-reasoning tests. The decision isn't "which is smarter" — it's whether your budget is going toward coding accuracy or toward strong reasoning at a lower price. For each model on its own terms, see the Claude Opus 4.8 review and the Gemini 3.1 Pro review.

The pricing reference first, since it shapes every other decision. Opus 4.8 lists at $5 per million input tokens and $25 output, per Anthropic's pricing page. Gemini 3.1 Pro lists at $2 input and $12 output for prompts up to 200K tokens, per Google's Gemini API pricing. That's roughly 2.5x cheaper on input and about half the output cost — a real gap if you're running volume. Two caveats keep it honest: Gemini's price climbs to $4 input and $18 output above 200K tokens, and its output is capped at 64K versus Opus's 128K.

One housekeeping note before the comparison. Gemini 3.1 Pro shipped in preview on February 19, 2026, and Google flags that its prices and limits may change. Opus 4.8 is a generally available production model. If you're building something that needs stable pricing and rate limits, weight that difference; if you're experimenting, it matters less.

Claude Opus 4.8 vs Gemini 3.1 Pro at a glance, from each provider's official documentation, June 2026.
Spec Claude Opus 4.8 Gemini 3.1 Pro
Price (per 1M, in / out) $5 / $25 $2 / $12 (≤200K); $4 / $18 above
Context window 1M tokens 1M tokens
Max output 128K (300K beta) 64K (includes thinking)
SWE-bench Verified 88.6 80.6
GPQA Diamond 93.6 94.3
Availability Generally available Preview (no free API tier)

Published coding and agent results

Anthropic reports 88.6 on SWE-bench Verified for Opus 4.8, while Google reports 80.6 for Gemini 3.1 Pro. Anthropic also reports 69.2 on SWE-bench Pro and 84.4 on SWE-bench Multilingual. These provider figures do not predict first-pass success or review burden on another repository.

Anthropic reports 83.4 on OSWorld-Verified, 74.6 on Terminal-Bench 2.1, and a GDPval-AA Elo of 1890 for Opus 4.8. Google does not publish a directly comparable Gemini agent suite in the cited record. That missing coverage prevents a head-to-head conclusion; test both models on the same files, tools, and completion criteria.

Published reasoning and science results

Google reports 77.1 for Gemini 3.1 Pro on ARC-AGI-2. Anthropic did not publish an Opus 4.8 figure in the cited material, so this result cannot support a direct comparison.

Google reports 94.3 on GPQA Diamond for Gemini, while Anthropic reports 93.6 for Opus. Without repeated runs under a shared protocol, the 0.7-point difference should not be treated as a practical gap. Google also reports 80.5 on MMMU-Pro and 92.6 on MMMLU for Gemini. Research, science, and multimodal workloads still require the same inputs and scoring criteria on both models.

Price and threshold conditions

For prompts up to 200K tokens, Gemini lists $2 input and $12 output per million tokens, compared with Opus at $5 input and $25 output. Gemini batch rates are $1/$6 below the threshold and $2/$9 above it; Opus batch rates are $2.50/$12.50. Apply those rates to your measured input/output mix rather than treating the listed difference as a total-cost result.

Gemini's price rises above 200K input tokens to $4 input and $18 output, and its 64K output limit includes thinking tokens. Opus lists a 128K output limit, with 300K in beta, plus cache reads at $0.50 per million, batch at half price, and an optional fast mode at $10/$50. These constraints affect different workloads in different ways.

Context and output: same window, different ceilings

Both models carry a 1M-token context window, so for ingesting large codebases, long documents, or sprawling chat histories they're evenly matched on what they can read. The difference is on the way out. Opus 4.8 can produce up to 128K tokens in a single response, with a 300K beta, while Gemini 3.1 Pro tops out at 64K — and because Gemini's output budget includes its thinking tokens, a heavy reasoning pass eats into the room left for the actual answer.

This rarely matters on chat or short generations, where neither model comes close to the ceiling. It bites on the jobs that produce a lot of text at once: a full document draft, a large refactor returned as one diff, an exhaustive structured extraction. If that's your pattern, Opus's output headroom is a concrete advantage that the price comparison alone won't show you.

For the broader frame on how these flagships stack against the rest of the field, the Gemini 3.1 Pro vs GPT-5.5 comparison covers the reasoning-versus-knowledge-work axis, and the Opus 4.8 review goes deeper on where Anthropic's tier earns its keep.

Which one for which work

If you're shipping code or building agents, default to the Opus tier: Opus 4.8 when this comparison ran, Claude Opus 5 now at the same $5 / $25. The Opus 4.8 SWE-bench lead is wide, the agentic and computer-use scores are higher, and there's no Gemini number that contradicts the picture. Coding accuracy is exactly what the $5/$25 premium buys.

If you're running high-volume reasoning, research, or multimodal work and price-per-token drives the decision, Gemini 3.1 Pro is the pick. It's much cheaper, ties or wins on the science and reasoning benchmarks, and leads on multimodal — just keep the 200K price cliff and the 64K output cap in view.

If you can run both, the clean split is Opus for the coding and agent layer, Gemini for the high-volume reasoning and analysis layer. And remember that Gemini is still a preview: stable-pricing-dependent production work leans toward Opus until Gemini graduates to GA.

Frequently asked

Which is better, Claude Opus 4.8 or Gemini 3.1 Pro?

The published record does not establish a universal winner. Anthropic and Google report different benchmark suites and sometimes different conditions. Gemini lists lower standard rates below 200K input tokens. Compare both models on the same work and include review time, latency, and total token cost.

Which model is cheaper to run?

Gemini 3.1 Pro, by a wide margin. It lists at $2 per million input tokens and $12 output for prompts up to 200K tokens, against Opus 4.8's $5 and $25. But watch two things: above 200K input, Gemini jumps to $4 input and $18 output, and its output (which includes thinking tokens) is capped at 64K versus Opus's 128K. Gemini also has no free API tier, only an AI Studio UI trial.

Which is better at coding?

Anthropic reports 88.6 on SWE-bench Verified for Opus 4.8, while Google reports 80.6 for Gemini 3.1 Pro. Anthropic also publishes Opus results for OSWorld-Verified, Terminal-Bench 2.1, and GDPval-AA without a directly comparable Gemini set here. Test both models on the same repository tasks before drawing a production conclusion.

Which is better at reasoning and science questions?

Google reports 77.1 for Gemini 3.1 Pro on ARC-AGI-2, but Anthropic did not publish an Opus 4.8 figure in the cited record. Google reports 94.3 on GPQA Diamond and Anthropic reports 93.6; separate provider results do not establish a practical gap. Use a shared evaluation for your reasoning, science, or multimodal tasks.

Can I compare the Humanity's Last Exam scores directly?

No. Opus 4.8 reports 49.8 on Humanity's Last Exam with no tools, while Gemini 3.1 Pro reports 51.4 with tools. Those are different test conditions, so the two numbers aren't comparable head-to-head. A model with tool access can look up and compute, which generally lifts the score, so don't read Gemini's higher figure as a clean win on this benchmark.

Is Gemini 3.1 Pro stable enough to build on?

Treat it as a preview. Gemini 3.1 Pro was released in preview on February 19, 2026, and Google notes that prices and limits may change. Opus 4.8 is a generally available production model. If you're shipping something that depends on stable pricing and rate limits, that difference matters; if you're experimenting or can tolerate change, the preview status is less of a concern.

Changelog

  • September 11, 2026 — Added a September 2026 note: Claude Opus 5 replaced Opus 4.8 on July 24, 2026 at the same $5 / $25, benchr has no Anthropic-published Opus 5 benchmarks on record, and Gemini 3.1 Pro is still Google's newest Pro (Preview). Stopped describing Opus 4.8 as Anthropic's strongest tier and the default for coding.
  • June 13, 2026 — Originally published. Prices, context and output limits, and all benchmark figures verified against Anthropic's and Google's official documentation.

References

  1. Anthropic, "Claude Pricing," anthropic.com/pricing, accessed June 2026.
  2. Anthropic, "Claude API Documentation," docs.claude.com, accessed June 2026.
  3. Google, "Gemini API Pricing," ai.google.dev/gemini-api/docs/pricing, accessed June 2026.
  4. Google, "Gemini models," ai.google.dev/gemini-api/docs/models, accessed June 2026.
  5. "SWE-bench Verified leaderboard," swebench.com, June 2026.
  6. "ARC Prize," arcprize.org, June 2026.