Enter opens the highlighted result. Esc closes.

GLM 4.7 vs Grok 4.20

GLM 4.7 leads Grok 4.20 on coding, 55.1 to 33.3 on the Vibe Coding Index, at about the same output price ($2.20 vs $2.50 per million). Updated October 21, 2026; 36 benchmarks have a result for both.

GLM 4.7Z.ai
Coding
55.1
Overall
56.9
Output $/M
$2.20
8
Grok 4.20xAI
Coding
33.3
Overall
41.0
Output $/M
$2.50
27
vs boards won of 36 shared, 1 tied

GLM 4.7 or Grok 4.20: which to pick

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

Pick Grok 4.20 for a larger context window (2M against 205K tokens) and work measured by LiveCodeBench (Vals AI) or SWE-bench Verified (Vals AI), where it leads.

Shared results
36
GLM 4.7 only
45
Grok 4.20 only
19
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 4.7 55.1 from 2 benchmarks, Grok 4.20 33.3 from 2 benchmarks.
Widest category
Coding, 8.7 points apart on average over 4 shared benchmarks.
Widest single gap
Terminal-Bench: GLM 4.7 33.4% against Grok 4.20 57.3%, 23.9 points apart on a 0 to 100 scale.
Output price
GLM 4.7 $2.20 against Grok 4.20 $2.50 per million output tokens, 1.1x apart.
Context window
GLM 4.7 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 4.7BarsGrok 4.20Ties
Coding04
Intelligence02
Agentic work33
Reasoning03
Math01
Knowledge34
Web design071 tie
General23
All shared boards8271 tie
CodingLike-for-likeSix of these boards feed the Vibe Coding Index04
Coding benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
LMArena WebDev1435Not measuredOnly GLM 4.7 measured
AA Coding Index45.3Not measuredOnly GLM 4.7 measured
LiveCodeBench (Vals AI)82.2%84.3%Grok 4.20
SWE-bench Verified (Vals AI)69.4%72.2%Grok 4.20
Vibe Code Bench (Vals AI)Not measured4.1%Only Grok 4.20 measured
Code migration (Vals AI)Not measured0.3%Only Grok 4.20 measured
Terminal-Bench 2.1 (Vals AI)Not measured44.2%Only Grok 4.20 measured
LiveCodeBench (Artificial Analysis run)89.4%Not measuredOnly GLM 4.7 measured
Terminal-Bench Hard (Artificial Analysis run)31.8%37.9%Grok 4.20
Terminal-Bench33.4%57.3%Grok 4.20
WeirdMLNot measured52.3%Only Grok 4.20 measured
ALE-Bench399.5Not measuredOnly GLM 4.7 measured
LMArena Text: coding1454Not measuredOnly GLM 4.7 measured
LMArena Text: software and IT1453Not measuredOnly GLM 4.7 measured
LMArena WebDev: React1420Not measuredOnly GLM 4.7 measured
LMArena WebDev: HTML1447Not measuredOnly GLM 4.7 measured
Neither model has a result on the other 23 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
Intelligence benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
AA Intelligence Index22.225.7Grok 4.20
Epoch Capabilities Index143.6152.1Grok 4.20
Agentic workLike-for-likePublic boards, shown as published, kept out of the index33
Agentic work benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
Design Arena: agents building web appsNot measured1144Only Grok 4.20 measured
Design Arena: agents building full-stack apps10501054Grok 4.20
Design Arena: agents building mobile apps11051090GLM 4.7
Design Arena: agents building Android apps11121052GLM 4.7
Design Arena: agents building Godot games10581089Grok 4.20
Design Arena: HTML slidesNot measured1180Only Grok 4.20 measured
Finance Agent (Vals AI)Not measured28.5%Only Grok 4.20 measured
Tax Agent Bench (Vals AI)Not measured7.0%Only Grok 4.20 measured
Legal Research Bench (Vals AI)Not measured13.9%Only Grok 4.20 measured
Excel Modeling Benchmark (Vals AI)Not measured11.7%Only Grok 4.20 measured
τ²-Bench Telecom95.9%93.0%GLM 4.7
Vending-Bench 2$2,377$4,663Grok 4.20
BrowseComp-Plus64.7%Not measuredOnly GLM 4.7 measured
Neither model has a result on the other 28 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index03
Reasoning benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
GPQA Diamond80.0%88.6%Grok 4.20
MMMU Pro (Vals AI)Not measured83.5%Only Grok 4.20 measured
GPQA Diamond (Artificial Analysis run)85.9%91.1%Grok 4.20
Humanity's Last Exam (Artificial Analysis run)27.4%34.5%Grok 4.20
GPQA Diamond (Epoch AI run)83.3%Not measuredOnly GLM 4.7 measured
ARC-AGINot measured89.5%Only Grok 4.20 measured
ARC-AGI-2Not measured65.1%Only Grok 4.20 measured
SimpleBench47.7%Not measuredOnly GLM 4.7 measured
Chess puzzles21.0%Not measuredOnly GLM 4.7 measured
LMArena Text: hard prompts1443Not measuredOnly GLM 4.7 measured
LMArena Text: expert1424Not measuredOnly GLM 4.7 measured
LMArena Text: hard prompts in English1452Not measuredOnly GLM 4.7 measured
Kagi LLM BenchmarkNot measured75.0%Only Grok 4.20 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 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
AIME93.3%96.5%Grok 4.20
MGSM (Vals AI)88.2%Not measuredOnly GLM 4.7 measured
AA Math Index95.0Not measuredOnly GLM 4.7 measured
AIME 2025 (Artificial Analysis run)95.0%Not measuredOnly GLM 4.7 measured
OTIS Mock AIME83.3%Not measuredOnly GLM 4.7 measured
ProofBench6.0%Not measuredOnly GLM 4.7 measured
LMArena Text: math1424Not measuredOnly GLM 4.7 measured
LMArena Text: mathematical work1411Not measuredOnly GLM 4.7 measured
Neither model has a result on the other 5 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index34
Knowledge benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
MMLU Pro82.7%86.3%Grok 4.20
LegalBench (Vals AI)83.4%77.7%GLM 4.7
CaseLaw (Vals AI)54.9%54.4%GLM 4.7
CorpFin (Vals AI)46.4%63.7%Grok 4.20
TaxEval (Vals AI)68.8%74.1%Grok 4.20
MortgageTax (Vals AI)Not measured45.4%Only Grok 4.20 measured
MedQA (Vals AI)93.7%94.5%Grok 4.20
MedCode (Vals AI)32.8%32.2%GLM 4.7
MMLU Pro (Artificial Analysis run)85.6%Not measuredOnly GLM 4.7 measured
SimpleQA Verified32.2%Not measuredOnly GLM 4.7 measured
LMArena Text: science1457Not measuredOnly GLM 4.7 measured
LMArena Text: medicine and healthcare1469Not measuredOnly GLM 4.7 measured
LMArena Text: legal and government1444Not measuredOnly GLM 4.7 measured
LMArena Text: business and finance1429Not measuredOnly GLM 4.7 measured
Neither model has a result on the other 4 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index07
Web design benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
Design Arena: websites12261229Grok 4.20
Design Arena: UI components11991199Tie
Design Arena: game dev11891192Grok 4.20
Design Arena: data viz11951217Grok 4.20
Design Arena: 3D11911193Grok 4.20
Design Arena: all code categories12171221Grok 4.20
Design Arena: SVG11431164Grok 4.20
Design Arena: ASCII art11651174Grok 4.20
Neither model has a result on the other 1 board here
GeneralLike-for-likePublic boards, shown as published, kept out of the index23
General benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 4.20Leader
SAGE (Vals AI)Not measured38.2%Only Grok 4.20 measured
MedScribe (Vals AI)68.6%63.4%GLM 4.7
Vals Multimodal IndexNot measured39.1%Only Grok 4.20 measured
IFBench67.9%81.2%Grok 4.20
Long context reasoning (AA-LCR)71.0%69.0%GLM 4.7
DTBenchNot measured90.1%Only Grok 4.20 measured
LMCANot measured38.7%Only Grok 4.20 measured
CL-bench15.9%22.2%Grok 4.20
CL-bench Life10.9%11.9%Grok 4.20
LMArena Text1435Not measuredOnly GLM 4.7 measured
LMArena Text: instruction following1412Not measuredOnly GLM 4.7 measured
LMArena Text: creative writing1401Not measuredOnly GLM 4.7 measured
LMArena Text: English1453Not measuredOnly GLM 4.7 measured
LMArena Text: non-English1417Not measuredOnly GLM 4.7 measured
LMArena Text: Chinese1495Not measuredOnly GLM 4.7 measured
LMArena Text: German1426Not measuredOnly GLM 4.7 measured
LMArena Text: Japanese1439Not measuredOnly GLM 4.7 measured
LMArena Text: Korean1399Not measuredOnly GLM 4.7 measured
LMArena Text: French1432Not measuredOnly GLM 4.7 measured
LMArena Text: Spanish1434Not measuredOnly GLM 4.7 measured
LMArena Text: Russian1423Not measuredOnly GLM 4.7 measured
LMArena Text: Polish1435Not measuredOnly GLM 4.7 measured
LMArena Text: multi-turn1446Not measuredOnly GLM 4.7 measured
LMArena Text: longer queries1432Not measuredOnly GLM 4.7 measured
LMArena Text: writing and language1411Not measuredOnly GLM 4.7 measured
LMArena Text: entertainment and media1400Not measuredOnly GLM 4.7 measured
Neither model has a result on the other 20 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for GLM 4.7 and Grok 4.20
BenchmarkGLM 4.7Grok 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 4.7$0.0017Fits in one request
Grok 4.20$0.0025Fits in one request

