Enter opens the highlighted result. Esc closes.

GLM 5.1 vs Grok 4.20

GLM 5.1 leads Grok 4.20 on coding, 49.2 to 33.3 on the Vibe Coding Index, and Grok 4.20 costs 1.8x less per output token ($2.50 vs $4.40 per million). Updated October 21, 2026; 40 benchmarks have a result for both.

GLM 5.1Z.ai
Coding
49.2
Overall
26.1
Output $/M
$4.40
28
Grok 4.20xAI
Coding
33.3
Overall
25.7
Output $/M
$2.50
12
vs boards won of 40 shared

GLM 5.1 or Grok 4.20: which to pick

Pick GLM 5.1 for coding: it scores 49.2 on the Vibe Coding Index against 33.3 for Grok 4.20.

Pick Grok 4.20 for output tokens 1.8x cheaper ($2.50 vs $4.40 per million) and a larger context window (2M against 205K tokens).

Shared results
40
GLM 5.1 only
49
Grok 4.20 only
14
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
GLM 5.1 49.2 from 3 benchmarks, Grok 4.20 33.3 from 2 benchmarks.
Widest category
Coding, 11.8 points apart on average over 7 shared benchmarks.
Widest single gap
Vibe Code Bench (Vals AI): GLM 5.1 31.5% against Grok 4.20 4.1%, 27.4 points apart on a 0 to 100 scale.
Output price
GLM 5.1 $4.40 against Grok 4.20 $2.50 per million output tokens, 1.8x apart.
Context window
GLM 5.1 takes 205K tokens, Grok 4.20 2M.

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
CategoryGLM 5.1BarsGrok 4.20Ties
Coding61
Intelligence11
Agentic work82
Reasoning03
Math01
Knowledge42
Web design71
General21
All shared boards2812
CodingLike-for-likeSix of these boards feed the Vibe Coding Index61
Coding benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
LMArena WebDev1508Not measuredOnly GLM 5.1 measured
AA Coding Index55.8Not measuredOnly GLM 5.1 measured
LiveCodeBench (Vals AI)81.4%84.3%Grok 4.20
SWE-bench Verified (Vals AI)76.4%72.2%GLM 5.1
Vibe Code Bench (Vals AI)31.5%4.1%GLM 5.1
Code migration (Vals AI)25.8%0.3%GLM 5.1
ProgramBench (Vals AI)0.0%Not measuredOnly GLM 5.1 measured
Terminal-Bench 2.1 (Vals AI)56.9%44.2%GLM 5.1
SciCode44.8%Not measuredOnly GLM 5.1 measured
Terminal-Bench Hard (Artificial Analysis run)43.2%37.9%GLM 5.1
Terminal-BenchNot measured57.3%Only Grok 4.20 measured
WeirdML57.1%52.3%GLM 5.1
ALE-Bench887.1Not measuredOnly GLM 5.1 measured
LMArena Text: coding1485Not measuredOnly GLM 5.1 measured
LMArena Text: software and IT1484Not measuredOnly GLM 5.1 measured
LMArena WebDev: React1505Not measuredOnly GLM 5.1 measured
LMArena WebDev: HTML1508Not measuredOnly GLM 5.1 measured
Neither model has a result on the other 21 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index11
Intelligence benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
AA Intelligence Index26.125.7GLM 5.1
Epoch Capabilities Index149.8152.1Grok 4.20
Agentic workLike-for-likePublic boards, shown as published, kept out of the index82
Agentic work benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
AA Agentic Index23.9Not measuredOnly GLM 5.1 measured
Design Arena: agents building web apps11751144GLM 5.1
Design Arena: agents building full-stack apps11671054GLM 5.1
Design Arena: agents building mobile apps11621090GLM 5.1
Design Arena: agents building Android apps11801052GLM 5.1
Design Arena: agents building Godot games10531089Grok 4.20
Design Arena: agents building games1164Not measuredOnly GLM 5.1 measured
Design Arena: HTML slides11701180Grok 4.20
Design Arena: PowerPoint slides1188Not measuredOnly GLM 5.1 measured
Design Arena: spreadsheets1315Not measuredOnly GLM 5.1 measured
Finance Agent (Vals AI)44.8%28.5%GLM 5.1
Tax Agent Bench (Vals AI)Not measured7.0%Only Grok 4.20 measured
Legal Research Bench (Vals AI)27.9%13.9%GLM 5.1
Excel Modeling Benchmark (Vals AI)Not measured11.7%Only Grok 4.20 measured
τ²-Bench Telecom97.7%93.0%GLM 5.1
APEX-Agents40.9%Not measuredOnly GLM 5.1 measured
Vending-Bench 2$5,634$4,663GLM 5.1
Neither model has a result on the other 22 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index03
Reasoning benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
GPQA Diamond84.5%88.6%Grok 4.20
MMMU Pro (Vals AI)Not measured83.5%Only Grok 4.20 measured
GPQA Diamond (Artificial Analysis run)86.8%91.1%Grok 4.20
Humanity's Last Exam (Artificial Analysis run)30.1%34.5%Grok 4.20
GPQA Diamond (Epoch AI run)89.9%Not measuredOnly GLM 5.1 measured
ARC-AGINot measured89.5%Only Grok 4.20 measured
ARC-AGI-2Not measured65.1%Only Grok 4.20 measured
SimpleBench55.1%Not measuredOnly GLM 5.1 measured
Chess puzzles20.0%Not measuredOnly GLM 5.1 measured
LMArena Text: hard prompts1473Not measuredOnly GLM 5.1 measured
LMArena Text: expert1478Not measuredOnly GLM 5.1 measured
LMArena Text: hard prompts in English1482Not measuredOnly GLM 5.1 measured
Neither model has a result on the other 9 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index01
Math benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
AIME91.9%96.5%Grok 4.20
OTIS Mock AIME93.3%Not measuredOnly GLM 5.1 measured
FrontierMath, tiers 1 to 336.8%Not measuredOnly GLM 5.1 measured
ProofBench22.2%Not measuredOnly GLM 5.1 measured
LMArena Text: math1473Not measuredOnly GLM 5.1 measured
LMArena Text: mathematical work1470Not measuredOnly GLM 5.1 measured
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index42
Knowledge benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
MMLU Pro86.9%86.3%GLM 5.1
LegalBench (Vals AI)84.4%77.7%GLM 5.1
CaseLaw (Vals AI)51.5%54.4%Grok 4.20
CorpFin (Vals AI)64.5%63.7%GLM 5.1
TaxEval (Vals AI)71.2%74.1%Grok 4.20
MortgageTax (Vals AI)Not measured45.4%Only Grok 4.20 measured
MedQA (Vals AI)Not measured94.5%Only Grok 4.20 measured
MedCode (Vals AI)41.6%32.2%GLM 5.1
SimpleQA Verified34.0%Not measuredOnly GLM 5.1 measured
LMArena Text: science1478Not measuredOnly GLM 5.1 measured
LMArena Text: medicine and healthcare1474Not measuredOnly GLM 5.1 measured
LMArena Text: legal and government1465Not measuredOnly GLM 5.1 measured
LMArena Text: business and finance1452Not measuredOnly GLM 5.1 measured
Neither model has a result on the other 4 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index71
Web design benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
Design Arena: websites12901229GLM 5.1
Design Arena: UI components12921199GLM 5.1
Design Arena: game dev12651192GLM 5.1
Design Arena: data viz13661217GLM 5.1
Design Arena: 3D13361193GLM 5.1
Design Arena: all code categories12681221GLM 5.1
Design Arena: SVG12181164GLM 5.1
Design Arena: ASCII art11421174Grok 4.20
Neither model has a result on the other 1 board here
GeneralLike-for-likePublic boards, shown as published, kept out of the index21
General benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
Public Benefits Bench (Vals AI)61.8%Not measuredOnly GLM 5.1 measured
SAGE (Vals AI)Not measured38.2%Only Grok 4.20 measured
MedScribe (Vals AI)72.3%63.4%GLM 5.1
Vals Multimodal IndexNot measured39.1%Only Grok 4.20 measured
IFBench76.3%81.2%Grok 4.20
Long context reasoning (AA-LCR)73.7%69.0%GLM 5.1
DTBenchNot measured90.1%Only Grok 4.20 measured
LMCANot measured38.7%Only Grok 4.20 measured
CL-benchNot measured22.2%Only Grok 4.20 measured
ExploitBench18.1%Not measuredOnly GLM 5.1 measured
CL-bench LifeNot measured11.9%Only Grok 4.20 measured
LMArena Text1463Not measuredOnly GLM 5.1 measured
LMArena Text: instruction following1453Not measuredOnly GLM 5.1 measured
LMArena Text: creative writing1453Not measuredOnly GLM 5.1 measured
LMArena Text: English1476Not measuredOnly GLM 5.1 measured
LMArena Text: non-English1448Not measuredOnly GLM 5.1 measured
LMArena Text: Chinese1515Not measuredOnly GLM 5.1 measured
LMArena Text: German1467Not measuredOnly GLM 5.1 measured
LMArena Text: Japanese1435Not measuredOnly GLM 5.1 measured
LMArena Text: Korean1424Not measuredOnly GLM 5.1 measured
LMArena Text: French1470Not measuredOnly GLM 5.1 measured
LMArena Text: Spanish1468Not measuredOnly GLM 5.1 measured
LMArena Text: Russian1454Not measuredOnly GLM 5.1 measured
LMArena Text: Polish1449Not measuredOnly GLM 5.1 measured
LMArena Text: multi-turn1473Not measuredOnly GLM 5.1 measured
LMArena Text: longer queries1467Not measuredOnly GLM 5.1 measured
LMArena Text: writing and language1454Not measuredOnly GLM 5.1 measured
LMArena Text: entertainment and media1442Not measuredOnly GLM 5.1 measured
Neither model has a result on the other 18 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for GLM 5.1 and Grok 4.20
BenchmarkGLM 5.1Grok 4.20Leader
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

