Quick Answer Claude's current models publish a 1M-token context window with 128k max output; Gemini 3.1 Pro prices in two bands above and below 200k tokens. On the API, Claude Sonnet 5 runs $3/$15 per million tokens against Gemini 3.1 Pro's $2/$12. The sharpest difference is not capability — it is that Google's free API tier uses your content to improve products and the paid tier does not.

Comparisons of these two usually turn into a list of impressions about which one writes better.

This one sticks to published specifications, list prices and data terms — the things that are checkable, that actually determine cost, and that most comparison posts never update.

📋 Key Takeaways

  • Claude Opus 4.8, Sonnet 5 and Fable 5 all publish 1M-token context and 128k max output
  • Gemini 3.1 Pro charges double above 200k tokens — $2/$12 becomes $4/$18 per million
  • Claude Sonnet 5 carries introductory pricing of $2/$10 per Mtok through 31 August 2026
  • Google's free API tier uses your content to improve products; the paid tier does not
  • Anthropic's consumer plans default to training on your chats with retention up to five years

API Pricing Side by Side

Per million tokens, standard tier, input / output:

ModelInputOutputContext
Claude Fable 5$10$501M
Claude Opus 4.8$5$251M
Claude Sonnet 5$3$15 — intro $2 / $10 to 31 Aug 20261M
Claude Haiku 4.5$1$5200k
Gemini 3.1 Pro$2 (≤200k) · $4 (>200k)$12 (≤200k) · $18 (>200k)
Gemini 3.6 Flash$1.50$7.50
Gemini 3.5 Flash$1.50$9.00
Gemini 3.5 Flash-Lite$0.30$2.50

Sources: Claude models overview · Gemini API pricing. Last checked 22 July 2026.

Two structural notes that matter more than the headline numbers.

Gemini 3.1 Pro’s price doubles past 200k tokens. If your workload involves long documents or large codebases, the effective rate is the upper band, not the one quoted in comparison tables. Budget at $4/$18.

Claude Sonnet 5’s introductory rate expires. At $2/$10 it currently undercuts Gemini 3.1 Pro’s lower band on output. From 1 September 2026 it returns to $3/$15. If you are modelling costs past that date, use the standard rate.

Context and Output Limits

Claude Opus 4.8 / Sonnet 5 / Fable 5Claude Haiku 4.5
Context window1M tokens200k tokens
Max output128k tokens64k tokens
Reliable knowledge cutoffJan 2026Feb 2025

Anthropic also notes that on the Message Batches API, Opus 4.8 and Sonnet 5 support up to 300k output tokens with a beta header.

Google’s model documentation does not publish context and output limits in the same table format, so we are not listing figures we cannot source. On the consumer side, Google states a 1 million token context window for the AI Pro plan.

ℹ️ On token counts Anthropic notes that models from Opus 4.7 onward use a tokenizer where the same text produces roughly 30% more tokens than earlier models. A 1M-token window is not directly comparable across model generations, and neither is a per-token price. Compare cost per unit of work, not per token.

Consumer Plans

Both sell tiered subscriptions rather than metered access for individuals.

Claude: Free at $0, Pro at $17/month on annual billing or $20 billed monthly, Max from $100/month offering 5x or 20x Pro usage. Claude Code is included from Pro upward. Source: claude.com/pricing.

Google: Free, AI Plus, AI Pro and AI Ultra. Google states AI Plus gives 2x the free tier’s limits, AI Pro 4x plus extended access to its most capable models and a 1M-token context window, and AI Ultra up to 20x Pro’s limits with Deep Think. Source: gemini.google/subscriptions.

Google’s listed prices vary by country and the subscription page renders in local currency, so check the figure for your own region rather than trusting a USD number quoted in an article. Neither vendor publishes concrete message or token caps for consumer tiers.

Data Terms: the Real Divergence

Capability gaps between frontier models narrow every few months. Data terms differ structurally, and they are checkable.

Google

On the Gemini API, free-tier content is used to improve Google’s products. Paid-tier content is not. That is a meaningful line for anyone prototyping on the free tier with real data.