GLM 4.7 costs less

Repository review

50K input + 3K output tokens

GLM 4.7$0.037Fits in one request
Grok 4.20$0.070Fits in one request

GLM 4.7 costs less

Agent loop

200K input + 10K output tokens

GLM 4.7$0.142Exceeds the context window
Grok 4.20$0.275Fits in one request

GLM 4.7 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 4.7 and Grok 4.20
SpecificationZ.ai GLM 4.7SpaceXAI Grok 4.20
MakerZ.aixAI
WeightsOpen weightsNo public weights listed
ReleasedDecember 22, 2025March 31, 2026
Context window205K2M
Input $/Mtok$0.60$1.25
Output $/Mtok$2.20$2.50
Coding index55.133.3
Independent measurements behind it22
Cost per solved task$0.29$0.72
SourceOpenRouter listingOpenRouter listing

Questions

Is GLM 4.7 better than Grok 4.20 for coding?

Pick GLM 4.7 for coding: it scores 55.1 on the Vibe Coding Index against 33.3 for Grok 4.20. Pick Grok 4.20 for a larger context window (2M against 205K tokens) and work measured by LiveCodeBench (Vals AI) or SWE-bench Verified (Vals AI), where it leads.

Which is cheaper, GLM 4.7 or Grok 4.20?

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

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

Grok 4.20, with 2M tokens against 205K.

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

36 benchmarks have a result for both models as of October 21, 2026. GLM 4.7's coding index rests on 2 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-4-7-vs-grok-4-20" title="GLM 4.7 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-4-7-vs-grok-4-20">LLMBenchmark.ai, GLM 4.7 vs Grok 4.20</a></p>