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.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.
Coding
Vibe Coding Index, six public coding benchmarks
GLM 4.7
GLM 4.7 scores 55.1 against 33.3.
2 benchmarks behind each score
Intelligence
AA Intelligence Index
Grok 4.20
Grok 4.20 leads, 25.7 against 22.2.
Same board, both measured
Reasoning
GPQA Diamond
Grok 4.20
Grok 4.20 leads, 88.6% against 80.0%.
Same board, both measured
Math
AIME
Grok 4.20
Grok 4.20 leads, 96.5% against 93.3%.
Same board, both measured
Knowledge
MMLU Pro
Grok 4.20
Grok 4.20 leads, 86.3% against 82.7%.
Same board, both measured
Web design
Design Arena: websites
Grok 4.20
Grok 4.20 leads, 1229 against 1226.
Same board, both measured
Long documents
Listed context window
Grok 4.20
Grok 4.20 takes 2M tokens against 205K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
GLM 4.7
GLM 4.7 $0.0017, Grok 4.20 $0.0025 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
GLM 4.7
GLM 4.7 $0.29, Grok 4.20 $0.72.
Published attempt cost and pass rate
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.
| Category | GLM 4.7 | Bars | Grok 4.20 | Ties |
|---|---|---|---|---|
| Coding | 0 | 4 | ||
| Intelligence | 0 | 2 | ||
| Agentic work | 3 | 3 | ||
| Reasoning | 0 | 3 | ||
| Math | 0 | 1 | ||
| Knowledge | 3 | 4 | ||
| Web design | 0 | 7 | 1 tie | |
| General | 2 | 3 | ||
| All shared boards | 8 | 27 | 1 tie |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index04
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| LMArena WebDev | 1435 | Not measured | Only GLM 4.7 measured |
| AA Coding Index | 45.3 | Not measured | Only 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 measured | 4.1% | Only Grok 4.20 measured |
| Code migration (Vals AI) | Not measured | 0.3% | Only Grok 4.20 measured |
| Terminal-Bench 2.1 (Vals AI) | Not measured | 44.2% | Only Grok 4.20 measured |
| LiveCodeBench (Artificial Analysis run) | 89.4% | Not measured | Only GLM 4.7 measured |
| Terminal-Bench Hard (Artificial Analysis run) | 31.8% | 37.9% | Grok 4.20 |
| Terminal-Bench | 33.4% | 57.3% | Grok 4.20 |
| WeirdML | Not measured | 52.3% | Only Grok 4.20 measured |
| ALE-Bench | 399.5 | Not measured | Only GLM 4.7 measured |
| LMArena Text: coding | 1454 | Not measured | Only GLM 4.7 measured |
| LMArena Text: software and IT | 1453 | Not measured | Only GLM 4.7 measured |
| LMArena WebDev: React | 1420 | Not measured | Only GLM 4.7 measured |
| LMArena WebDev: HTML | 1447 | Not measured | Only 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
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| AA Intelligence Index | 22.2 | 25.7 | Grok 4.20 |
| Epoch Capabilities Index | 143.6 | 152.1 | Grok 4.20 |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index33
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| Design Arena: agents building web apps | Not measured | 1144 | Only Grok 4.20 measured |
| Design Arena: agents building full-stack apps | 1050 | 1054 | Grok 4.20 |
| Design Arena: agents building mobile apps | 1105 | 1090 | GLM 4.7 |
| Design Arena: agents building Android apps | 1112 | 1052 | GLM 4.7 |
| Design Arena: agents building Godot games | 1058 | 1089 | Grok 4.20 |
| Design Arena: HTML slides | Not measured | 1180 | Only Grok 4.20 measured |
| Finance Agent (Vals AI) | Not measured | 28.5% | Only Grok 4.20 measured |
| Tax Agent Bench (Vals AI) | Not measured | 7.0% | Only Grok 4.20 measured |
| Legal Research Bench (Vals AI) | Not measured | 13.9% | Only Grok 4.20 measured |
| Excel Modeling Benchmark (Vals AI) | Not measured | 11.7% | Only Grok 4.20 measured |
| τ²-Bench Telecom | 95.9% | 93.0% | GLM 4.7 |
| Vending-Bench 2 | $2,377 | $4,663 | Grok 4.20 |
| BrowseComp-Plus | 64.7% | Not measured | Only 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
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| GPQA Diamond | 80.0% | 88.6% | Grok 4.20 |
| MMMU Pro (Vals AI) | Not measured | 83.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 measured | Only GLM 4.7 measured |
| ARC-AGI | Not measured | 89.5% | Only Grok 4.20 measured |
| ARC-AGI-2 | Not measured | 65.1% | Only Grok 4.20 measured |
| SimpleBench | 47.7% | Not measured | Only GLM 4.7 measured |
| Chess puzzles | 21.0% | Not measured | Only GLM 4.7 measured |
| LMArena Text: hard prompts | 1443 | Not measured | Only GLM 4.7 measured |
| LMArena Text: expert | 1424 | Not measured | Only GLM 4.7 measured |
| LMArena Text: hard prompts in English | 1452 | Not measured | Only GLM 4.7 measured |
| Kagi LLM Benchmark | Not measured | 75.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
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| AIME | 93.3% | 96.5% | Grok 4.20 |
| MGSM (Vals AI) | 88.2% | Not measured | Only GLM 4.7 measured |
| AA Math Index | 95.0 | Not measured | Only GLM 4.7 measured |
| AIME 2025 (Artificial Analysis run) | 95.0% | Not measured | Only GLM 4.7 measured |
| OTIS Mock AIME | 83.3% | Not measured | Only GLM 4.7 measured |
| ProofBench | 6.0% | Not measured | Only GLM 4.7 measured |
| LMArena Text: math | 1424 | Not measured | Only GLM 4.7 measured |
| LMArena Text: mathematical work | 1411 | Not measured | Only 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
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| MMLU Pro | 82.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 measured | 45.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 measured | Only GLM 4.7 measured |
| SimpleQA Verified | 32.2% | Not measured | Only GLM 4.7 measured |
| LMArena Text: science | 1457 | Not measured | Only GLM 4.7 measured |
| LMArena Text: medicine and healthcare | 1469 | Not measured | Only GLM 4.7 measured |
| LMArena Text: legal and government | 1444 | Not measured | Only GLM 4.7 measured |
| LMArena Text: business and finance | 1429 | Not measured | Only 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
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| Design Arena: websites | 1226 | 1229 | Grok 4.20 |
| Design Arena: UI components | 1199 | 1199 | Tie |
| Design Arena: game dev | 1189 | 1192 | Grok 4.20 |
| Design Arena: data viz | 1195 | 1217 | Grok 4.20 |
| Design Arena: 3D | 1191 | 1193 | Grok 4.20 |
| Design Arena: all code categories | 1217 | 1221 | Grok 4.20 |
| Design Arena: SVG | 1143 | 1164 | Grok 4.20 |
| Design Arena: ASCII art | 1165 | 1174 | Grok 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
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| SAGE (Vals AI) | Not measured | 38.2% | Only Grok 4.20 measured |
| MedScribe (Vals AI) | 68.6% | 63.4% | GLM 4.7 |
| Vals Multimodal Index | Not measured | 39.1% | Only Grok 4.20 measured |
| IFBench | 67.9% | 81.2% | Grok 4.20 |
| Long context reasoning (AA-LCR) | 71.0% | 69.0% | GLM 4.7 |
| DTBench | Not measured | 90.1% | Only Grok 4.20 measured |
| LMCA | Not measured | 38.7% | Only Grok 4.20 measured |
| CL-bench | 15.9% | 22.2% | Grok 4.20 |
| CL-bench Life | 10.9% | 11.9% | Grok 4.20 |
| LMArena Text | 1435 | Not measured | Only GLM 4.7 measured |
| LMArena Text: instruction following | 1412 | Not measured | Only GLM 4.7 measured |
| LMArena Text: creative writing | 1401 | Not measured | Only GLM 4.7 measured |
| LMArena Text: English | 1453 | Not measured | Only GLM 4.7 measured |
| LMArena Text: non-English | 1417 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Chinese | 1495 | Not measured | Only GLM 4.7 measured |
| LMArena Text: German | 1426 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Japanese | 1439 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Korean | 1399 | Not measured | Only GLM 4.7 measured |
| LMArena Text: French | 1432 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Spanish | 1434 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Russian | 1423 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Polish | 1435 | Not measured | Only GLM 4.7 measured |
| LMArena Text: multi-turn | 1446 | Not measured | Only GLM 4.7 measured |
| LMArena Text: longer queries | 1432 | Not measured | Only GLM 4.7 measured |
| LMArena Text: writing and language | 1411 | Not measured | Only GLM 4.7 measured |
| LMArena Text: entertainment and media | 1400 | Not measured | Only 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
| Benchmark | GLM 4.7 | Grok 4.20 | Leader |
|---|---|---|---|
| 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 costs less
Repository review
50K input + 3K output tokens
GLM 4.7 costs less
Agent loop
200K input + 10K output tokens
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.
| Specification | Z.ai GLM 4.7 | SpaceXAI Grok 4.20 |
|---|---|---|
| Maker | Z.ai | xAI |
| Weights | Open weights | No public weights listed |
| Released | December 22, 2025 | March 31, 2026 |
| Context window | 205K | 2M |
| Input $/Mtok | $0.60 | $1.25 |
| Output $/Mtok | $2.20 | $2.50 |
| Coding index | 55.1 | 33.3 |
| Independent measurements behind it | 2 | 2 |
| Cost per solved task | $0.29 | $0.72 |
| Source | OpenRouter listing | OpenRouter 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.