Price Per TokenPrice Per Token
Google
Google
vs
Xai
Xai

Gemma 3 4B vs Grok 4

A detailed comparison of pricing, benchmarks, and capabilities

OpenClaw

Deploy OpenClaw in Under 1 Minute We handle hosting, scaling, and maintenance

107 out of our 300 tracked models have had a price change in March.

Get our weekly newsletter on pricing changes, new releases, and tools.

Key Takeaways

Gemma 3 4B wins:

  • Cheaper input tokens
  • Cheaper output tokens

Grok 4 wins:

  • Larger context window
  • Faster response time
  • Higher intelligence benchmark
  • Better at coding
  • Better at math
Price Advantage
Gemma 3 4B
Benchmark Advantage
Grok 4
Context Window
Grok 4
Speed
Grok 4

Pricing Comparison

Price Comparison

MetricGemma 3 4BGrok 4Winner
Input (per 1M tokens)$0.04$3.00 Gemma 3 4B
Output (per 1M tokens)$0.08$15.00 Gemma 3 4B
Cache Read (per 1M)N/A$0.75 Grok 4
Using a 3:1 input/output ratio, Gemma 3 4B is 99% cheaper overall.

Gemma 3 4B Providers

Amazon Bedrock $0.04 (Cheapest)
DeepInfra $0.04 (Cheapest)
Fireworks $0.20

Grok 4 Providers

Vercel $3.00 (Cheapest)
xAI $3.00 (Cheapest)

Benchmark Comparison

8
Benchmarks Compared
0
Gemma 3 4B Wins
7
Grok 4 Wins

Benchmark Scores

BenchmarkGemma 3 4BGrok 4Winner
Intelligence Index
Overall intelligence score
6.341.5
Coding Index
Code generation & understanding
2.940.5
Math Index
Mathematical reasoning
12.792.7
MMLU Pro
Academic knowledge
41.786.6
GPQA
Graduate-level science
29.187.7
LiveCodeBench
Competitive programming
11.281.9
Aider
Real-world code editing
-79.6-
AIME
Competition math
6.394.3
Grok 4 significantly outperforms in coding benchmarks.

Cost vs Quality

X-axis:
Y-axis:
Loading chart...
Gemma 3 4B
Other models

Context & Performance

Context Window

Gemma 3 4B
131,072
tokens
Grok 4
256,000
tokens
Grok 4 has a 49% larger context window.

Speed Performance

MetricGemma 3 4BGrok 4Winner
Tokens/second35.2 tok/s43.6 tok/s
Time to First Token1.00s9.88s
Grok 4 responds 24% faster on average.

Capabilities

Feature Comparison

FeatureGemma 3 4BGrok 4
Vision (Image Input)
Tool/Function Calls
Reasoning Mode
Audio Input
Audio Output
PDF Input
Prompt Caching
Web Search

License & Release

PropertyGemma 3 4BGrok 4
LicenseOpen SourceProprietary
AuthorGoogleXai
ReleasedMar 2025Jul 2025

Gemma 3 4B Modalities

Input
textimage
Output
text

Grok 4 Modalities

Input
imagetext
Output
text

Related Comparisons

Compare Gemma 3 4B with:

Compare Grok 4 with:

Frequently Asked Questions

Gemma 3 4B has cheaper input pricing at $0.04/M tokens. Gemma 3 4B has cheaper output pricing at $0.08/M tokens.
Grok 4 scores higher on coding benchmarks with a score of 40.5, compared to Gemma 3 4B's score of 2.9.
Gemma 3 4B has a 131,072 token context window, while Grok 4 has a 256,000 token context window.
Gemma 3 4B supports vision. Grok 4 supports vision.
Advertise with us