Enter opens the highlighted result. Esc closes.

Claude Sonnet 5 vs GLM 5.2

GLM 5.2 leads Claude Sonnet 5 on coding, 61.1 to 57.7 on the Vibe Coding Index, and GLM 5.2 costs 2.3x less per output token ($4.40 vs $10.00 per million). Updated October 22, 2026; 90 benchmarks have a result for both.

Claude Sonnet 5Anthropic
Coding
57.7
Overall
63.2
Output $/M
$10.00
44
GLM 5.2Z.ai
Coding
61.1
Overall
62.5
Output $/M
$4.40
45
vs boards won of 90 shared, 1 tied

Claude Sonnet 5 or GLM 5.2: which to pick

Pick GLM 5.2 for coding: it scores 61.1 on the Vibe Coding Index against 57.7 for Claude Sonnet 5, though on 4 benchmarks against 6.

Pick Claude Sonnet 5 for work measured by AA Coding Index or LiveCodeBench (Vals AI), where it leads.

Shared results
90
Claude Sonnet 5 only
31
GLM 5.2 only
8
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
Claude Sonnet 5 57.7 from 6 benchmarks, GLM 5.2 61.1 from 4 benchmarks.
Widest category
Math, 10.1 points apart on average over 6 shared benchmarks.
Widest single gap
ProofBench: Claude Sonnet 5 77.0% against GLM 5.2 35.0%, 42.0 points apart on a 0 to 100 scale.
Output price
Claude Sonnet 5 $10.00 against GLM 5.2 $4.40 per million output tokens, 2.3x apart.
Context window
Claude Sonnet 5 takes 1M tokens, GLM 5.2 1.05M.

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
CategoryClaude Sonnet 5BarsGLM 5.2Ties
Coding98
Intelligence20
Agentic work141
Reasoning73
Math321 tie
Knowledge46
Web design26
General319
All shared boards44451 tie
CodingLike-for-likeSix of these boards feed the Vibe Coding Index98
Coding benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
LiveBench coding74.7%Not measuredOnly Claude Sonnet 5 measured
LMArena WebDev15401604GLM 5.2
AA Coding Index71.568.8Claude Sonnet 5
LiveCodeBench (Vals AI)82.4%69.5%Claude Sonnet 5
SWE-bench Verified (Vals AI)79.6%82.8%GLM 5.2
Terminal-Bench 4 (Vals AI)10.6%Not measuredOnly Claude Sonnet 5 measured
Vibe Code Bench (Vals AI)81.3%64.0%Claude Sonnet 5
Code migration (Vals AI)44.4%37.9%Claude Sonnet 5
ProgramBench (Vals AI)0.0%0.5%GLM 5.2
IOI (Vals AI)45.0%Not measuredOnly Claude Sonnet 5 measured
Terminal-Bench 2.1 (Vals AI)74.5%67.8%Claude Sonnet 5
Vibe Code Bench 1-100 (Vals AI)13.8%Not measuredOnly Claude Sonnet 5 measured
SkillsBench (Vals AI)46.5%45.1%Claude Sonnet 5
CyberBench (Vals AI)70.3%Not measuredOnly Claude Sonnet 5 measured
SciCode54.3%51.2%Claude Sonnet 5
Terminal-Bench Hard (Artificial Analysis run)Not measured50.8%Only GLM 5.2 measured
FrontierCode42.7%24.5%Claude Sonnet 5
GSO-Bench37.3%Not measuredOnly Claude Sonnet 5 measured
WeirdML68.8%70.1%GLM 5.2
ALE-Bench1463.11047.0Claude Sonnet 5
LMArena Text: coding14831487GLM 5.2
LMArena Text: software and IT14741486GLM 5.2
LMArena WebDev: React15411617GLM 5.2
LMArena WebDev: HTML15271565GLM 5.2
LMArena WebDev: from an image1540Not measuredOnly Claude Sonnet 5 measured
SciCode10.7%Not measuredOnly Claude Sonnet 5 measured
Neither model has a result on the other 13 boards here
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index20
Intelligence benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
AA Intelligence Index38.233.7Claude Sonnet 5
Epoch Capabilities Index156.9151.9Claude Sonnet 5
Agentic workLike-for-likePublic boards, shown as published, kept out of the index141
Agentic work benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
AA Agentic Index43.638.4Claude Sonnet 5
Design Arena: agents building web apps12451222Claude Sonnet 5
Design Arena: agents building full-stack apps12491241Claude Sonnet 5
Design Arena: agents building mobile apps12151159Claude Sonnet 5
Design Arena: agents building Android apps12271178Claude Sonnet 5
Design Arena: agents building Godot games12251142Claude Sonnet 5
Design Arena: agents building games12271206Claude Sonnet 5
Design Arena: HTML slides11681125Claude Sonnet 5
Design Arena: PowerPoint slides11911170Claude Sonnet 5
Design Arena: spreadsheets1035Not measuredOnly Claude Sonnet 5 measured
LiveBench research82.8%Not measuredOnly Claude Sonnet 5 measured
LiveBench browser72.0%Not measuredOnly Claude Sonnet 5 measured
LiveBench long agentic39.0%Not measuredOnly Claude Sonnet 5 measured
SREBench (Vals AI)0.4%0.0%Claude Sonnet 5
Finance Agent (Vals AI)53.9%49.7%Claude Sonnet 5
Tax Agent Bench (Vals AI)29.4%Not measuredOnly Claude Sonnet 5 measured
Legal Research Bench (Vals AI)41.8%31.3%Claude Sonnet 5
Excel Modeling Benchmark (Vals AI)66.3%61.5%Claude Sonnet 5
Terminal-Bench-Science (Vals AI)5.7%Not measuredOnly Claude Sonnet 5 measured
τ²-Bench TelecomNot measured99.1%Only GLM 5.2 measured
APEX-Agents54.5%45.2%Claude Sonnet 5
PostTrainBenchNot measured31.7%Only GLM 5.2 measured
Vending-Bench 2$6,378$8,314GLM 5.2
Neither model has a result on the other 18 boards here
ReasoningLike-for-likePublic boards, shown as published, kept out of the index73
Reasoning benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
GPQA Diamond88.9%85.6%Claude Sonnet 5
LiveBench reasoning88.7%Not measuredOnly Claude Sonnet 5 measured
MMMU Pro (Vals AI)83.0%Not measuredOnly Claude Sonnet 5 measured
GPQA Diamond (Artificial Analysis run)91.1%89.5%Claude Sonnet 5
Humanity's Last Exam (Artificial Analysis run)41.3%41.1%Claude Sonnet 5
GPQA Diamond (Epoch AI run)90.5%91.9%GLM 5.2
ARC-AGINot measured77.0%Only GLM 5.2 measured
ARC-AGI-2Not measured22.8%Only GLM 5.2 measured
SimpleBench60.6%58.8%Claude Sonnet 5
Chess puzzles45.0%22.0%Claude Sonnet 5
Mystery game puzzles35.0%19.0%Claude Sonnet 5
EBR-benchNot measured9.5%Only GLM 5.2 measured
LMArena Text: hard prompts14611481GLM 5.2
LMArena Text: expert14891487Claude Sonnet 5
LMArena Text: hard prompts in English14641481GLM 5.2
LMArena Vision: diagrams1293Not measuredOnly Claude Sonnet 5 measured
LMArena Vision: homework1311Not measuredOnly Claude Sonnet 5 measured
Kagi LLM BenchmarkNot measured62.6%Only GLM 5.2 measured
Neither model has a result on the other 4 boards here
MathLike-for-likePublic boards, shown as published, kept out of the index32
Math benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
OTIS Mock AIME94.7%86.4%Claude Sonnet 5
FrontierMath, tiers 1 to 365.6%59.2%Claude Sonnet 5
FrontierMath, tier 429.3%29.3%Tie
ProofBench77.0%35.0%Claude Sonnet 5
LMArena Text: math14671483GLM 5.2
LMArena Text: mathematical work14811489GLM 5.2
Neither model has a result on the other 7 boards here
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index46
Knowledge benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
MMLU Pro87.5%86.7%Claude Sonnet 5
LegalBench (Vals AI)83.9%84.1%GLM 5.2
CorpFin (Vals AI)67.0%66.1%Claude Sonnet 5
TaxEval (Vals AI)75.6%73.3%Claude Sonnet 5
MortgageTax (Vals AI)70.0%Not measuredOnly Claude Sonnet 5 measured
MedCode (Vals AI)47.5%40.8%Claude Sonnet 5
SimpleQA Verified33.7%34.2%GLM 5.2
LMArena Text: science14601489GLM 5.2
LMArena Text: medicine and healthcare14421475GLM 5.2
LMArena Text: legal and government14541486GLM 5.2
LMArena Text: business and finance14361451GLM 5.2
Neither model has a result on the other 7 boards here
Web designLike-for-likePublic boards, shown as published, kept out of the index26
Web design benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
Design Arena: websites12741285GLM 5.2
Design Arena: UI components12771294GLM 5.2
Design Arena: game dev12771268Claude Sonnet 5
Design Arena: data viz12511285GLM 5.2
Design Arena: 3D12611287GLM 5.2
Design Arena: all code categories12751287GLM 5.2
Design Arena: SVG11921213GLM 5.2
Design Arena: ASCII art12071191Claude Sonnet 5
LiveBench design82.0%Not measuredOnly Claude Sonnet 5 measured
GeneralLike-for-likePublic boards, shown as published, kept out of the index319
General benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 5.2Leader
LiveBench data analysis71.7%Not measuredOnly Claude Sonnet 5 measured
Public Benefits Bench (Vals AI)66.0%Not measuredOnly Claude Sonnet 5 measured
SAGE (Vals AI)48.9%Not measuredOnly Claude Sonnet 5 measured
MedScribe (Vals AI)76.0%83.5%GLM 5.2
Vals Multimodal Index68.8%Not measuredOnly Claude Sonnet 5 measured
IFBenchNot measured73.3%Only GLM 5.2 measured
Long context reasoning (AA-LCR)82.0%78.3%Claude Sonnet 5
DTBench92.5%93.6%GLM 5.2
LMCA50.0%45.8%Claude Sonnet 5
Surface Evolver Bench60.0%55.6%Claude Sonnet 5
LMArena Text14421470GLM 5.2
LMArena Text: instruction following14521466GLM 5.2
LMArena Text: creative writing14161463GLM 5.2
LMArena Vision1273Not measuredOnly Claude Sonnet 5 measured
LMArena Text: English14501475GLM 5.2
LMArena Text: non-English14311459GLM 5.2
LMArena Text: Chinese14781522GLM 5.2
LMArena Text: German14421470GLM 5.2
LMArena Text: Japanese14221450GLM 5.2
LMArena Text: Korean14121440GLM 5.2
LMArena Text: French14631479GLM 5.2
LMArena Text: Spanish14381478GLM 5.2
LMArena Text: Russian14501468GLM 5.2
LMArena Text: Polish14251456GLM 5.2
LMArena Text: multi-turn14531469GLM 5.2
LMArena Text: longer queries14621480GLM 5.2
LMArena Text: writing and language14361463GLM 5.2
LMArena Text: entertainment and media14111450GLM 5.2
LMArena Vision: English1275Not measuredOnly Claude Sonnet 5 measured
LMArena Vision: Chinese1331Not measuredOnly Claude Sonnet 5 measured
LMArena Vision: reading text1288Not measuredOnly Claude Sonnet 5 measured
LMArena Vision: humor1261Not measuredOnly Claude Sonnet 5 measured
LMArena Vision: creative writing1246Not measuredOnly Claude Sonnet 5 measured
LMArena Document1466Not measuredOnly Claude Sonnet 5 measured
Neither model has a result on the other 12 boards here
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
Image generation benchmarks for Claude Sonnet 5 and GLM 5.2
BenchmarkClaude Sonnet 5GLM 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

