Enter opens the highlighted result. Esc closes.

Gemini 3.1 Pro Preview vs GLM 5.2

GLM 5.2 leads Gemini 3.1 Pro Preview on coding, 59.7 to 32.4 on the Vibe Coding Index, and GLM 5.2 costs 2.7x less per output token ($4.40 vs $12.00 per million). Updated December 6, 2026; 98 benchmarks have a result for both.

Gemini 3.1 Pro PreviewGoogle
Coding
32.4
Overall
66.5
Output $/M
$12.00
52
GLM 5.2Z.ai
Coding
59.7
Overall
65.2
Output $/M
$4.40
45
vs boards won of 98 shared, 1 tied

Gemini 3.1 Pro Preview or GLM 5.2: which to pick

Pick GLM 5.2 for coding: it scores 59.7 on the Vibe Coding Index against 32.4 for Gemini 3.1 Pro Preview.

Pick Gemini 3.1 Pro Preview for work measured by LiveCodeBench (Vals AI) or Terminal-Bench 2.1 (Vals AI), where it leads.

Shared results
98
Gemini 3.1 Pro Preview only
40
GLM 5.2 only
13
Like-for-like categories
7 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.4 from 3 benchmarks, GLM 5.2 59.7 from 3 benchmarks.
Widest category
Reasoning, 13.1 points apart on average over 14 shared benchmarks.
Widest single gap
ARC-AGI-2: Gemini 3.1 Pro Preview 77.1% against GLM 5.2 22.8%, 54.3 points apart on a 0 to 100 scale.
Output price
Gemini 3.1 Pro Preview $12.00 against GLM 5.2 $4.40 per million output tokens, 2.7x apart.
Context window
Both take 1.05M tokens.

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.2Ties
Coding89
Agentic work0171 tie
Reasoning122
Math43
Knowledge73
Web design26
General195
All shared boards52451 tie
CodingLike-for-likeSix of these boards feed the Vibe Coding Index89
Coding benchmarks for Gemini 3.1 Pro Preview and GLM 5.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
LMArena WebDev14471608GLM 5.2
LiveCodeBench (Vals AI)88.5%69.5%Gemini 3.1 Pro Preview
SWE-bench Verified (Vals AI)78.8%82.8%GLM 5.2
Terminal-Bench 4 (Vals AI)2.5%Not measuredOnly Gemini 3.1 Pro Preview measured
Code migration (Vals AI)17.3%37.9%GLM 5.2
ProgramBench (Vals AI)0.0%0.5%GLM 5.2
IOI (Vals AI)51.8%Not measuredOnly Gemini 3.1 Pro Preview measured
Terminal-Bench 2.1 (Vals AI)70.8%67.8%Gemini 3.1 Pro Preview
Vibe Code Bench 1-100 (Vals AI)6.7%Not measuredOnly Gemini 3.1 Pro Preview measured
SkillsBench (Vals AI)Not measured45.1%Only GLM 5.2 measured
SciCode58.7%51.2%Gemini 3.1 Pro Preview
Terminal-Bench Hard (Artificial Analysis run)53.8%50.8%Gemini 3.1 Pro Preview
Terminal-Bench 4.0 (Artificial Analysis run)4.0%1.0%Gemini 3.1 Pro Preview
Terminal-Bench80.2%Not measuredOnly Gemini 3.1 Pro Preview measured
FrontierCodeNot measured24.5%Only GLM 5.2 measured
GSO-Bench22.6%Not measuredOnly Gemini 3.1 Pro Preview measured
WeirdML72.1%70.1%Gemini 3.1 Pro Preview
MirrorCode8.9%36.7%GLM 5.2
ALE-Bench1160.61047.0Gemini 3.1 Pro Preview
LMArena Text: coding14831488GLM 5.2
LMArena Text: software and IT14861487GLM 5.2
LMArena WebDev: React14381621GLM 5.2
LMArena WebDev: HTML14901567GLM 5.2
LMArena WebDev: from an image1480Not measuredOnly Gemini 3.1 Pro Preview measured
SciCode14.3%Not measuredOnly Gemini 3.1 Pro Preview measured
SWE Atlas: Codebase QnANot measured48.1%Only GLM 5.2 measured
SWE Atlas: RefactoringNot measured42.4%Only GLM 5.2 measured
SWE Atlas: Test WritingNot measured41.5%Only GLM 5.2 measured
GameBench 264.749.9Gemini 3.1 Pro Preview
Terminal-Bench 3.0Not measured4.6%Only GLM 5.2 measured
ProgramBenchNot measured0.0%Only GLM 5.2 measured
Neither model has a result on the other 21 boards here
IntelligenceDirectional onlyPublic boards, shown as published, kept out of the index1 board, none shared
Intelligence benchmarks for Gemini 3.1 Pro Preview and GLM 5.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
Epoch Capabilities IndexNot measured153.0Only GLM 5.2 measured
Neither model has a result on the other 1 board here
Agentic workLike-for-likePublic boards, shown as published, kept out of the index017
Agentic work benchmarks for Gemini 3.1 Pro Preview and GLM 5.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
Design Arena: agents building web apps10861184GLM 5.2
Design Arena: agents building full-stack apps11141288GLM 5.2
Design Arena: agents building mobile apps10831152GLM 5.2
Design Arena: agents building Android apps10281162GLM 5.2
Design Arena: agents building Godot games11291142GLM 5.2
Design Arena: agents building games10611156GLM 5.2
Design Arena: HTML slides10561077GLM 5.2
Design Arena: PowerPoint slides10461157GLM 5.2
Design Arena: spreadsheets9841123GLM 5.2
SREBench (Vals AI)0.0%0.0%Tie
Finance Agent (Vals AI)43.0%49.7%GLM 5.2
Tax Agent Bench (Vals AI)9.3%Not measuredOnly Gemini 3.1 Pro Preview measured
Legal Research Bench (Vals AI)20.7%31.3%GLM 5.2
Excel Modeling Benchmark (Vals AI)52.6%61.5%GLM 5.2
BioMysteryBench (Vals AI)60.0%Not measuredOnly Gemini 3.1 Pro Preview measured
Terminal-Bench-Science (Vals AI)2.9%Not measuredOnly Gemini 3.1 Pro Preview measured
Vals Science Index27.9%Not measuredOnly Gemini 3.1 Pro Preview measured
τ²-Bench Telecom95.6%99.1%GLM 5.2
APEX-Agents35.1%45.2%GLM 5.2
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
PostTrainBench18.1%30.4%GLM 5.2
Vending-Bench 2$911$8,314GLM 5.2
MCP AtlasNot measured77.8%Only GLM 5.2 measured
Toolathlon-VerifiedNot measured59.9%Only GLM 5.2 measured
τ³-Banking26.0%37.1%GLM 5.2
Neither model has a result on the other 17 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index122
Reasoning benchmarks for Gemini 3.1 Pro Preview and GLM 5.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
GPQA Diamond95.5%85.6%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%89.5%Gemini 3.1 Pro Preview
Humanity's Last Exam (Artificial Analysis run)47.0%41.1%Gemini 3.1 Pro Preview
HLE-Diamond (Artificial Analysis run)31.4%17.7%Gemini 3.1 Pro Preview
GPQA Diamond (Epoch AI run)94.4%91.9%Gemini 3.1 Pro Preview
ARC-AGI98.0%77.0%Gemini 3.1 Pro Preview
ARC-AGI-277.1%22.8%Gemini 3.1 Pro Preview
SimpleBench79.6%58.8%Gemini 3.1 Pro Preview
Chess puzzles51.0%22.0%Gemini 3.1 Pro Preview
Mystery game puzzles34.0%19.0%Gemini 3.1 Pro Preview
EBR-bench14.3%9.5%Gemini 3.1 Pro Preview
LMArena Text: hard prompts14841481Gemini 3.1 Pro Preview
LMArena Text: expert14831488GLM 5.2
LMArena Text: hard prompts in English14801481GLM 5.2
LMArena Vision: diagrams1312Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: homework1317Not measuredOnly Gemini 3.1 Pro Preview measured
Kagi LLM BenchmarkNot measured62.6%Only GLM 5.2 measured
Neither model has a result on the other 7 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index43
Math benchmarks for Gemini 3.1 Pro Preview and GLM 5.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
AIME98.1%Not measuredOnly Gemini 3.1 Pro Preview measured
OTIS Mock AIME95.6%86.4%Gemini 3.1 Pro Preview
FrontierMath, tiers 1 to 359.6%59.2%Gemini 3.1 Pro Preview
FrontierMath, tier 426.8%29.3%GLM 5.2
ProofBench26.0%35.0%GLM 5.2
LMArena Text: math14851485Gemini 3.1 Pro Preview
LMArena Text: mathematical work14771490GLM 5.2
MathArena27.8%21.1%Gemini 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 index73
Knowledge benchmarks for Gemini 3.1 Pro Preview and GLM 5.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
MMLU Pro91.0%86.7%Gemini 3.1 Pro Preview
LegalBench (Vals AI)87.4%84.1%Gemini 3.1 Pro Preview
CaseLaw (Vals AI)64.8%Not measuredOnly Gemini 3.1 Pro Preview measured
CorpFin (Vals AI)64.5%66.1%GLM 5.2
TaxEval (Vals AI)72.9%73.3%GLM 5.2
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%40.8%Gemini 3.1 Pro Preview
AA-OmniscienceNot measured0.6Only GLM 5.2 measured
SimpleQA Verified73.5%34.2%Gemini 3.1 Pro Preview
GeoBench84.0%Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text: science14961489Gemini 3.1 Pro Preview
LMArena Text: medicine and healthcare14861476Gemini 3.1 Pro Preview
LMArena Text: legal and government14871490GLM 5.2
LMArena Text: business and finance14601450Gemini 3.1 Pro Preview
FACTS Benchmark Suite69.1%Not measuredOnly Gemini 3.1 Pro Preview measured
Neither model has a result on the other 5 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.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
Design Arena: websites12741323GLM 5.2
Design Arena: UI components12041271GLM 5.2
Design Arena: game dev11701234GLM 5.2
Design Arena: data viz12011275GLM 5.2
Design Arena: 3D11961247GLM 5.2
Design Arena: all code categories12731328GLM 5.2
Design Arena: SVG13271245Gemini 3.1 Pro Preview
Design Arena: ASCII art12461174Gemini 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 index195
General benchmarks for Gemini 3.1 Pro Preview and GLM 5.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
Public Benefits Bench (Vals AI)53.8%Not measuredOnly Gemini 3.1 Pro Preview measured
SAGE (Vals AI)83.2%Not measuredOnly Gemini 3.1 Pro Preview measured
MedScribe (Vals AI)76.1%83.5%GLM 5.2
Vals Multimodal Index56.1%Not measuredOnly Gemini 3.1 Pro Preview measured
IFBench77.1%73.3%Gemini 3.1 Pro Preview
Long context reasoning (AA-LCR)82.0%78.3%Gemini 3.1 Pro Preview
GDPval-AA8021383GLM 5.2
DTBench97.1%93.6%Gemini 3.1 Pro Preview
LMCA53.8%45.8%Gemini 3.1 Pro Preview
CL-bench20.8%Not measuredOnly Gemini 3.1 Pro Preview measured
Surface Evolver BenchNot measured55.6%Only GLM 5.2 measured
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 Text14801470Gemini 3.1 Pro Preview
LMArena Text: instruction following14651467GLM 5.2
LMArena Text: creative writing14831460Gemini 3.1 Pro Preview
LMArena Vision1296Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Text: English14781475Gemini 3.1 Pro Preview
LMArena Text: non-English14761458Gemini 3.1 Pro Preview
LMArena Text: Chinese15291523Gemini 3.1 Pro Preview
LMArena Text: German14921467Gemini 3.1 Pro Preview
LMArena Text: Japanese14941452Gemini 3.1 Pro Preview
LMArena Text: Korean14581430Gemini 3.1 Pro Preview
LMArena Text: French14871477Gemini 3.1 Pro Preview
LMArena Text: Spanish14801480GLM 5.2
LMArena Text: Russian14971466Gemini 3.1 Pro Preview
LMArena Text: Polish14981459Gemini 3.1 Pro Preview
LMArena Text: multi-turn14851470Gemini 3.1 Pro Preview
LMArena Text: longer queries14821479Gemini 3.1 Pro Preview
LMArena Text: writing and language14811462Gemini 3.1 Pro Preview
LMArena Text: entertainment and media14651448Gemini 3.1 Pro Preview
LMArena Vision: English1286Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: Chinese1361Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: reading text1304Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: humor1324Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: captioning1343Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: recognizing things1327Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Vision: creative writing1324Not measuredOnly Gemini 3.1 Pro Preview measured
LMArena Document1443Not measuredOnly Gemini 3.1 Pro Preview measured
EQ-Bench 411321208GLM 5.2
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.2
BenchmarkGemini 3.1 Pro PreviewGLM 5.2Leader
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.2$0.0036Fits in one request

