Enter opens the highlighted result. Esc closes.

Gemini 3.1 Pro Preview vs GLM 5

GLM 5 leads Gemini 3.1 Pro Preview on coding, 41.7 to 32.3 on the Vibe Coding Index, and GLM 5 costs 3.8x less per output token ($3.20 vs $12.00 per million). Updated October 22, 2026; 72 benchmarks have a result for both.

Gemini 3.1 Pro PreviewGoogle
Coding
32.3
Overall
54.0
Output $/M
$12.00
62
GLM 5Z.ai
Coding
41.7
Overall
54.3
Output $/M
$3.20
10
vs boards won of 72 shared

Gemini 3.1 Pro Preview or GLM 5: which to pick

Pick GLM 5 for coding: it scores 41.7 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 LMArena WebDev or LiveCodeBench (Vals AI), where it leads.

Shared results
72
Gemini 3.1 Pro Preview only
61
GLM 5 only
4
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 41.7 from 3 benchmarks.
Widest category
Reasoning, 21.4 points apart on average over 10 shared benchmarks.
Widest single gap
ARC-AGI-2: Gemini 3.1 Pro Preview 77.1% against GLM 5 4.9%, 72.2 points apart on a 0 to 100 scale.
Output price
Gemini 3.1 Pro Preview $12.00 against GLM 5 $3.20 per million output tokens, 3.8x apart.
Context window
Gemini 3.1 Pro Preview takes 1.05M tokens, GLM 5 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 5Ties
Coding120
Intelligence10
Agentic work25
Reasoning100
Math40
Knowledge100
Web design35
General200
All shared boards6210
CodingLike-for-likeSix of these boards feed the Vibe Coding Index120
Coding benchmarks for Gemini 3.1 Pro Preview and GLM 5
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
SWE-bench VerifiedNot measured72.8%Only GLM 5 measured
SWE-bench MultilingualNot measured69.7%Only GLM 5 measured
LMArena WebDev14471435Gemini 3.1 Pro Preview
AA Coding Index68.8Not measuredOnly Gemini 3.1 Pro Preview measured
LiveCodeBench (Vals AI)88.5%81.9%Gemini 3.1 Pro Preview
SWE-bench Verified (Vals AI)78.8%71.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%23.4%Gemini 3.1 Pro Preview
Code migration (Vals AI)17.3%Not measuredOnly Gemini 3.1 Pro Preview measured
ProgramBench (Vals AI)0.0%Not measuredOnly Gemini 3.1 Pro Preview measured
IOI (Vals AI)51.8%Not measuredOnly Gemini 3.1 Pro Preview measured
Terminal-Bench 2.1 (Vals AI)70.8%Not measuredOnly Gemini 3.1 Pro Preview measured
Vibe Code Bench 1-100 (Vals AI)6.7%Not measuredOnly Gemini 3.1 Pro Preview measured
SciCode58.7%Not measuredOnly Gemini 3.1 Pro Preview measured
Terminal-Bench Hard (Artificial Analysis run)53.8%43.2%Gemini 3.1 Pro Preview
Terminal-Bench80.2%52.4%Gemini 3.1 Pro Preview
GSO-Bench22.6%Not measuredOnly Gemini 3.1 Pro Preview measured
WeirdML72.1%48.2%Gemini 3.1 Pro Preview
MirrorCode8.9%Not measuredOnly Gemini 3.1 Pro Preview measured
ALE-Bench1160.6765.6Gemini 3.1 Pro Preview
LMArena Text: coding14841461Gemini 3.1 Pro Preview
LMArena Text: software and IT14871460Gemini 3.1 Pro Preview
LMArena WebDev: React14381424Gemini 3.1 Pro Preview
LMArena WebDev: HTML14901450Gemini 3.1 Pro Preview
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 13 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
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
AA Intelligence Index29.727.9Gemini 3.1 Pro Preview
Epoch Capabilities IndexNot measured145.8Only GLM 5 measured
Agentic workLike-for-likePublic boards, shown as published, kept out of the index25
Agentic work benchmarks for Gemini 3.1 Pro Preview and GLM 5
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
AA Agentic Index8.2Not measuredOnly Gemini 3.1 Pro Preview measured
Design Arena: agents building web apps1125Not measuredOnly Gemini 3.1 Pro Preview measured
Design Arena: agents building full-stack apps10681123GLM 5
Design Arena: agents building mobile apps10941136GLM 5
Design Arena: agents building Android apps10491147GLM 5
Design Arena: agents building Godot games12361144Gemini 3.1 Pro Preview
Design Arena: agents building games1113Not measuredOnly Gemini 3.1 Pro Preview measured
Design Arena: HTML slides11031098Gemini 3.1 Pro Preview
Design Arena: PowerPoint slides1041Not measuredOnly Gemini 3.1 Pro Preview measured
SREBench (Vals AI)0.0%Not measuredOnly Gemini 3.1 Pro Preview measured
Finance Agent (Vals AI)43.0%Not measuredOnly Gemini 3.1 Pro Preview measured
Tax Agent Bench (Vals AI)9.3%Not measuredOnly Gemini 3.1 Pro Preview measured
Legal Research Bench (Vals AI)20.7%Not measuredOnly Gemini 3.1 Pro Preview measured
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%98.2%GLM 5
APEX-Agents35.1%Not measuredOnly Gemini 3.1 Pro Preview measured
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$4,432GLM 5
Neither model has a result on the other 17 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index100
Reasoning benchmarks for Gemini 3.1 Pro Preview and GLM 5
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
GPQA Diamond95.5%83.3%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%82.0%Gemini 3.1 Pro Preview
Humanity's Last Exam (Artificial Analysis run)47.0%29.3%Gemini 3.1 Pro Preview
GPQA Diamond (Epoch AI run)94.4%87.8%Gemini 3.1 Pro Preview
ARC-AGI98.0%44.7%Gemini 3.1 Pro Preview
ARC-AGI-277.1%4.9%Gemini 3.1 Pro Preview
SimpleBench79.6%53.2%Gemini 3.1 Pro Preview
Chess puzzles51.0%Not measuredOnly Gemini 3.1 Pro Preview measured
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 prompts14851452Gemini 3.1 Pro Preview
LMArena Text: expert14831454Gemini 3.1 Pro Preview
LMArena Text: hard prompts in English14801460Gemini 3.1 Pro Preview
LMArena Vision: diagrams1311Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: homework1316Not measuredOnly Gemini 3.1 Pro Preview measured
Kagi LLM BenchmarkNot measured75.0%Only GLM 5 measured
Neither model has a result on the other 4 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index40
Math benchmarks for Gemini 3.1 Pro Preview and GLM 5
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
AIME98.1%91.7%Gemini 3.1 Pro Preview
OTIS Mock AIME95.6%80.0%Gemini 3.1 Pro Preview
FrontierMath, tiers 1 to 359.6%Not measuredOnly Gemini 3.1 Pro Preview measured
FrontierMath, tier 426.8%Not measuredOnly Gemini 3.1 Pro Preview measured
ProofBench26.0%Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text: math14861440Gemini 3.1 Pro Preview
LMArena Text: mathematical work14781451Gemini 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 index100
Knowledge benchmarks for Gemini 3.1 Pro Preview and GLM 5
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
MMLU Pro91.0%86.0%Gemini 3.1 Pro Preview
LegalBench (Vals AI)87.4%84.1%Gemini 3.1 Pro Preview
CaseLaw (Vals AI)64.8%52.5%Gemini 3.1 Pro Preview
CorpFin (Vals AI)64.5%62.9%Gemini 3.1 Pro Preview
TaxEval (Vals AI)72.9%70.0%Gemini 3.1 Pro Preview
MortgageTax (Vals AI)69.4%Not measuredOnly Gemini 3.1 Pro Preview measured
MedQA (Vals AI)96.4%94.3%Gemini 3.1 Pro Preview
MedCode (Vals AI)59.1%Not measuredOnly Gemini 3.1 Pro Preview measured
SimpleQA Verified73.5%Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text: science14971460Gemini 3.1 Pro Preview
LMArena Text: medicine and healthcare14861455Gemini 3.1 Pro Preview
LMArena Text: legal and government14871453Gemini 3.1 Pro Preview
LMArena Text: business and finance14591430Gemini 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 index35
Web design benchmarks for Gemini 3.1 Pro Preview and GLM 5
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
Design Arena: websites12331247GLM 5
Design Arena: UI components12241227GLM 5
Design Arena: game dev12021234GLM 5
Design Arena: data viz12091228GLM 5
Design Arena: 3D12341228Gemini 3.1 Pro Preview
Design Arena: all code categories12311246GLM 5
Design Arena: SVG12851168Gemini 3.1 Pro Preview
Design Arena: ASCII art12701147Gemini 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 index200
General benchmarks for Gemini 3.1 Pro Preview and GLM 5
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
Public Benefits Bench (Vals AI)53.8%Not measuredOnly Gemini 3.1 Pro Preview measured
SAGE (Vals AI)48.7%Not measuredOnly Gemini 3.1 Pro Preview measured
MedScribe (Vals AI)76.1%Not measuredOnly Gemini 3.1 Pro Preview measured
Vals Multimodal Index56.1%Not measuredOnly Gemini 3.1 Pro Preview measured
IFBench77.1%72.3%Gemini 3.1 Pro Preview
Long context reasoning (AA-LCR)82.0%75.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%18.7%Gemini 3.1 Pro Preview
Furniture assembly26.7%Not measuredOnly Gemini 3.1 Pro Preview measured
ExploitBench26.1%Not measuredOnly Gemini 3.1 Pro Preview measured
CL-bench Life16.9%Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text14801446Gemini 3.1 Pro Preview
LMArena Text: instruction following14661428Gemini 3.1 Pro Preview
LMArena Text: creative writing14821438Gemini 3.1 Pro Preview
LMArena Vision1296Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text: English14781458Gemini 3.1 Pro Preview
LMArena Text: non-English14761430Gemini 3.1 Pro Preview
LMArena Text: Chinese15271511Gemini 3.1 Pro Preview
LMArena Text: German14901447Gemini 3.1 Pro Preview
LMArena Text: Japanese14911416Gemini 3.1 Pro Preview
LMArena Text: Korean14551423Gemini 3.1 Pro Preview
LMArena Text: French14871456Gemini 3.1 Pro Preview
LMArena Text: Spanish14811454Gemini 3.1 Pro Preview
LMArena Text: Russian14971436Gemini 3.1 Pro Preview
LMArena Text: Polish14981434Gemini 3.1 Pro Preview
LMArena Text: multi-turn14871456Gemini 3.1 Pro Preview
LMArena Text: longer queries14821446Gemini 3.1 Pro Preview
LMArena Text: writing and language14811437Gemini 3.1 Pro Preview
LMArena Text: entertainment and media14651426Gemini 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
BenchmarkGemini 3.1 Pro PreviewGLM 5Leader
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$0.0026Fits in one request

