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-11-07.

Google: Gemma 4 31B (free) SpaceXAI: Grok 4.20
Vendorgooglex-ai
Quality Score100100
Benchmark Score53.756.5
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_index48.461.0
ai_index_agentic23.8-
ai_index_coding71.7-
eqbench57.545.7

The verdict

For a sample job of 1 million input tokens and 250,000 output tokens, Gemma 4 31B (free) costs $0 and Grok 4.20 costs $1.88, so Gemma 4 31B (free) is free for the same work.

Grok 4.20 reads up to 2,000,000 tokens at once, roughly 3,000 pages of text, against about 393 pages for Gemma 4 31B (free).

Only Gemma 4 31B (free) offers video input.

On our blended benchmark score Grok 4.20 leads 56.5 to 53.7.

Across the 20 tasks where they differ, Gemma 4 31B (free) scores higher on 17 (SQL Generation, Code Review, Code Completion and others), Grok 4.20 on 3 (Code Refactoring, Code Documentation, Long-Document Summarization).

Gemma 4 31B (free) was released in April 2026 and Grok 4.20 in March 2026.

Pick Gemma 4 31B (free) if you need lower cost, video input or the stronger all-round task scores; pick Grok 4.20 if you need long documents or benchmark performance.

Costs use current list prices per million tokens; page counts assume about 0.75 words per token and 500 words per page.

Who wins by task?

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

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.