LLMBenchmark.ai

Enter opens the highlighted result. Esc closes.

Claude Sonnet 5 vs Gemini 3.8 Flash

Updated October 21, 2026. 113 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.

Claude Sonnet 5Anthropic
Coding
63.5
Overall
38.2
Output $/M
$10.00
23
Gemini 3.8 FlashGoogle
Coding
70.5
Overall
40.9
Output $/M
$4.125
90
vs boards won of 113 shared

Decision reading

Pick Gemini 3.8 Flash for coding: it scores 70.5 on the Vibe Coding Index against 63.5 for Claude Sonnet 5.

Pick Claude Sonnet 5 when a solved task costs $1.87 against $2.74, or when what matters is Vibe Code Bench (Vals AI) or Code migration (Vals AI), where it leads.

Shared results
113
Claude Sonnet 5 only
7
Gemini 3.8 Flash only
13
Like-for-like categories
8 of 9

Shared results can support a head-to-head reading. Results only one model has describe coverage, not superiority.

Which one for your work

Each card is decided by one number both models carry. Where only one has it, the card says so and makes no call.

At a glance

Coding index
Claude Sonnet 5 63.5 from 2 benchmarks, Gemini 3.8 Flash 70.5 from 2 benchmarks.
Widest category
Math, 10.1 points apart on average over 6 shared benchmarks.
Widest single gap
SimpleQA Verified: Claude Sonnet 5 33.7% against Gemini 3.8 Flash 69.7%, 36.0 points apart on a 0 to 100 scale.
Output price
Claude Sonnet 5 $10.00 against Gemini 3.8 Flash $4.125 per million output tokens, 2.4x apart.
Context window
Claude Sonnet 5 takes 1M tokens, Gemini 3.8 Flash 1.05M.

Benchmark by benchmark

First the score: boards each model leads, per category, where both have a result. Then every board, a category to a fold; bars are each result on a 0 to 100 scale, so compare the two in a row, not one row with another.

