head-to-head
Anthropic: Claude Sonnet Latest vs Google: Gemma 4 31B (free)
Side-by-side comparison of specs, pricing, benchmark scores, and task rankings. Updated 2026-09-23.
| Anthropic: Claude Sonnet Latest | Google: Gemma 4 31B (free) | |
|---|---|---|
| Vendor | ~anthropic | |
| Quality Score | 100 | 100 |
| Benchmark Score | - | 53.7 |
| Input Price | $2.00/M | Free |
| Output Price | $10.00/M | Free |
| Context Window | 1,000,000 | 262,144 |
| Max Output | 128,000 | 32,768 |
| Tool Calling | ✓ | ✓ |
| Structured Output | ✓ | ✓ |
| Reasoning Mode | ✓ | ✓ |
| Vision | ✓ | ✓ |
| Audio | - | - |
| Benchmark Scores | ||
| ai_index | - | 31.3 |
| eqbench | - | 70.8 |
Who wins by task?
| Task | Anthropic: Claude Sonnet Latest | Google: Gemma 4 31B (free) |
|---|---|---|
| SQL Generation | 132 | 140 |
| Code Review | 132 | 140 |
| Code Completion | 117 | 132 |
| Code Refactoring | 136 | 141 |
| Bug Fixing | 136 | 144 |
| Unit Test Generation | 124 | 130 |
| Code Documentation | 129 | 135 |
| Regex Writing | 117 | 126 |
| CI/CD Pipelines | 120 | 126 |
| Frontend Component Design | 122 | 128 |
| Data Analysis | 124 | 132 |
| CSV / Spreadsheet Cleanup | 132 | 134 |
| ETL Scripting | 128 | 133 |
| JSON Extraction | 121 | 132 |
| Bulk Data Labeling | 118 | 130 |
| OCR / Document Parsing | 131 | 131 |
| Table Extraction from PDFs | 131 | 131 |
| Long-Document Summarization | 136 | 143 |
| Short-Form Summarization | 113 | 127 |
| Blog Post Writing | 120 | 128 |
Scores reflect capability match + benchmark data + pricing for each task. Methodology →
Related comparisons
Anthropic: Claude Haiku Latest vs Anthropic: Claude Sonnet Latest
Anthropic: Claude Haiku Latest vs Google: Gemma 4 31B (free)
Anthropic: Claude Sonnet 5 vs Anthropic: Claude Sonnet Latest
Anthropic: Claude Sonnet 5 vs Google: Gemma 4 31B (free)
Anthropic: Claude Sonnet Latest vs Anthropic: Claude Sonnet 4.6
Anthropic: Claude Sonnet Latest vs ByteDance Seed: Seed-2.0-Lite
Anthropic: Claude Sonnet Latest vs ByteDance Seed: Seed-2.0-Mini
Anthropic: Claude Sonnet Latest vs Google: Gemini 3.1 Flash Lite Preview