head-to-head
Anthropic: Claude Sonnet 5 vs OpenAI: GPT-5.4 Mini
Side-by-side comparison of specs, pricing, benchmark scores, and task rankings. Updated 2026-07-01.
| Anthropic: Claude Sonnet 5 | OpenAI: GPT-5.4 Mini | |
|---|---|---|
| Vendor | anthropic | openai |
| Quality Score | 100 | 100 |
| Benchmark Score | - | 71.2 |
| Input Price | $2.00/M | $0.75/M |
| Output Price | $10.00/M | $4.50/M |
| Context Window | 1,000,000 | 400,000 |
| Max Output | 128,000 | 128,000 |
| Tool Calling | ✓ | ✓ |
| Structured Output | ✓ | ✓ |
| Reasoning Mode | ✓ | ✓ |
| Vision | ✓ | ✓ |
| Audio | - | - |
| Benchmark Scores | ||
| ai_index | - | 66.0 |
| ai_index_agentic | - | 49.8 |
| ai_index_coding | - | 92.5 |
Who wins by task?
| Task | Anthropic: Claude Sonnet 5 | OpenAI: GPT-5.4 Mini |
|---|---|---|
| SQL Generation | 132 | 164 |
| Code Review | 132 | 159 |
| Code Completion | 117 | 132 |
| Code Refactoring | 136 | 158 |
| Bug Fixing | 136 | 170 |
| Unit Test Generation | 124 | 148 |
| Code Documentation | 129 | 140 |
| Regex Writing | 117 | 132 |
| CI/CD Pipelines | 120 | 139 |
| Frontend Component Design | 122 | 141 |
| Data Analysis | 124 | 160 |
| CSV / Spreadsheet Cleanup | 132 | 151 |
| ETL Scripting | 128 | 149 |
| JSON Extraction | 121 | 146 |
| Bulk Data Labeling | 118 | 133 |
| OCR / Document Parsing | 131 | 144 |
| Table Extraction from PDFs | 131 | 144 |
| Long-Document Summarization | 136 | 154 |
| Short-Form Summarization | 113 | 129 |
| Blog Post Writing | 120 | 136 |
Scores reflect capability match + benchmark data + pricing for each task. Methodology →
Related comparisons
Anthropic: Claude Sonnet 5 vs MoonshotAI: Kimi K2.7 Code
Anthropic: Claude Sonnet 5 vs Qwen: Qwen3.7 Plus
Anthropic: Claude Sonnet 5 vs MiniMax: MiniMax M3
Anthropic: Claude Sonnet 5 vs StepFun: Step 3.7 Flash
Anthropic: Claude Sonnet 5 vs xAI: Grok Build 0.1
Anthropic: Claude Sonnet 5 vs Google: Gemini 3.5 Flash
Anthropic: Claude Sonnet 5 vs Google: Gemini 3.1 Flash Lite
Anthropic: Claude Sonnet 5 vs xAI: Grok 4.3