All guides

[ Comparison ] · 7 min read

Gemma 4 vs DeepSeek V4: The Cheapest Model That Works

After DeepSeek's August increase, Gemma 4 26B A4B is cheaper than DeepSeek at DeepSeek's own best hour. It is not better at everything, and the tasks where it loses are predictable.

Key takeaways

  • Gemma 4 26B A4B costs $0.070 input and $0.300 output, undercutting DeepSeek V4-Flash's off-peak floor by 3.1x on input and 2.2x on output, and beating its peak rate by 6.3x and 4.4x.
  • It is a 25.2B parameter MoE with only 3.8B active per token, Apache 2.0 licensed, with a 262K context window and native function calling.
  • DeepSeek V4-Flash is the stronger reasoner, scoring 52 on the Artificial Analysis Intelligence Index at max effort. Gemma wins on cost per unit of routine work, not on hard reasoning.
  • Self-hosting breaks even around 4.7M tokens a month if you already own the GPU. Against budget hosted endpoints in the $0.07 to $0.50 range, self-hosting almost never wins on cost alone.

DeepSeek's August price increase changed which model sits at the bottom of the cost table. V4-Flash used to be the default answer for cheap inference at acceptable quality. It is now the third or fourth answer, and the model that displaced it came out of Google DeepMind in April.

The price gap

ModelInputOutput
Gemma 4 26B A4B$0.070$0.300
Gemma 4 31B$0.080$0.340
DeepSeek V4-Flash off-peak$0.22$0.66
DeepSeek V4-Flash peak$0.44$1.32
Per million tokens. DeepSeek peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC.

Against DeepSeek's cheapest hour, Gemma 4 26B A4B is 3.1x cheaper on input and 2.2x cheaper on output. Against its peak hours the gap widens to 6.3x and 4.4x. The comparison holds without any scheduling work, which is the second saving: there is no peak window to route around, so nothing in your pipeline needs to know what time it is.

What Gemma 4 actually is

Google DeepMind released four open-weight models on 2 April 2026 under Apache 2.0. The two that matter here are a dense 31B and a 26B mixture-of-experts. The MoE variant carries 25.2B total parameters with roughly 3.8B active per token, which is why it serves so cheaply, along with a 262K context window, native function calling, and multimodal input.

On published benchmarks it posts 85.2% on MMLU Pro, 89.2% on AIME 2026, 80.0% on LiveCodeBench, and 84.3% on GPQA. The 31B dense variant sits at 1452 Elo, third on Arena's open-source text leaderboard, behind only closed frontier models. For a model in this price band those are unusual numbers, and they are the reason the comparison is worth making at all.

Where DeepSeek still wins

This is not a clean sweep, and pretending otherwise would waste your time. DeepSeek V4-Flash at max reasoning effort scores 52 on the Artificial Analysis Intelligence Index, which places it among the leading open-weight models and ahead of several considerably more expensive options. It also runs fast, at 117.1 output tokens per second.

The practical division we have settled on after moving workloads across:

  • Gemma 4 for bounded, high-volume work: classification, entity extraction, routing, structured output against a fixed schema, short summarisation. The output shape is constrained, correctness is easy to verify, and the quality difference does not appear.
  • DeepSeek V4-Flash for multi-step reasoning where the model has to hold a chain of inference together, and for tasks where a wrong answer is expensive to detect downstream.
  • Neither for long-context retrieval over very large corpora, where the 262K and comparable windows stop being enough and the cost calculation changes entirely.
  • Neither without load-testing on your own prompts first. Benchmark scores do not predict behaviour on your specific extraction schema, and every migration we have run has surfaced at least one prompt that behaved differently.

The verbosity caveat that applies to Gemma too

Cheap per token does not settle the question, and Gemma is not exempt from this. Artificial Analysis measured Gemma 4 26B A4B in reasoning mode consuming 74M output tokens to run its Intelligence Index, against a median of roughly 43M for open-weight models of similar size. It is somewhat verbose for its class. The full suite still cost only $59.52 to run, which is the cheapest figure on that board, but the verbosity is real and it eats into the headline price advantage.

The fix is free. Turn reasoning off for tasks that do not need it, set a sensible max_tokens, and ask for the format you actually want rather than prose. On classification work that alone typically removes most of the gap between a model's list price and its effective price. We go through the measurement method in cost per token is the wrong metric.

Should you self-host it?

Apache 2.0 weights make self-hosting legally straightforward, which is why the question comes up on every project. The arithmetic is less encouraging than the licence suggests.

Published break-even analysis puts Gemma 4 self-hosting at roughly 4.7M tokens per month if you already own the GPU. If you do not, add around six months of depreciation before the comparison means anything. Self-hosted inference lands near $0.42 per million tokens on consumer hardware once compute and infrastructure are counted.

Now compare that to the hosted rate. Gemma 4 26B A4B on an API costs $0.070 / $0.300. Self-hosting at $0.42 per million is more expensive than simply buying the tokens. The general finding holds across the category: against a frontier API, self-hosting breaks even quickly, but against a budget open-weight endpoint in the $0.07 to $0.50 range it almost never wins on cost alone.

That does not make self-hosting pointless. Data residency, air-gapped environments, guaranteed capacity, and freedom from provider price changes are all real reasons, and after the last six weeks of pricing volatility the last one has more weight than it used to. Cost savings is simply not among them at this size of model.

The migration worth doing

Take your highest-volume automation, the one with the most calls and the most constrained output, and move only that. It is almost certainly classification or extraction, it is almost certainly running on a model with more capability than it needs, and it will show the saving within a billing cycle without putting anything fragile at risk.

Then measure before extending it further. The reason to move one workload rather than all of them is that the second and third migrations have worse ratios of saving to risk, and the fourth is usually a mistake. If you want that sequenced against your actual traffic, our AI and automation team runs the audit, and why agents cost 30x a chatbot covers the case where the workload is agentic and the arithmetic changes.

Frequently asked questions

Is Gemma 4 cheaper than DeepSeek V4?

Yes. Gemma 4 26B A4B costs $0.070 input and $0.300 output per million tokens, against DeepSeek V4-Flash at $0.22 / $0.66 off-peak and $0.44 / $1.32 at peak. That is 3.1x cheaper on input off-peak and 6.3x cheaper at peak.

Is Gemma 4 as good as DeepSeek V4?

Not at hard reasoning. DeepSeek V4-Flash scores 52 on the Artificial Analysis Intelligence Index at max effort. Gemma 4 is competitive on bounded tasks such as classification, extraction, routing and structured output, where the quality difference generally does not appear in practice.

Is it cheaper to self-host Gemma 4 than use an API?

Usually not. Self-hosted inference costs around $0.42 per million tokens once compute and infrastructure are counted, while the hosted API is $0.070 / $0.300. Break-even is about 4.7M tokens a month and only if you already own the GPU. Self-host for data residency or capacity guarantees, not for cost.

What licence is Gemma 4 released under?

Apache 2.0. Google DeepMind released four open-weight variants on 2 April 2026, including a dense 31B and a 26B mixture-of-experts with 3.8B active parameters per token.

Want a professional site without the agency invoice?

Tell us about your project below and we'll reply within 24 hours with a clear, fixed quote, no surprises.

Prefer WhatsApp or email?