Google: Gemma 4 31B vs xAI: Grok 4

Compare Google: Gemma 4 31B by Google AI against xAI: Grok 4 by xAI, context windows of 262K vs 256K, tested across 31 shared challenges. Updated April 2026.

Which is better, Google: Gemma 4 31B or xAI: Grok 4?

Google: Gemma 4 31B and xAI: Grok 4 are both competitive models. Google: Gemma 4 31B costs $0.14/M input tokens vs $3/M for xAI: Grok 4. Context windows: 262K vs 256K tokens. Compare their real outputs side by side below.

Key Differences Between Google: Gemma 4 31B and xAI: Grok 4

Google: Gemma 4 31B is made by google while xAI: Grok 4 is from xai. Google: Gemma 4 31B has a 262K token context window compared to xAI: Grok 4's 256K. On pricing, Google: Gemma 4 31B costs $0.14/M input tokens vs $3/M for xAI: Grok 4.

Our Verdict
Google: Gemma 4 31B
Google: Gemma 4 31B
xAI: Grok 4
xAI: Grok 4Runner-up

No community votes yet. On paper, Google: Gemma 4 31B has the edge — bigger model tier, newer.

Google: Gemma 4 31B is 38x cheaper per token — worth considering if cost matters.

Too close to call
Writing DNA

Style Comparison

Similarity
99%

Google: Gemma 4 31B uses 3.6x more transitions

Google: Gemma 4 31B
xAI: Grok 4
57%Vocabulary53%
18wSentence Length18w
0.37Hedging0.67
7.1Bold2.7
4.0Lists2.7
0.24Emoji0.07
0.94Headings0.86
0.16Transitions0.04
Based on 23 + 21 text responses
vs

Ask them anything yourself

Google: Gemma 4 31BxAI: Grok 4
FAQ