Gemma 2 27B vs Gemma 4 31B
Pick up to 3 models · pricing, context and capabilities · simulate your product cost
Data updated on November 14, 2026· 230 models
Gemma 2 27B by Google is an open model built from the same research and technology used to create the Gemini models.
- Reasoning estimated
- Speed estimated
- Input
- Output
- Context
- 8 K tokens
- Max output
- 2 K
- Input, $ per 1M tokens
- $0.650
- Output, $ per 1M tokens
- $0.650
- Cache read, $ per 1M
- —
- Batch (input / output)
- —
- Tool calling
- No
- Released
- 07/13/2024
- Knowledge cutoff
- —
- API id
- google/gemma-2-27b-it
Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output.
- Reasoning estimated
- ▲
- Speed estimated
- Input
- Output
- Context
- ▲262 K tokens
- Max output
- ▲16 K
- Input, $ per 1M tokens
- ▲$0.200
- Output, $ per 1M tokens
- ▲$0.400
- Cache read, $ per 1M
- —
- Batch (input / output)
- —
- Tool calling
- Yes
- Released
- ▲04/02/2026
- Knowledge cutoff
- 2025-01
- API id
- google/gemma-4-31b-it
Which is the better API choice: Gemma 2 27B vs Gemma 4 31B?
- Gemma 4 31B: cheapest input (69% less than Gemma 2 27B)
- Gemma 4 31B: cheapest output
- Gemma 4 31B: largest context (262 K)
- Gemma 4 31B: the newest (04/02/2026)
- Gemma 4 31B: most reasoning (estimated)
Gemma 4 31B costs 69% less on input and 38% less on output than Gemma 2 27B ($0.200 / $0.400 versus $0.650 / $0.650 per million tokens). Gemma 4 31B accepts more context (262 K). On capabilities, Gemma 4 31B accepts images; Gemma 4 31B has a reasoning mode.
What would your product cost?
Estimate the monthly cost with your app's real volume. List prices, no cache or batch discounts.
With Gemma 4 31B you save $7.75 a month versus Gemma 2 27B (63% less).
The 6 cheapest for this scenario (chat, last 12 months)
- 1Lyria 3 Pro Preview Google$0.00
- 2Lyria 3 Clip Preview Google$0.00
- 3Qwen3.7 Flash Qwen$0.97
- 4DeepSeek V4.1 Flash DeepSeek$1.57
- 5DeepSeek V4 Flash 0731 DeepSeek$1.85
- 6Ministral 3 3B 2512 Mistral$1.90
Paste your prompt: tokens and cost per model
Rough estimate (about 4 characters per token). Nothing is sent to any server.
Cost of sending it 1,000 times (input only)
- 1Claude Haiku 5.5 Anthropic$0.008
- 2Gemma 4 31B Google$0.015
- 3Gemma 2 27B Google$0.049
- 4Claude Sonnet 5.5 Anthropic$0.152
- 5Claude Opus 5.5 Anthropic$0.304
- 6Claude Opus 5 Anthropic$0.380
- 7Claude Fable 5.2 Anthropic$0.608
- 8Claude Fable 5.1 Anthropic$0.760
Popular comparisons
- Claude Fable 5.2 vs GPT-6.1 Terra
- Claude Fable 5.2 vs Gemini 4 Hydrogen
- Claude Fable 5.2 vs DeepSeek V4.1 Flash 1017
- Claude Fable 5.2 vs Grok 4.7
- GPT-6.1 Terra vs Gemini 4 Hydrogen
- GPT-6.1 Terra vs DeepSeek V4.1 Flash 1017
- GPT-6.1 Terra vs Grok 4.7
- Gemini 4 Hydrogen vs DeepSeek V4.1 Flash 1017
- Gemini 4 Hydrogen vs Grok 4.7
- DeepSeek V4.1 Flash 1017 vs Grok 4.7
More free tools
See allFrequently asked questions
Which is the better API choice: Gemma 2 27B vs Gemma 4 31B?
Gemma 4 31B costs 69% less on input and 38% less on output than Gemma 2 27B ($0.200 / $0.400 versus $0.650 / $0.650 per million tokens). Gemma 4 31B accepts more context (262 K). On capabilities, Gemma 4 31B accepts images; Gemma 4 31B has a reasoning mode.
Which is cheaper: Gemma 2 27B and Gemma 4 31B?
Gemma 4 31B is cheaper: $0.200 per million input tokens and $0.400 per million output tokens, versus $0.650 / $0.650 for Gemma 2 27B.
Which has more context: Gemma 2 27B and Gemma 4 31B?
Gemma 4 31B accepts 262 K tokens of context; Gemma 2 27B accepts 8 K.
Which is newer: Gemma 2 27B and Gemma 4 31B?
Gemma 4 31B was released on 04/02/2026; Gemma 2 27B on 07/13/2024.
What would 10,000 requests a month cost with Gemma 2 27B and Gemma 4 31B?
With 1,500 input and 400 output tokens per request: Gemma 2 27B: $12.35; Gemma 4 31B: $4.60 a month, at list price.
Where do the prices come from and how often are they updated?
From the public catalogs of OpenRouter, models.dev and LiteLLM, which publish each provider's list prices. They sync once a day and the last update date is shown above the comparison.
What does price per million tokens mean?
It is what the provider charges per million tokens you send (input) or the model generates (output). A token is roughly 4 characters. Output almost always costs more than input.
Sources: OpenRouter, models.dev and LiteLLM. Prices in USD per million tokens, list price, no volume discounts. Prompt tokens are an estimate; each provider's tokenizer may differ.