Boards won, where both have a result
CategoryClaude Sonnet 5BarsGemini 3.8 FlashTies
Coding518
Intelligence02
Agentic work109
Reasoning013
Math24
Knowledge28
Web design18
General328
All shared boards2390
CodingLike-for-likeFour of these boards feed the Vibe Coding Index518
Coding benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
LiveBench coding74.7%82.2%Gemini 3.8 Flash
LMArena WebDev15401585Gemini 3.8 Flash
AA Coding Index71.576.3Gemini 3.8 Flash
LiveCodeBench (Vals AI)82.4%89.5%Gemini 3.8 Flash
SWE-bench Verified (Vals AI)79.6%80.0%Gemini 3.8 Flash
Terminal-Bench 4 (Vals AI)10.6%19.7%Gemini 3.8 Flash
Vibe Code Bench (Vals AI)81.3%78.7%Claude Sonnet 5
Code migration (Vals AI)44.4%36.5%Claude Sonnet 5
ProgramBench (Vals AI)0.0%1.0%Gemini 3.8 Flash
IOI (Vals AI)45.0%56.9%Gemini 3.8 Flash
Terminal-Bench 2.1 (Vals AI)74.5%81.3%Gemini 3.8 Flash
SWE-bench Multimodal (Vals AI)Not measured40.8%Only Gemini 3.8 Flash measured
Vibe Code Bench 1-100 (Vals AI)13.8%18.8%Gemini 3.8 Flash
SkillsBench (Vals AI)46.5%58.0%Gemini 3.8 Flash
CyberBench (Vals AI)70.3%43.8%Claude Sonnet 5
SciCode54.3%56.6%Gemini 3.8 Flash
FrontierCode42.7%41.2%Claude Sonnet 5
FrontierSWENot measured19.6%Only Gemini 3.8 Flash measured
GSO-Bench37.3%Not measuredOnly Claude Sonnet 5 measured
WeirdML68.8%84.8%Gemini 3.8 Flash
ALE-Bench1463.11269.7Claude Sonnet 5
LMArena Text: coding14831508Gemini 3.8 Flash
LMArena Text: software and IT14741507Gemini 3.8 Flash
LMArena WebDev: React15411577Gemini 3.8 Flash
LMArena WebDev: HTML15271616Gemini 3.8 Flash
LMArena WebDev: from an image15401593Gemini 3.8 Flash
Neither model has a result on the other 12 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
AA Intelligence Index38.240.9Gemini 3.8 Flash
Epoch Capabilities Index156.9157.4Gemini 3.8 Flash
Agentic workLike-for-likePublic boards, shown as published, kept out of the index109
Agentic work benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
AA Agentic Index43.640.2Claude Sonnet 5
Design Arena: agents building web apps12451238Claude Sonnet 5
Design Arena: agents building full-stack apps12491244Claude Sonnet 5
Design Arena: agents building mobile apps12151236Gemini 3.8 Flash
Design Arena: agents building Android apps12311078Claude Sonnet 5
Design Arena: agents building Godot games12251273Gemini 3.8 Flash
Design Arena: agents building games1227Not measuredOnly Claude Sonnet 5 measured
Design Arena: HTML slides1218Not measuredOnly Claude Sonnet 5 measured
Design Arena: PowerPoint slides12161178Claude Sonnet 5
Design Arena: spreadsheets10041052Gemini 3.8 Flash
LiveBench research82.8%79.1%Claude Sonnet 5
LiveBench browser72.0%64.0%Claude Sonnet 5
LiveBench long agentic39.0%30.1%Claude Sonnet 5
SREBench (Vals AI)0.4%11.1%Gemini 3.8 Flash
Finance Agent (Vals AI)53.9%61.4%Gemini 3.8 Flash
Tax Agent Bench (Vals AI)29.4%32.1%Gemini 3.8 Flash
Legal Research Bench (Vals AI)41.8%38.9%Claude Sonnet 5
Harvey's Legal Agent Benchmark (Vals AI)Not measured12.1%Only Gemini 3.8 Flash measured
Excel Modeling Benchmark (Vals AI)66.3%72.2%Gemini 3.8 Flash
BioMysteryBench (Vals AI)Not measured62.2%Only Gemini 3.8 Flash measured
Terminal-Bench-Science (Vals AI)5.7%8.6%Gemini 3.8 Flash
Vals Science IndexNot measured35.8%Only Gemini 3.8 Flash measured
Time Horizon Index (Vals AI)Not measured18.8%Only Gemini 3.8 Flash measured
CUA-bench (Vals AI)Not measured4.2%Only Gemini 3.8 Flash measured
APEX-Agents54.5%64.3%Gemini 3.8 Flash
Remote Labor IndexNot measured5.8%Only Gemini 3.8 Flash measured
Vending-Bench 2$6,378$5,094Claude Sonnet 5
Neither model has a result on the other 12 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index013
Reasoning benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
GPQA Diamond88.9%94.4%Gemini 3.8 Flash
LiveBench reasoning88.7%89.3%Gemini 3.8 Flash
MysteryMechanism (Vals AI)Not measured36.5%Only Gemini 3.8 Flash measured
MMMU Pro (Vals AI)83.0%89.1%Gemini 3.8 Flash
GPQA Diamond (Artificial Analysis run)91.1%95.3%Gemini 3.8 Flash
Humanity's Last Exam (Artificial Analysis run)41.3%47.8%Gemini 3.8 Flash
GPQA Diamond (Epoch AI run)90.5%95.4%Gemini 3.8 Flash
ARC-AGINot measured98.5%Only Gemini 3.8 Flash measured
ARC-AGI-2Not measured89.2%Only Gemini 3.8 Flash measured
SimpleBench60.6%Not measuredOnly Claude Sonnet 5 measured
Chess puzzles45.0%58.0%Gemini 3.8 Flash
Mystery game puzzles35.0%47.0%Gemini 3.8 Flash
LMArena Text: hard prompts14611509Gemini 3.8 Flash
LMArena Text: expert14891526Gemini 3.8 Flash
LMArena Text: hard prompts in English14641504Gemini 3.8 Flash
LMArena Vision: diagrams12931345Gemini 3.8 Flash
LMArena Vision: homework13111351Gemini 3.8 Flash
Neither model has a result on the other 4 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index24
Math benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
OTIS Mock AIME94.7%98.9%Gemini 3.8 Flash
FrontierMath, tiers 1 to 365.6%68.4%Gemini 3.8 Flash
FrontierMath, tier 429.3%22.0%Claude Sonnet 5
ProofBench77.0%48.0%Claude Sonnet 5
LMArena Text: math14671532Gemini 3.8 Flash
LMArena Text: mathematical work14811519Gemini 3.8 Flash
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index28
Knowledge benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
MMLU Pro87.5%90.2%Gemini 3.8 Flash
LegalBench (Vals AI)83.9%87.0%Gemini 3.8 Flash
CorpFin (Vals AI)67.0%Not measuredOnly Claude Sonnet 5 measured
TaxEval (Vals AI)75.6%74.5%Claude Sonnet 5
MortgageTax (Vals AI)70.0%65.3%Claude Sonnet 5
MedCode (Vals AI)47.5%48.1%Gemini 3.8 Flash
SimpleQA Verified33.7%69.7%Gemini 3.8 Flash
LMArena Text: science14601523Gemini 3.8 Flash
LMArena Text: medicine and healthcare14421508Gemini 3.8 Flash
LMArena Text: legal and government14541497Gemini 3.8 Flash
LMArena Text: business and finance14361479Gemini 3.8 Flash
Neither model has a result on the other 6 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index18
Web design benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
Design Arena: websites12741301Gemini 3.8 Flash
Design Arena: UI components12791318Gemini 3.8 Flash
Design Arena: game dev12781305Gemini 3.8 Flash
Design Arena: data viz12511269Gemini 3.8 Flash
Design Arena: 3D12611295Gemini 3.8 Flash
Design Arena: all code categories12761304Gemini 3.8 Flash
Design Arena: SVG11931295Gemini 3.8 Flash
Design Arena: ASCII art12071264Gemini 3.8 Flash
LiveBench design82.0%72.7%Claude Sonnet 5
GeneralLike-for-likePublic boards, shown as published, kept out of the index328
General benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
Vals IndexNot measured56.0%Only Gemini 3.8 Flash measured
LiveBench data analysis71.7%54.0%Claude Sonnet 5
Public Benefits Bench (Vals AI)66.0%65.3%Claude Sonnet 5
SAGE (Vals AI)48.9%35.1%Claude Sonnet 5
MedScribe (Vals AI)76.0%84.5%Gemini 3.8 Flash
Vals Multimodal Index68.8%Not measuredOnly Claude Sonnet 5 measured
Long context reasoning (AA-LCR)82.0%84.0%Gemini 3.8 Flash
DTBench92.5%95.7%Gemini 3.8 Flash
LMCA50.0%52.9%Gemini 3.8 Flash
Surface Evolver Bench60.0%76.9%Gemini 3.8 Flash
Furniture assemblyNot measured31.7%Only Gemini 3.8 Flash measured
LMArena Text14421499Gemini 3.8 Flash
LMArena Text: instruction following14521492Gemini 3.8 Flash
LMArena Text: creative writing14161488Gemini 3.8 Flash
LMArena Vision12731315Gemini 3.8 Flash
LMArena Text: English14501498Gemini 3.8 Flash
LMArena Text: non-English14311491Gemini 3.8 Flash
LMArena Text: Chinese14781553Gemini 3.8 Flash
LMArena Text: German14421501Gemini 3.8 Flash
LMArena Text: Japanese14221507Gemini 3.8 Flash
LMArena Text: Korean14121464Gemini 3.8 Flash
LMArena Text: French14631496Gemini 3.8 Flash
LMArena Text: Spanish14381487Gemini 3.8 Flash
LMArena Text: Russian14501514Gemini 3.8 Flash
LMArena Text: Polish14251497Gemini 3.8 Flash
LMArena Text: multi-turn14531503Gemini 3.8 Flash
LMArena Text: longer queries14621507Gemini 3.8 Flash
LMArena Text: writing and language14361494Gemini 3.8 Flash
LMArena Text: entertainment and media14111480Gemini 3.8 Flash
LMArena Vision: English12751318Gemini 3.8 Flash
LMArena Vision: Chinese13311416Gemini 3.8 Flash
LMArena Vision: reading text12881333Gemini 3.8 Flash
LMArena Vision: humor12611321Gemini 3.8 Flash
LMArena Vision: creative writing12461299Gemini 3.8 Flash
LMArena Document1466Not measuredOnly Claude Sonnet 5 measured
Neither model has a result on the other 11 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Claude Sonnet 5 and Gemini 3.8 Flash
BenchmarkClaude Sonnet 5Gemini 3.8 FlashLeader
Neither model has a result on 5 boards here

