head-to-head

Google: Gemma 4 31B (free) vs SpaceXAI: Grok 4.20

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

Google: Gemma 4 31B (free) SpaceXAI: Grok 4.20
Vendorgooglex-ai
Quality Score100100
Benchmark Score53.750.6
Input PriceFree$1.25/M
Output PriceFree$2.50/M
Context Window262,1442,000,000
Max Output32,7681,800,000
Tool Calling
Structured Output
Reasoning Mode
Vision
Audio--
Benchmark Scores
ai_index31.342.3
eqbench70.855.8

Who wins by task?

TaskGoogle: Gemma 4 31B (free)SpaceXAI: Grok 4.20
SQL Generation 140 142
Code Review 140 146
Code Completion 132 121
Code Refactoring 141 150
Bug Fixing 144 150
Unit Test Generation 130 133
Code Documentation 135 139
Regex Writing 126 125
CI/CD Pipelines 126 129
Frontend Component Design 128 129
Data Analysis 132 133
CSV / Spreadsheet Cleanup 134 138
ETL Scripting 133 139
JSON Extraction 132 123
Bulk Data Labeling 130 120
OCR / Document Parsing 131 134
Table Extraction from PDFs 131 134
Long-Document Summarization 143 151
Short-Form Summarization 127 118
Blog Post Writing 128 130

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

Related comparisons

Anthropic: Claude Haiku Latest vs Google: Gemma 4 31B (free) Anthropic: Claude Haiku Latest vs SpaceXAI: Grok 4.20 Anthropic: Claude Sonnet 5 vs Google: Gemma 4 31B (free) Anthropic: Claude Sonnet 5 vs SpaceXAI: Grok 4.20 Anthropic: Claude Sonnet Latest vs Google: Gemma 4 31B (free) Anthropic: Claude Sonnet Latest vs SpaceXAI: Grok 4.20 Google: Gemini 3.1 Flash Lite vs Google: Gemma 4 31B (free) Google: Gemini 3.1 Flash Lite vs SpaceXAI: Grok 4.20

The Model Movers Report

One email every Friday, built from this site's own rankings: the current top five by benchmark score, every model released in the last seven days, and one note worked out from that week's numbers. You can unsubscribe from any issue with one click.