Enter opens the highlighted result. Esc closes.

Gemini 3.1 Pro Preview vs GLM 5.1

GLM 5.1 leads Gemini 3.1 Pro Preview on coding, 49.2 to 32.3 on the Vibe Coding Index, and GLM 5.1 costs 2.7x less per output token ($4.40 vs $12.00 per million). Updated October 21, 2026; 87 benchmarks have a result for both.

Gemini 3.1 Pro PreviewGoogle
Coding
32.3
Overall
54.0
Output $/M
$12.00
60
GLM 5.1Z.ai
Coding
49.2
Overall
57.5
Output $/M
$4.40
26
vs boards won of 87 shared, 1 tied

Gemini 3.1 Pro Preview or GLM 5.1: which to pick

Pick GLM 5.1 for coding: it scores 49.2 on the Vibe Coding Index against 32.3 for Gemini 3.1 Pro Preview, though on 3 benchmarks against 4.

Pick Gemini 3.1 Pro Preview for a larger context window (1.05M against 205K tokens) and work measured by AA Coding Index or LiveCodeBench (Vals AI), where it leads.

Shared results
87
Gemini 3.1 Pro Preview only
46
GLM 5.1 only
2
Like-for-like categories
8 of 9

Only benchmarks that tested both models count toward a pick; a result only one model has is shown but not compared.

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
Gemini 3.1 Pro Preview 32.3 from 4 benchmarks, GLM 5.1 49.2 from 3 benchmarks.
Widest category
Reasoning, 10.9 points apart on average over 9 shared benchmarks.
Widest single gap
SimpleQA Verified: Gemini 3.1 Pro Preview 73.5% against GLM 5.1 34.0%, 39.5 points apart on a 0 to 100 scale.
Output price
Gemini 3.1 Pro Preview $12.00 against GLM 5.1 $4.40 per million output tokens, 2.7x apart.
Context window
Gemini 3.1 Pro Preview takes 1.05M tokens, GLM 5.1 205K.

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
CategoryGemini 3.1 Pro PreviewBarsGLM 5.1Ties
Coding1051 tie
Intelligence10
Agentic work113
Reasoning81
Math60
Knowledge110
Web design26
General211
All shared boards60261 tie
CodingLike-for-likeSix of these boards feed the Vibe Coding Index105
Coding benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
LMArena WebDev14471508GLM 5.1
AA Coding Index68.855.8Gemini 3.1 Pro Preview
LiveCodeBench (Vals AI)88.5%81.4%Gemini 3.1 Pro Preview
SWE-bench Verified (Vals AI)78.8%76.4%Gemini 3.1 Pro Preview
Terminal-Bench 4 (Vals AI)2.5%Not measuredOnly Gemini 3.1 Pro Preview measured
Vibe Code Bench (Vals AI)32.0%31.5%Gemini 3.1 Pro Preview
Code migration (Vals AI)17.3%25.8%GLM 5.1
ProgramBench (Vals AI)0.0%0.0%Tie
IOI (Vals AI)51.8%Not measuredOnly Gemini 3.1 Pro Preview measured
Terminal-Bench 2.1 (Vals AI)70.8%56.9%Gemini 3.1 Pro Preview
Vibe Code Bench 1-100 (Vals AI)6.7%Not measuredOnly Gemini 3.1 Pro Preview measured
SciCode58.7%44.8%Gemini 3.1 Pro Preview
Terminal-Bench Hard (Artificial Analysis run)53.8%43.2%Gemini 3.1 Pro Preview
Terminal-Bench80.2%Not measuredOnly Gemini 3.1 Pro Preview measured
GSO-Bench22.6%Not measuredOnly Gemini 3.1 Pro Preview measured
WeirdML72.1%57.1%Gemini 3.1 Pro Preview
MirrorCode8.9%Not measuredOnly Gemini 3.1 Pro Preview measured
ALE-Bench1160.6887.1Gemini 3.1 Pro Preview
LMArena Text: coding14841485GLM 5.1
LMArena Text: software and IT14871484Gemini 3.1 Pro Preview
LMArena WebDev: React14381505GLM 5.1
LMArena WebDev: HTML14901508GLM 5.1
LMArena WebDev: from an image1481Not measuredOnly Gemini 3.1 Pro Preview measured
SciCode14.3%Not measuredOnly Gemini 3.1 Pro Preview measured
Neither model has a result on the other 15 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index10
Intelligence benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
AA Intelligence Index29.726.1Gemini 3.1 Pro Preview
Epoch Capabilities IndexNot measured149.8Only GLM 5.1 measured
Agentic workLike-for-likePublic boards, shown as published, kept out of the index113
Agentic work benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
AA Agentic Index8.223.9GLM 5.1
Design Arena: agents building web apps11251175GLM 5.1
Design Arena: agents building full-stack apps10681167GLM 5.1
Design Arena: agents building mobile apps10931162GLM 5.1
Design Arena: agents building Android apps10481180GLM 5.1
Design Arena: agents building Godot games12361053Gemini 3.1 Pro Preview
Design Arena: agents building games11141164GLM 5.1
Design Arena: HTML slides11531170GLM 5.1
Design Arena: PowerPoint slides10661188GLM 5.1
Design Arena: spreadsheetsNot measured1315Only GLM 5.1 measured
SREBench (Vals AI)0.0%Not measuredOnly Gemini 3.1 Pro Preview measured
Finance Agent (Vals AI)43.0%44.8%GLM 5.1
Tax Agent Bench (Vals AI)9.3%Not measuredOnly Gemini 3.1 Pro Preview measured
Legal Research Bench (Vals AI)20.7%27.9%GLM 5.1
Excel Modeling Benchmark (Vals AI)52.6%Not measuredOnly Gemini 3.1 Pro Preview measured
BioMysteryBench (Vals AI)60.0%Not measuredOnly Gemini 3.1 Pro Preview measured
Terminal-Bench-Science (Vals AI)1.4%Not measuredOnly Gemini 3.1 Pro Preview measured
Vals Science Index27.4%Not measuredOnly Gemini 3.1 Pro Preview measured
τ²-Bench Telecom95.6%97.7%GLM 5.1
APEX-Agents35.1%40.9%GLM 5.1
METR time horizons77.0%Not measuredOnly Gemini 3.1 Pro Preview measured
BALROG57.0%Not measuredOnly Gemini 3.1 Pro Preview measured
DeepResearch Bench47.8%Not measuredOnly Gemini 3.1 Pro Preview measured
PostTrainBench22.0%Not measuredOnly Gemini 3.1 Pro Preview measured
Vending-Bench 2$911$5,634GLM 5.1
Neither model has a result on the other 16 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index81
Reasoning benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
GPQA Diamond95.5%84.5%Gemini 3.1 Pro Preview
MysteryMechanism (Vals AI)20.7%Not measuredOnly Gemini 3.1 Pro Preview measured
MMMU Pro (Vals AI)88.2%Not measuredOnly Gemini 3.1 Pro Preview measured
GPQA Diamond (Artificial Analysis run)94.1%86.8%Gemini 3.1 Pro Preview
Humanity's Last Exam (Artificial Analysis run)47.0%30.1%Gemini 3.1 Pro Preview
GPQA Diamond (Epoch AI run)94.4%89.9%Gemini 3.1 Pro Preview
ARC-AGI98.0%Not measuredOnly Gemini 3.1 Pro Preview measured
ARC-AGI-277.1%Not measuredOnly Gemini 3.1 Pro Preview measured
SimpleBench79.6%55.1%Gemini 3.1 Pro Preview
Chess puzzles51.0%20.0%Gemini 3.1 Pro Preview
Mystery game puzzles34.0%Not measuredOnly Gemini 3.1 Pro Preview measured
EBR-bench14.3%Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text: hard prompts14851473Gemini 3.1 Pro Preview
LMArena Text: expert14831478Gemini 3.1 Pro Preview
LMArena Text: hard prompts in English14801482GLM 5.1
LMArena Vision: diagrams1311Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: homework1316Not measuredOnly Gemini 3.1 Pro Preview measured
Neither model has a result on the other 5 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index60
Math benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
AIME98.1%91.9%Gemini 3.1 Pro Preview
OTIS Mock AIME95.6%93.3%Gemini 3.1 Pro Preview
FrontierMath, tiers 1 to 359.6%36.8%Gemini 3.1 Pro Preview
FrontierMath, tier 426.8%Not measuredOnly Gemini 3.1 Pro Preview measured
ProofBench26.0%22.2%Gemini 3.1 Pro Preview
LMArena Text: math14861473Gemini 3.1 Pro Preview
LMArena Text: mathematical work14781470Gemini 3.1 Pro Preview
Neither model has a result on the other 6 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index110
Knowledge benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
MMLU Pro91.0%86.9%Gemini 3.1 Pro Preview
LegalBench (Vals AI)87.4%84.4%Gemini 3.1 Pro Preview
CaseLaw (Vals AI)64.8%51.5%Gemini 3.1 Pro Preview
CorpFin (Vals AI)64.5%64.5%Gemini 3.1 Pro Preview
TaxEval (Vals AI)72.9%71.2%Gemini 3.1 Pro Preview
MortgageTax (Vals AI)69.4%Not measuredOnly Gemini 3.1 Pro Preview measured
MedQA (Vals AI)96.4%Not measuredOnly Gemini 3.1 Pro Preview measured
MedCode (Vals AI)59.1%41.6%Gemini 3.1 Pro Preview
SimpleQA Verified73.5%34.0%Gemini 3.1 Pro Preview
LMArena Text: science14971478Gemini 3.1 Pro Preview
LMArena Text: medicine and healthcare14861474Gemini 3.1 Pro Preview
LMArena Text: legal and government14871465Gemini 3.1 Pro Preview
LMArena Text: business and finance14591452Gemini 3.1 Pro Preview
FACTS Benchmark Suite67.4%Not measuredOnly Gemini 3.1 Pro Preview measured
Neither model has a result on the other 4 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index26
Web design benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
Design Arena: websites12341290GLM 5.1
Design Arena: UI components12271292GLM 5.1
Design Arena: game dev12031265GLM 5.1
Design Arena: data viz12091366GLM 5.1
Design Arena: 3D12341336GLM 5.1
Design Arena: all code categories12311268GLM 5.1
Design Arena: SVG12851218Gemini 3.1 Pro Preview
Design Arena: ASCII art12701142Gemini 3.1 Pro Preview
Neither model has a result on the other 1 board here
GeneralLike-for-likePublic boards, shown as published, kept out of the index211
General benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
Public Benefits Bench (Vals AI)53.8%61.8%GLM 5.1
SAGE (Vals AI)48.7%Not measuredOnly Gemini 3.1 Pro Preview measured
MedScribe (Vals AI)76.1%72.3%Gemini 3.1 Pro Preview
Vals Multimodal Index56.1%Not measuredOnly Gemini 3.1 Pro Preview measured
IFBench77.1%76.3%Gemini 3.1 Pro Preview
Long context reasoning (AA-LCR)82.0%73.7%Gemini 3.1 Pro Preview
DTBench97.1%Not measuredOnly Gemini 3.1 Pro Preview measured
LMCA53.8%Not measuredOnly Gemini 3.1 Pro Preview measured
CL-bench20.8%Not measuredOnly Gemini 3.1 Pro Preview measured
Furniture assembly26.7%Not measuredOnly Gemini 3.1 Pro Preview measured
ExploitBench26.1%18.1%Gemini 3.1 Pro Preview
CL-bench Life16.9%Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text14801463Gemini 3.1 Pro Preview
LMArena Text: instruction following14661453Gemini 3.1 Pro Preview
LMArena Text: creative writing14821453Gemini 3.1 Pro Preview
LMArena Vision1296Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text: English14781476Gemini 3.1 Pro Preview
LMArena Text: non-English14761448Gemini 3.1 Pro Preview
LMArena Text: Chinese15271515Gemini 3.1 Pro Preview
LMArena Text: German14901467Gemini 3.1 Pro Preview
LMArena Text: Japanese14911435Gemini 3.1 Pro Preview
LMArena Text: Korean14551424Gemini 3.1 Pro Preview
LMArena Text: French14871470Gemini 3.1 Pro Preview
LMArena Text: Spanish14811468Gemini 3.1 Pro Preview
LMArena Text: Russian14971454Gemini 3.1 Pro Preview
LMArena Text: Polish14981449Gemini 3.1 Pro Preview
LMArena Text: multi-turn14871473Gemini 3.1 Pro Preview
LMArena Text: longer queries14821467Gemini 3.1 Pro Preview
LMArena Text: writing and language14811454Gemini 3.1 Pro Preview
LMArena Text: entertainment and media14651442Gemini 3.1 Pro Preview
LMArena Vision: English1287Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: Chinese1364Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: reading text1304Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: humor1322Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: captioning1345Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: recognizing things1330Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: creative writing1324Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Document1444Not measuredOnly Gemini 3.1 Pro Preview measured
Neither model has a result on the other 8 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Gemini 3.1 Pro Preview and GLM 5.1
BenchmarkGemini 3.1 Pro PreviewGLM 5.1Leader
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