What each workload costs

Three fixed token mixes at each model's listed price, so per-token rates become a bill.

Chat turn

1K input + 500 output tokens

Claude Sonnet 5$0.0070Fits in one request
Gemini 3.8 Flash$0.0029Fits in one request

Gemini 3.8 Flash costs less

Repository review

50K input + 3K output tokens

Claude Sonnet 5$0.130Fits in one request
Gemini 3.8 Flash$0.054Fits in one request

Gemini 3.8 Flash costs less

Agent loop

200K input + 10K output tokens

Claude Sonnet 5$0.500Fits in one request
Gemini 3.8 Flash$0.206Fits in one request

Gemini 3.8 Flash costs less

Listed OpenRouter rates, without cache or batch discounts. A workload that does not fit a model's context window would need splitting.

Specification differences

The leading value in a row is marked; a row with a missing value names no leader. Our two rows are marked in red.

Specifications of Claude Sonnet 5 and Gemini 3.8 Flash
SpecificationAnthropic Claude Sonnet 5Google Gemini 3.8 Flash
MakerAnthropicGoogle
WeightsNo public weights listedNo public weights listed
ReleasedJune 30, 2026September 2, 2026
Context window1M1.05M
Input $/Mtok$2.00$0.825
Output $/Mtok$10.00$4.125
Coding index63.570.5
Independent measurements behind it22
Cost per solved task$1.87$2.74
SourceOpenRouter listingOpenRouter listing

