head-to-head

Anthropic: Claude Sonnet 5 vs OpenAI: GPT-5.4

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

Anthropic: Claude Sonnet 5 OpenAI: GPT-5.4
Vendoranthropicopenai
Quality Score100100
Benchmark Score-90.4
Input Price$2.00/M$2.50/M
Output Price$10.00/M$15.00/M
Context Window1,000,0001,050,000
Max Output128,000128,000
Tool Calling
Structured Output
Reasoning Mode
Vision
Audio--
Benchmark Scores
ai_index-84.8
ai_index_agentic-67.8
ai_index_coding-100.0
eqbench-82.4

Who wins by task?

TaskAnthropic: Claude Sonnet 5OpenAI: GPT-5.4
SQL Generation 132 174
Code Review 132 175
Code Completion 117 120
Code Refactoring 136 174
Bug Fixing 136 188
Unit Test Generation 124 159
Code Documentation 129 146
Regex Writing 117 136
CI/CD Pipelines 120 149
Frontend Component Design 122 149
Data Analysis 124 173
CSV / Spreadsheet Cleanup 132 157
ETL Scripting 128 161
JSON Extraction 121 137
Bulk Data Labeling 118 122
OCR / Document Parsing 131 149
Table Extraction from PDFs 131 149
Long-Document Summarization 136 168
Short-Form Summarization 113 122
Blog Post Writing 120 144

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