Skip to content

Claude Sonnet 4 vs xAI Grok 4

Both have similar output pricing, while xAI Grok 4 offers a larger context window. Choose Claude Sonnet 4 or xAI Grok 4 based on the trade-off between cost, context, and the benchmarks that matter for your use case.

SpecClaude Sonnet 4xAI Grok 4
ProviderAnthropicHelicone
Input / 1M tokens$3.00$3.00
Output / 1M tokens$15.00$15.00
Context window200K256K
Parameters—3T
Open weightsNoNo
ReleasedMay 2025Jul 2024
Aider Polyglot score61.3—
SWE-bench Verified score76.8—
GPQA Diamond score78.3—
FrontierMath score4.1—
Epoch Capabilities Index score142—
LMArena (Chatbot Arena) Elo score1351—
LMArena Vision Elo score1191—

FAQ

Is Claude Sonnet 4 or xAI Grok 4 cheaper?

Claude Sonnet 4 and xAI Grok 4 have comparable output pricing.

Which has the larger context window, Claude Sonnet 4 or xAI Grok 4?

xAI Grok 4 has the larger context window (256K tokens).

Pricing is indicative — confirm with the provider before production use. Highlighted values indicate the better figure for that row.