Questions

Is Claude Sonnet 5 better than Gemini 3.8 Flash for coding?

Pick Gemini 3.8 Flash for coding: it scores 70.5 on the Vibe Coding Index against 63.5 for Claude Sonnet 5. Pick Claude Sonnet 5 when a solved task costs $1.87 against $2.74, or when what matters is Vibe Code Bench (Vals AI) or Code migration (Vals AI), where it leads.

Which is cheaper, Claude Sonnet 5 or Gemini 3.8 Flash?

Claude Sonnet 5 costs $2.00 per million input tokens and $10.00 per million output tokens; Gemini 3.8 Flash costs $0.825 and $4.125. Per solved SWE-bench Verified task, Claude Sonnet 5 costs $1.87 and Gemini 3.8 Flash $2.74.

Which has the bigger context window, Claude Sonnet 5 or Gemini 3.8 Flash?

Gemini 3.8 Flash, with 1.05M tokens against 1M.

How many benchmarks is the Claude Sonnet 5 vs Gemini 3.8 Flash comparison based on?

113 benchmarks have a result for both models as of October 21, 2026. Claude Sonnet 5's coding index rests on 2 independent benchmarks and Gemini 3.8 Flash's on 2. Where only one model has a result, the page says so instead of naming a winner.

Compare next

Embed this comparison on your site

Free under CC BY 4.0, while the source link stays visible. Preview the frame · Terms and other embeds

<iframe src="https://llmbenchmark.ai/embed/compare/claude-sonnet-5-vs-gemini-3-8-flash" title="Claude Sonnet 5 vs Gemini 3.8 Flash, LLMBenchmark.ai" width="100%" height="360" style="border:0;max-width:100%" loading="lazy"></iframe>
<p style="font:13px/1.4 sans-serif;margin:6px 0 0">Source: <a href="https://llmbenchmark.ai/compare/claude-sonnet-5-vs-gemini-3-8-flash">LLMBenchmark.ai, Claude Sonnet 5 vs Gemini 3.8 Flash</a></p>