head-to-head

Google: Gemma 4 31B (free) vs OpenAI: GPT-5.4 Nano

Side-by-side comparison of specs, pricing, benchmark scores, and task rankings. Updated 2026-06-20.

Google: Gemma 4 31B (free) OpenAI: GPT-5.4 Nano
Vendorgoogleopenai
Quality Score100100
Benchmark Score-68.0
Input PriceFree$0.20/M
Output PriceFree$1.25/M
Context Window262,144400,000
Max Output8,192128,000
Tool Calling
Structured Output
Reasoning Mode
Vision
Audio--
Benchmark Scores
ai_index-63.1
ai_index_agentic-45.4
ai_index_coding-92.5

Who wins by task?

TaskGoogle: Gemma 4 31B (free)OpenAI: GPT-5.4 Nano
SQL Generation 131 163
Code Review 126 158
Code Completion 129 133
Code Refactoring 127 157
Bug Fixing 130 168
Unit Test Generation 121 148
Code Documentation 126 140
Regex Writing 120 132
CI/CD Pipelines 117 139
Frontend Component Design 122 141
Data Analysis 124 159
CSV / Spreadsheet Cleanup 128 151
ETL Scripting 122 148
JSON Extraction 132 146
Bulk Data Labeling 130 134
OCR / Document Parsing 128 144
Table Extraction from PDFs 128 144
Long-Document Summarization 129 154
Short-Form Summarization 124 130
Blog Post Writing 119 135

Scores reflect capability match + benchmark data + pricing for each task. Methodology →

Related comparisons

MoonshotAI: Kimi K2.7 Code vs Google: Gemma 4 31B (free) MoonshotAI: Kimi K2.7 Code vs OpenAI: GPT-5.4 Nano Qwen: Qwen3.7 Plus vs Google: Gemma 4 31B (free) Qwen: Qwen3.7 Plus vs OpenAI: GPT-5.4 Nano MiniMax: MiniMax M3 vs Google: Gemma 4 31B (free) MiniMax: MiniMax M3 vs OpenAI: GPT-5.4 Nano StepFun: Step 3.7 Flash vs Google: Gemma 4 31B (free) StepFun: Step 3.7 Flash vs OpenAI: GPT-5.4 Nano