Gemini 3.1 Pro Preview$0.0080Fits in one request
GLM 5.1$0.0036Fits in one request

GLM 5.1 costs less

Repository review

50K input + 3K output tokens

Gemini 3.1 Pro Preview$0.136Fits in one request
GLM 5.1$0.083Fits in one request

GLM 5.1 costs less

Agent loop

200K input + 10K output tokens

Gemini 3.1 Pro Preview$0.520Fits in one request
GLM 5.1$0.324Exceeds the context window

GLM 5.1 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 Gemini 3.1 Pro Preview and GLM 5.1
SpecificationGoogle Gemini 3.1 Pro PreviewZ.ai GLM 5.1
MakerGoogleZ.ai
WeightsNo public weights listedOpen weights
ReleasedFebruary 19, 2026April 7, 2026
Context window1.05M205K
Input $/Mtok$2.00$1.40
Output $/Mtok$12.00$4.40
Coding index32.349.2
Independent measurements behind it43
Cost per solved task$0.99$0.60
SourceOpenRouter listingOpenRouter listing

Questions

Is Gemini 3.1 Pro Preview better than GLM 5.1 for coding?

Pick GLM 5.1 for coding: it scores 49.2 on the Vibe Coding Index against 32.3 for Gemini 3.1 Pro Preview, though on 3 benchmarks against 4. Pick Gemini 3.1 Pro Preview for a larger context window (1.05M against 205K tokens) and work measured by AA Coding Index or LiveCodeBench (Vals AI), where it leads.

Which is cheaper, Gemini 3.1 Pro Preview or GLM 5.1?

Gemini 3.1 Pro Preview costs $2.00 per million input tokens and $12.00 per million output tokens; GLM 5.1 costs $1.40 and $4.40. Per solved SWE-bench Verified task, Gemini 3.1 Pro Preview costs $0.99 and GLM 5.1 $0.60.

Which has the bigger context window, Gemini 3.1 Pro Preview or GLM 5.1?

Gemini 3.1 Pro Preview, with 1.05M tokens against 205K.

How many benchmarks is the Gemini 3.1 Pro Preview vs GLM 5.1 comparison based on?

87 benchmarks have a result for both models as of October 21, 2026. Gemini 3.1 Pro Preview's coding index rests on 4 independent benchmarks and GLM 5.1's on 3. 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/gemini-3-1-pro-preview-vs-glm-5-1" title="Gemini 3.1 Pro Preview vs GLM 5.1, 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/gemini-3-1-pro-preview-vs-glm-5-1">LLMBenchmark.ai, Gemini 3.1 Pro Preview vs GLM 5.1</a></p>