Skip to content

Gemma 4 31B (free) vs GPT-5.2-Codex

vs
GPT-5.2-Codex

OpenAI

91#24
Signal-by-Signal Comparison
SignalGemma 4 31B (free)DeltaGPT-5.2-Codex
Capabilities
83
-17
100
Benchmarks
86
-3
89
Pricing
100
+14
86
Context window size
86
-3
89
Recency
100
+5
95
Output Capacity
75
-10
85
Overall Result
2 wins
of 6
4 wins
GPT-5.2-Codex wins 4 of 6 signals

Score History

Score History (25 data points)
Gemma 4 31B (free)GPT-5.2-Codex
Gemma 4 31B (free)

80.5

current score

Leader

GPT-5.2-Codex

right now

GPT-5.2-Codex

90.5

current score

LMMarketCap.com
Interactive Price Comparison
100Kcalls/month
1,000tokens (~1,333 chars)
500tokens (~667 chars)

Gemma 4 31B (free)

Google

Best Value
Per request$0.000000
Daily$0.00
Monthly$0.00
Annual$0.00

GPT-5.2-Codex

OpenAI

Per request$0.008750
Daily$29.17
Monthly$875.00
Annual$10500.00

Gemma 4 31B (free) saves you $875.00/month

That's $10500.00/year compared to GPT-5.2-Codex at your current usage level of 100K calls/month.

100% cheaper
Choose Gemma 4 31B (free) for cost optimization

Gemma 4 31B (free) pricing:
Input:$0.00/M tokens
Output:$0.00/M tokens
GPT-5.2-Codex pricing:
Input:$1.75/M tokens
Output:$14.00/M tokens
Gemma 4 31B (free)

Google

81

Composite Score

Winner
GPT-5.2-Codex

OpenAI

91

Composite Score

Signal-by-Signal Comparison
MetricGemma 4 31B (free)GPT-5.2-CodexWinner
Overall Score
81
91
GPT-5.2-Codex
Rank#84#24
GPT-5.2-Codex
Quality Rank#84#24
GPT-5.2-Codex
Adoption Rank#84#24
GPT-5.2-Codex
Parameters31B----
Context Window262K400K
GPT-5.2-Codex
PricingFree$1.75/$14.00/M--
Signal Scores
Capabilities
83
100
GPT-5.2-Codex
Benchmarks
86
89
GPT-5.2-Codex
Pricing
100
86
Gemma 4 31B (free)
Context window size
86
89
GPT-5.2-Codex
Recency
100
95
Gemma 4 31B (free)
Output Capacity
75
85
GPT-5.2-Codex
Benchmark Head-to-Head(12 benchmarks)
Gemma 4: 1GPT-5.2-Codex: 5
Gemma 4
GPT-5.2-Codex
Normalized 0-100%
MMLU
-93.5%
MMLU-Pro
85.2%86%
GPQA Diamond
84.3%87%
MATH-500
-94%
HumanEval
-97%
SWE-bench Verified
-78%
AIME 2024
89.2%-
IFEval
-93%
BBH
74.4%91.5%
Arena Elo
14511481
LiveBench
80%77.5%
HLE
19.5%37%
Benchmark Interpretation

Our score (0-100) is driven by benchmark performance (90%) from Arena Elo ratings, MMLU, GPQA, HumanEval, SWE-bench, and 15+ standardized evaluations. Capabilities and context window serve as tiebreakers (10%). Learn more about our methodology.

Gemma 4 31B (free)Strong Performer