On consumer Gemini, activity is retained 18 months by default, adjustable to 3 or 36 months or indefinite. With Keep Activity off, conversations are retained 72 hours and are not used to train models. Conversations reviewed by humans are retained up to three years and are not removed when you delete your activity.

Sources: Gemini API pricing · Gemini Apps Activity.

Anthropic

Consumer plans — Free, Pro and Max, including Claude Code from those accounts — default to using chats for training unless you opt out. Retention is up to five years with training enabled, 30 days opted out. Flagged sessions are retained up to two years, with safety classification scores kept up to seven.

Commercial products are excluded: Claude for Work, the API, Amazon Bedrock, Google Cloud Vertex, Claude Gov and Claude for Education.

Sources: Anthropic consumer terms update · Anthropic Privacy Center.

Side by side

Claude (consumer)Gemini (consumer)
Trains by defaultYesYes, with Keep Activity on
Retention, defaultUp to 5 years18 months
Retention, opted out30 days72 hours
Survives your deletionFlagged sessions: 2 yrs; safety scores: 7 yrsHuman-reviewed chats: up to 3 years
Business tier excluded from trainingYesYes, on paid API

We go deeper on this across all vendors in which AI chatbot is most private.

Choosing Between Them

We have not run head-to-head quality testing, so we are not going to tell you which writes better prose or which scores higher on a benchmark — the honest answer is that published benchmark deltas between frontier models are small and change with each release.

What you can decide on:

Pick by ecosystem. Gemini is embedded across Google Workspace, Search and Android. Claude is not embedded anywhere by default, which is an advantage if you want a tool rather than a layer.

Pick by cost band. For work under 200k tokens, Gemini 3.1 Pro’s $2/$12 is the cheaper frontier option. Above 200k it becomes $4/$18, at which point Claude Sonnet 5 at $3/$15 is cheaper on input and output both.

Pick by output length. Claude publishes 128k max output on its current models, with 300k available in batch. If you generate long documents in single calls, that ceiling is the constraint to check.

Pick by data terms. If you are prototyping with real data, Google’s free tier trains on it and the paid tier does not. On Claude consumer plans, the training toggle is the equivalent lever.

Or run both. Both have free tiers. A week of your own real work will tell you more than any comparison article, including this one.

Also see: Claude vs ChatGPT 2026 · Gemini vs ChatGPT 2026 · Claude review · Gemini review

FAQ

What can Claude do that Gemini can’t?

On published specs, Claude documents a 128k max output across Opus 4.8, Sonnet 5 and Fable 5, rising to 300k on the Batch API with a beta header. Google does not publish an equivalent figure in its model documentation.

Is Gemini cheaper than Claude?

Below 200k tokens, Gemini 3.1 Pro is cheaper at $2/$12 per million against Claude Sonnet 5’s standard $3/$15. Above 200k Gemini doubles to $4/$18 and Claude becomes cheaper. Sonnet 5’s introductory $2/$10 rate runs to 31 August 2026.

Does Gemini use my data to train models?

On the free API tier, yes — content is used to improve Google’s products. On the paid tier, no. On consumer Gemini, yes while Keep Activity is on; turning it off drops retention to 72 hours and stops training use.

Does Google keep my Gemini chats after I delete them?

Conversations reviewed by human reviewers are retained up to three years and are not deleted when you delete your activity. Everything else follows your auto-delete setting, which defaults to 18 months.

Which is better for coding?

Both are used heavily for it and we have not benchmarked them. The practical differences are that Claude Code ships with Claude Pro and Max, and that Gemini integrates into Google’s developer tooling. See best AI coding assistants and Claude Code vs Cursor.

Which has the bigger context window?

Claude publishes 1M tokens on Opus 4.8, Sonnet 5 and Fable 5, and 200k on Haiku 4.5. Google states a 1M-token context window on the AI Pro consumer plan. Note that Anthropic’s newer tokenizer produces roughly 30% more tokens for the same text, so equal windows are not equal capacity.