GLM 5.1$0.0036Fits in one request
Grok 4.20$0.0025Fits in one request

Grok 4.20 costs less

Repository review

50K input + 3K output tokens

GLM 5.1$0.083Fits in one request
Grok 4.20$0.070Fits in one request

Grok 4.20 costs less

Agent loop

200K input + 10K output tokens

GLM 5.1$0.324Exceeds the context window
Grok 4.20$0.275Fits in one request

Grok 4.20 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 GLM 5.1 and Grok 4.20
SpecificationZ.ai GLM 5.1SpaceXAI Grok 4.20
MakerZ.aixAI
WeightsOpen weightsNo public weights listed
ReleasedApril 7, 2026March 31, 2026
Context window205K2M
Input $/Mtok$1.40$1.25
Output $/Mtok$4.40$2.50
Coding index49.233.3
Independent measurements behind it32
Cost per solved task$0.60$0.72
SourceOpenRouter listingOpenRouter listing

Questions

Is GLM 5.1 better than Grok 4.20 for coding?

Pick GLM 5.1 for coding: it scores 49.2 on the Vibe Coding Index against 33.3 for Grok 4.20. Pick Grok 4.20 for output tokens 1.8x cheaper ($2.50 vs $4.40 per million) and a larger context window (2M against 205K tokens).

Which is cheaper, GLM 5.1 or Grok 4.20?

GLM 5.1 costs $1.40 per million input tokens and $4.40 per million output tokens; Grok 4.20 costs $1.25 and $2.50. Per solved SWE-bench Verified task, GLM 5.1 costs $0.60 and Grok 4.20 $0.72.

Which has the bigger context window, GLM 5.1 or Grok 4.20?

Grok 4.20, with 2M tokens against 205K.

How many benchmarks is the GLM 5.1 vs Grok 4.20 comparison based on?

40 benchmarks have a result for both models as of October 21, 2026. GLM 5.1's coding index rests on 3 independent benchmarks and Grok 4.20'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/glm-5-1-vs-grok-4-20" title="GLM 5.1 vs Grok 4.20, 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/glm-5-1-vs-grok-4-20">LLMBenchmark.ai, GLM 5.1 vs Grok 4.20</a></p>