Scores 81/100 (rank #84), placing it in the top 71% of all 290 models tracked.

Raw Quality0/100
Cost Efficiency0/100
Speed0/100
GPT-5.2-CodexElite Tier

Scores 91/100 (rank #24), placing it in the top 92% of all 290 models tracked.

Raw Quality0/100
Cost Efficiency0/100
Speed0/100

GPT-5.2-Codex has a 10-point advantage, which typically translates to noticeably better performance on complex reasoning, code generation, and multi-step tasks.

When to Use Each Model

Choose Gemma 4 31B (free) when you need:

  • High-volume production workloads where API costs must be minimized
  • Step-by-step reasoning and chain-of-thought problem solving
  • Self-hosted deployments where you need full control over the model

Choose GPT-5.2-Codex when you need:

  • Processing long documents or large codebases (400K token context)
  • Step-by-step reasoning and chain-of-thought problem solving
Cost-Performance Analysis
Gemma 4 31B (free)
Input cost$0.00/M tokens
Output cost$0.00/M tokens
Cost per quality point$0.000
Est. monthly (1M tokens/day)$0.00
GPT-5.2-Codex
Input cost$1.75/M tokens
Output cost$14.00/M tokens
Cost per quality point$0.174
Est. monthly (1M tokens/day)$236.25

Compare the cost per quality point to find the best value for your specific workload.

Latency & Speed
Gemma 4 31B (free)Faster
Speed score0/100
GPT-5.2-Codex
Speed score0/100

Both models have comparable response speeds. For most applications, the latency difference is negligible.

When latency matters most: Interactive chatbots, IDE code completion, real-time translation, and user-facing applications where response time directly impacts experience. For batch processing, background summarization, or offline analysis, latency is less critical.

Example Use Cases

Code generation & review

Based on overall model capabilities and architecture for coding tasks like generating functions, debugging, and refactoring

Gemma 4 31B (free)

Customer support chatbot

Suitable for user-facing chat with competitive response times. Gemma 4 31B (free) also offers lower per-token costs for high-volume support

Gemma 4 31B (free)

Long document analysis

Larger context window (400K tokens) can process longer documents, contracts, and research papers in a single pass

GPT-5.2-Codex

Batch data extraction

Lower output pricing ($0.00/M) reduces costs when processing thousands of records daily

Gemma 4 31B (free)

Creative writing & content

Higher overall composite score (91/100) correlates with better nuance, coherence, and style in long-form content

GPT-5.2-Codex

Image understanding & OCR

Supports vision input - can analyze screenshots, diagrams, photos, and scanned documents directly

Gemma 4 31B (free)
Which Should You Choose?
Our recommendation:
GPT-5.2-Codex

GPT-5.2-Codex has a moderate advantage with a 10-point lead in composite score. It wins on more signal dimensions, but Gemma 4 31B (free) has specific strengths that could make it the better choice for certain workflows.

by Google

  • Choose for Quality - Marginally better benchmark scores; both are excellent
  • Choose for Cost - 100% lower pricing; better value at scale
  • Choose for Reliability - Higher uptime and faster response speeds
  • Choose for Prototyping - Stronger community support and better developer experience
  • Choose for Production - Wider enterprise adoption and proven at scale
GPT-5.2-Codex
Recommended

by OpenAI

Consider for specialized use cases.

Capability Comparison
CapabilityGemma 4 31B (free)GPT-5.2-Codex
Vision (Image Input)
Function Calling
Streaming
JSON Mode
Reasoning
Web Searchdiffers
Image Output
Monthly Cost Calculator
1,000tokens (600 in / 400 out)
100requests/day (3,000/month)

Gemma 4 31B (free)

Google

Best Value
$0.000000
estimated monthly cost

GPT-5.2-Codex

OpenAI

$19.95
estimated monthly cost

Gemma 4 31B (free) saves you $19.95/month

That's 100% cheaper than GPT-5.2-Codex at 1,000 tokens/request and 100 requests/day.

Assumes 60% input / 40% output token ratio per request. Actual costs may vary based on your usage pattern.

Parameters & Context
ParameterGemma 4 31B (free)GPT-5.2-Codex
Context Window262K400K
Max Output Tokens32,768128,000
Open SourceYesNo
CreatedApr 2, 2026Jan 14, 2026
Last updated: 29m ago

Related comparisons

Gemma 4 31B (free) vs GPT-5.2-Codex (2026) | LM Market Cap