Claude Sonnet 5$0.0070Fits in one request
GLM 5.2$0.0036Fits in one request

GLM 5.2 costs less

Repository review

50K input + 3K output tokens

Claude Sonnet 5$0.130Fits in one request
GLM 5.2$0.083Fits in one request

GLM 5.2 costs less

Agent loop

200K input + 10K output tokens

Claude Sonnet 5$0.500Fits 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 Claude Sonnet 5 and GLM 5.2
SpecificationAnthropic Claude Sonnet 5Z.ai GLM 5.2
MakerAnthropicZ.ai
WeightsNo public weights listedOpen weights
ReleasedJune 30, 2026June 16, 2026
Context window1M1.05M
Input $/Mtok$2.00$1.40
Output $/Mtok$10.00$4.40
Coding index57.761.1
Independent measurements behind it64
Cost per solved task$1.87$0.86
SourceOpenRouter listingOpenRouter listing

Questions

Is Claude Sonnet 5 better than GLM 5.2 for coding?

Pick GLM 5.2 for coding: it scores 61.1 on the Vibe Coding Index against 57.7 for Claude Sonnet 5, though on 4 benchmarks against 6. Pick Claude Sonnet 5 for work measured by AA Coding Index or LiveCodeBench (Vals AI), where it leads.

Which is cheaper, Claude Sonnet 5 or GLM 5.2?

Claude Sonnet 5 costs $2.00 per million input tokens and $10.00 per million output tokens; GLM 5.2 costs $1.40 and $4.40. Per solved SWE-bench Verified task, Claude Sonnet 5 costs $1.87 and GLM 5.2 $0.86.

Which has the bigger context window, Claude Sonnet 5 or GLM 5.2?

GLM 5.2, with 1.05M tokens against 1M.

How many benchmarks is the Claude Sonnet 5 vs GLM 5.2 comparison based on?

90 benchmarks have a result for both models as of October 22, 2026. Claude Sonnet 5's coding index rests on 6 independent benchmarks and GLM 5.2's on 4. 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/claude-sonnet-5-vs-glm-5-2" title="Claude Sonnet 5 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/claude-sonnet-5-vs-glm-5-2">LLMBenchmark.ai, Claude Sonnet 5 vs GLM 5.2</a></p>