GLM 5.2 costs less

Repository review

50K input + 3K output tokens

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

GLM 5.2 costs less

Agent loop

200K input + 10K output tokens

Gemini 3.1 Pro Preview$0.520Fits in one request
GLM 5.2$0.324Fits in one request

GLM 5.2 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.2
SpecificationGoogle Gemini 3.1 Pro PreviewZ.ai GLM 5.2
MakerGoogleZ.ai
WeightsNo public weights listedOpen weights
ReleasedFebruary 19, 2026June 16, 2026
Context window1.05M1.05M
Input $/Mtok$2.00$1.40
Output $/Mtok$12.00$4.40
Coding index32.459.7
Independent measurements behind it33
Cost per solved task$0.99$0.86
SourceOpenRouter listingOpenRouter listing

Questions

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

Pick GLM 5.2 for coding: it scores 59.7 on the Vibe Coding Index against 32.4 for Gemini 3.1 Pro Preview. Pick Gemini 3.1 Pro Preview for work measured by LiveCodeBench (Vals AI) or Terminal-Bench 2.1 (Vals AI), where it leads.

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

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

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

Neither: both take 1.05M tokens.

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

98 benchmarks have a result for both models as of December 6, 2026. Gemini 3.1 Pro Preview's coding index rests on 3 independent benchmarks and GLM 5.2'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-2" title="Gemini 3.1 Pro Preview vs GLM 5.2, 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-2">LLMBenchmark.ai, Gemini 3.1 Pro Preview vs GLM 5.2</a></p>