head-to-head

xAI: Grok Latest vs Google: Gemma 4 31B (free)

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

xAI: Grok Latest Google: Gemma 4 31B (free)
Vendor~x-aigoogle
Quality Score100100
Benchmark Score10.953.7
Input Price$2.00/MFree
Output Price$6.00/MFree
Context Window500,000262,144
Max Output450,00032,768
Tool Calling✓✓
Structured Output✓✓
Reasoning Mode✓✓
Vision✓✓
Audio--
Benchmark Scores
ai_index12.448.4
ai_index_agentic-23.8
ai_index_coding-71.7
eqbench-57.5

The verdict

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

Grok Latest reads up to 500,000 tokens at once, roughly 750 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 Gemma 4 31B (free) leads 53.7 to 10.9.

Across the 20 tasks where they differ, Gemma 4 31B (free) on 20 (SQL Generation, Code Review, Code Completion and others).

Grok Latest was released in July 2026 and Gemma 4 31B (free) in April 2026.

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

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?

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

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 Opus 5 (batch) vs xAI: Grok Latest Anthropic: Claude Sonnet 5 vs Google: Gemma 4 31B (free) Anthropic: Claude Sonnet Latest vs Google: Gemma 4 31B (free) ByteDance Seed: Seed-2.0-Code vs xAI: Grok Latest ByteDance Seed: Seed 2.1 Turbo vs xAI: Grok Latest DeepSeek: DeepSeek V4 Flash Vision Exp vs xAI: Grok Latest Google: Gemini 3.1 Flash Lite vs Google: Gemma 4 31B (free)

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.