Side-by-side comparison of pricing, 12 benchmarks, and generation speed.
| Metric | GPT-5 nano (medium) | Gemma 4 31B (Non-reasoning) |
|---|---|---|
| Input ($/M tokens) | $0.05 | $0.14 |
| Output ($/M tokens) | $0.4 | $0.4 |
Data from Artificial Analysis API — 12 benchmarks
GPT-5 nano (medium) is cheaper overall. Its blended price (3:1 input/output ratio) is $0.14/M tokens vs $0.20/M for Gemma 4 31B (Non-reasoning).
It's a tie — both models win 5 benchmarks each across 12 evaluated categories. See the detailed benchmark chart above for per-category results.
GPT-5 nano (medium) generates tokens faster at 158 tok/s vs 55 tok/s. However, Gemma 4 31B (Non-reasoning) has lower time-to-first-token (0.77s vs 54.57s).
Choose based on your priorities: GPT-5 nano (medium) for lower cost, both perform similarly on benchmarks, and GPT-5 nano (medium) for faster generation. For latency-sensitive apps, check the TTFT comparison above.