Best for: Coding
Best LLM for Coding
Ranked on SWE-Bench, HumanEval, and dollars-per-1M output tokens. Balanced for autonomous and assistive coding workflows.
Updated May 2026. Top 3 this month: GPT-4o (2024-11-20), Claude Sonnet 4.5, GPT-5 Codex.
Best for: Coding
Ranked on SWE-Bench, HumanEval, and dollars-per-1M output tokens. Balanced for autonomous and assistive coding workflows.
Updated May 2026. Top 3 this month: GPT-4o (2024-11-20), Claude Sonnet 4.5, GPT-5 Codex.
Podium
How we rank
Choosing an LLM for coding comes down to three things: how well it turns specifications into working code, how well it reasons about large repositories, and how much it will cost once you wire it into CI or an agent loop. We weight SWE-Bench heaviest because it best predicts real-world coding-agent success, followed by HumanEval for short-form correctness, and a price pillar so the recommendation survives contact with a finance review.
Our full methodology is published on the methodology page.
Pillars and weights:
Full ranking
| Rank | Model | Provider | Input $/1M | Output $/1M | Context |
|---|---|---|---|---|---|
| 1 | GPT-4o (2024-11-20) | OpenAI | $2.50 | $10.00 | 128,000 |
| 2 | Claude Sonnet 4.5 | Anthropic | $3.00 | $15.00 | 1,000,000 |
| 3 | GPT-5 Codex | OpenAI | $1.25 | $10.00 | 400,000 |
| 4 | Gemini 2.5 Pro | $1.25 | $10.00 | 1,048,576 | |
| 5 | Gemini 2.5 Pro Preview 06-05 | $1.25 | $10.00 | 1,048,576 | |
| 6 | GPT-5.1-Codex | OpenAI | $1.25 | $10.00 | 400,000 |
| 7 | o3 | OpenAI | $2.00 | $8.00 | 200,000 |
| 8 | Claude 3.7 Sonnet | Anthropic | $3.00 | $15.00 | 200,000 |
| 9 | Claude 3.7 Sonnet (thinking) | Anthropic | $3.00 | $15.00 | 200,000 |
| 10 | GPT-5 Mini | OpenAI | $0.25 | $2.00 | 400,000 |
Field notes
Prefer a model with a large context window if your repo is bigger than ~200 files.
Use batch pricing for CI / nightly refactor jobs; interactive IDE work stays on the standard price.
Check function-calling reliability before committing to an agentic flow.
FAQ
The questions teams ask before picking a model for coding.
Get instant answers from our AI agent