head-to-head

Anthropic Claude Sonnet Latest vs xAI: Grok 4.20

Side-by-side comparison of specs, pricing, benchmark scores, and task rankings. Updated 2026-06-26.

Anthropic Claude Sonnet Latest xAI: Grok 4.20
Vendor~anthropicx-ai
Quality Score100100
Benchmark Score-61.5
Input Price$3.00/M$1.25/M
Output Price$15.00/M$2.50/M
Context Window1,000,0002,000,000
Max Output128,000-
Tool Calling
Structured Output
Reasoning Mode
Vision
Audio--
Benchmark Scores
ai_index-61.0
eqbench-55.8

Who wins by task?

TaskAnthropic Claude Sonnet LatestxAI: Grok 4.20
SQL Generation 132 144
Code Review 132 150
Code Completion 116 122
Code Refactoring 136 153
Bug Fixing 136 154
Unit Test Generation 124 135
Code Documentation 128 141
Regex Writing 116 127
CI/CD Pipelines 120 131
Frontend Component Design 122 131
Data Analysis 124 136
CSV / Spreadsheet Cleanup 132 139
ETL Scripting 128 142
JSON Extraction 120 123
Bulk Data Labeling 116 120
OCR / Document Parsing 131 135
Table Extraction from PDFs 131 135
Long-Document Summarization 136 154
Short-Form Summarization 112 119
Blog Post Writing 120 132

Scores reflect capability match + benchmark data + pricing for each task. Methodology →

Related comparisons

MoonshotAI: Kimi K2.7 Code vs Anthropic Claude Sonnet Latest MoonshotAI: Kimi K2.7 Code vs xAI: Grok 4.20 Qwen: Qwen3.7 Plus vs Anthropic Claude Sonnet Latest Qwen: Qwen3.7 Plus vs xAI: Grok 4.20 MiniMax: MiniMax M3 vs Anthropic Claude Sonnet Latest MiniMax: MiniMax M3 vs xAI: Grok 4.20 StepFun: Step 3.7 Flash vs Anthropic Claude Sonnet Latest StepFun: Step 3.7 Flash vs xAI: Grok 4.20