GLM 5 costs less

Repository review

50K input + 3K output tokens

Gemini 3.1 Pro Preview$0.136Fits in one request
GLM 5$0.060Fits in one request

GLM 5 costs less

Agent loop

200K input + 10K output tokens

Gemini 3.1 Pro Preview$0.520Fits in one request
GLM 5$0.232Exceeds the context window

GLM 5 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
SpecificationGoogle Gemini 3.1 Pro PreviewZ.ai GLM 5
MakerGoogleZ.ai
WeightsNo public weights listedOpen weights
ReleasedFebruary 19, 2026February 11, 2026
Context window1.05M205K
Input $/Mtok$2.00$1.00
Output $/Mtok$12.00$3.20
Coding index32.341.7
Independent measurements behind it43
Cost per solved task$0.99$0.63
SourceOpenRouter listingOpenRouter listing

Questions

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

Pick GLM 5 for coding: it scores 41.7 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 LMArena WebDev or LiveCodeBench (Vals AI), where it leads.

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

Gemini 3.1 Pro Preview costs $2.00 per million input tokens and $12.00 per million output tokens; GLM 5 costs $1.00 and $3.20. Per solved SWE-bench Verified task, Gemini 3.1 Pro Preview costs $0.99 and GLM 5 $0.63.

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

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

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

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