Model Comparison

Gemma 4 31B vs Grok 4.5Which is better in 2026?

Grok 4.5 significantly outperforms across most benchmarks. Gemma 4 31B is 15.6x cheaper per token.

Verdict: Gemma 4 31B vs Grok 4.5 — which is better?

Gemma 4 31B (by Google) and Grok 4.5 (by xAI) are two of the AI models people compare most. Here is how they stack up on benchmarks, price and capabilities, and which one to pick in 2026.

Gemma 4 31B outperforms in 0 benchmarks, while Grok 4.5 is better at 2 benchmarks (GDPval-AA, GPQA). Grok 4.5 significantly outperforms across most benchmarks.

On price, Gemma 4 31B is roughly 15.6x cheaper per token on a blended 3:1 input/output basis, which adds up quickly at production volume.

Grok 4.5 also accepts a larger context window (500,000 input tokens), making it the stronger choice for long documents and large codebases.

Choose Gemma 4 31B if…

  • cost matters — it's about 15.6x cheaper per token
  • you need open weights you can self-host or fine-tune

Choose Grok 4.5 if…

  • you want the strongest raw capability — it leads on 2 of 2 shared benchmarks
  • you process long inputs — it offers a 500,000 token context window
  • you want the most recent training data — it shipped Jul 2026

Performance Benchmarks

Comparative analysis across standard metrics

2 benchmarks

Gemma 4 31B outperforms in 0 benchmarks, while Grok 4.5 is better at 2 benchmarks (GDPval-AA, GPQA).

Grok 4.5 significantly outperforms across most benchmarks.

Fri Jul 17 2026 • llm-stats.com

Arena Performance

Human preference votes

Pricing Analysis

Price comparison per million tokens

Gemma 4 31B costs less

For input processing, Gemma 4 31B ($0.13/1M tokens) is 15.4x cheaper than Grok 4.5 ($2.00/1M tokens).

For output processing, Gemma 4 31B ($0.38/1M tokens) is 15.8x cheaper than Grok 4.5 ($6.00/1M tokens).

In conclusion, Grok 4.5 is more expensive than Gemma 4 31B.*

* Using a 3:1 ratio of input to output tokens

Lowest available price from all providers
Fri Jul 17 2026 • llm-stats.com
Google
Gemma 4 31B
Input tokens$0.13
Output tokens$0.38
Best providerDeepinfra
xAI
Grok 4.5
Input tokens$2.00
Output tokens$6.00
Best providerxAI
Notice missing or incorrect data?Start an Issue

Context Window

Maximum input and output token capacity

Grok 4.5 accepts 500,000 input tokens compared to Gemma 4 31B's 262,144 tokens. Only Gemma 4 31B specifies output context (131,072 tokens).

Google
Gemma 4 31B
Input262,144 tokens
Output131,072 tokens
xAI
Grok 4.5
Input500,000 tokens
Output- tokens
Fri Jul 17 2026 • llm-stats.com

Input Capabilities

Supported data types and modalities

Both Gemma 4 31B and Grok 4.5 support multimodal inputs.

They are both capable of processing various types of data, offering versatility in application.

Gemma 4 31B

Text
Images
Audio
Video

Grok 4.5

Text
Images
Audio
Video

License

Usage and distribution terms

Gemma 4 31B is licensed under Apache 2.0, while Grok 4.5 uses a proprietary license.

License differences may affect how you can use these models in commercial or open-source projects.

Gemma 4 31B

Apache 2.0

Open weights

Grok 4.5

Proprietary

Closed source

Release Timeline

When each model was launched

Gemma 4 31B was released on 2026-04-02, while Grok 4.5 was released on 2026-07-08.

Grok 4.5 is 3 months newer than Gemma 4 31B.

Gemma 4 31B

Apr 2, 2026

3 months ago

Grok 4.5

Jul 8, 2026

1 weeks ago

3mo newer

Knowledge Cutoff

When training data ends

Gemma 4 31B has a documented knowledge cutoff of 2025-01-01, while Grok 4.5's cutoff date is not specified.

We can confirm Gemma 4 31B's training data extends to 2025-01-01, but cannot make a direct comparison without Grok 4.5's cutoff date.

Gemma 4 31B

Jan 2025

Grok 4.5

Provider Availability

Gemma 4 31B is available from DeepInfra, FriendliAI, Novita, Together. Grok 4.5 is available from xAI.

Gemma 4 31B

deepinfra logo
Deepinfra
Input Price:Input: $0.13/1MOutput Price:Output: $0.38/1M
friendli logo
FriendliAI
Input Price:Input: $0.14/1MOutput Price:Output: $0.40/1M
novita logo
Novita
Input Price:Input: $0.14/1MOutput Price:Output: $0.40/1M
together logo
Together
Input Price:Input: $0.39/1MOutput Price:Output: $0.97/1M

Grok 4.5

xai logo
xAI
Input Price:Input: $2.00/1MOutput Price:Output: $6.00/1M
* Prices shown are per million tokens

Outputs Comparison

Notice missing or incorrect data?Start an Issue discussion

Key Takeaways

Less expensive input tokens
Less expensive output tokens
Has open weights
Larger context window (500,000 tokens)
Higher GDPval-AA score (51.4% vs 26.1%)
Higher GPQA score (93.0% vs 84.3%)

Detailed Comparison

Interactive Arena

Judge for yourself.

Run your own prompts against Gemma 4 31B and Grok 4.5 side-by-side, then vote on the output you prefer.

Gemma 4 31B
✓ Preferred
Grok 4.5
Open in Playground
AI Model Comparison Table
Feature
Google
Gemma 4 31B
xAI
Grok 4.5

FAQ

Common questions about Gemma 4 31B vs Grok 4.5.

Which is better, Gemma 4 31B or Grok 4.5?

Grok 4.5 significantly outperforms across most benchmarks. Gemma 4 31B is made by Google and Grok 4.5 is made by xAI. The best choice depends on your use case — compare their benchmark scores, pricing, and capabilities above.

How does Gemma 4 31B compare to Grok 4.5 in benchmarks?

Gemma 4 31B scores AIME 2026: 89.2%, MMMLU: 88.4%, t2-bench: 86.4%, MathVision: 85.6%, MMLU-Pro: 85.2%. Grok 4.5 scores GPQA: 93.0%, Terminal-Bench 2.1: 83.3%, Artificial Analysis Coding Agent Index v1.1: 76.0%, SWE-Bench Pro: 64.7%, AA-Omniscience Index: 63.0%.

Is Gemma 4 31B cheaper than Grok 4.5?

Gemma 4 31B is 15.4x cheaper for input tokens. Gemma 4 31B costs $0.13/M input and $0.38/M output via deepinfra. Grok 4.5 costs $2.00/M input and $6.00/M output via xai.

What are the context window sizes for Gemma 4 31B and Grok 4.5?

Gemma 4 31B supports 262K tokens and Grok 4.5 supports 500K tokens. A larger context window lets you process longer documents, conversations, or codebases in a single request.

What are the main differences between Gemma 4 31B and Grok 4.5?

Key differences include context window (262K vs 500K), input pricing ($0.13 vs $2.00/M), licensing (Apache 2.0 vs Proprietary). See the full comparison above for benchmark-by-benchmark results.

Who makes Gemma 4 31B and Grok 4.5?

Gemma 4 31B is developed by Google and Grok 4.5 is developed by xAI.