The best AI models for coding, by the benchmarks that actually test coding
Which LLMs write and fix code best right now, judged by SWE-bench Verified, LiveCodeBench, Aider, Terminal-Bench, SWE-Bench Pro and WebDev Arena, with prices.
"Best model for coding" is the most-asked question in this field and the one most polluted by marketing. This page answers it from the boards that actually run code: SWE-bench Verified (real GitHub issues, fixed end to end), LiveCodeBench (competitive programming released after training cut-offs), Aider Polyglot (225 Exercism problems across six languages), Terminal-Bench (command-line agent tasks), SWE-Bench Pro (long-horizon tasks in private repositories) and WebDev Arena (humans voting on generated web apps). Numbers as of 9 Sept 2026.
The top five for coding
The coding category score averages a configuration's standardised results across those boards. Here is the current top of the table:
| # | Model | Coding score | Index | Price $/M |
|---|---|---|---|---|
| 1 | 79.0 | 70.6 | $22.00 | |
| 2 | 74.4 | 70.0 | $10.00 | |
| 3 | 72.0 | 68.0 | $8.00 | |
| 4 | 71.7 | 63.9 | $2.67 | |
| 5 | 70.6 | 70.4 | $20.00 |
As of 9 Sept 2026. Full list.
The leader, GPT-6 Astra (max), is where it is because it is strong across several of these boards, not because it tops one. A model that dominates competitive programming but stumbles on multi-file repository work will sit lower than its LiveCodeBench score suggests, and that is deliberate: the boards disagree about what "coding" means, and real work looks more like SWE-bench than like a contest.
What the boards measure, and why they disagree
- SWE-bench Verified rewards patience and tool use: reading a codebase, reproducing a bug, editing several files, running tests. We report the bash-only harness so the model, not the scaffold, is what varies.
- LiveCodeBench rewards algorithmic reasoning in a single response. Reasoning-heavy configurations do well here even when they are slow.
- Aider Polyglot rewards precise edits in the format an editor expects. Models that "know the answer" but produce sloppy diffs lose points.
- Terminal-Bench and SWE-Bench Pro reward long-horizon agentic work; costs per run can reach thousands of dollars, which is why we show cost alongside accuracy where the publisher reports it.
- WebDev Arena is the only human-judged board here. It captures taste and completeness rather than correctness.
Reasoning effort matters more for coding than anywhere else
The same model at max effort and at low effort can differ by ten or more points on SWE-bench-style tasks, and by several minutes of wall-clock time per task. That is why every row above names its effort. If you are wiring a model into an editor, the high or max configuration is usually the one the scores refer to; the default configuration of an API call may be a different, cheaper animal. Check the configuration table on any model page.
Cheaper picks that still code
If you are paying per token in a coding agent that resends a large context on every step, price dominates. These are the best models under $2 per million tokens blended:
| # | Model | Blended $/M | Index | Price $/M |
|---|---|---|---|---|
| 1 | $1.50/M | 64.4 | $1.50 | |
| 2 | $1.50/M | 63.5 | $1.50 | |
| 3 | $1.13/M | 61.5 | $1.13 | |
| 4 | $0.12/M | 61.0 | $0.119 | |
| 5 | $1.50/M | 60.7 | $1.50 |
As of 9 Sept 2026. Full list.
The per-task boards translate that into money: an agentic coding session of 60,000 input and 4,000 output tokens costs cents on the cheapest of these and dollars on the frontier models, and the "with caching" column shows what prompt caching does to that bill.
Open weights for coding
If the code cannot leave your network, the best open-weights models board is the one to read. The gap to the closed frontier is real but narrower than a year ago, and the model page for each links to its official weights.
How to choose
- Pick the board that looks like your work: SWE-bench for repository fixes, LiveCodeBench for algorithms, Aider for editor integration, Terminal-Bench for autonomous agents.
- Sort that board by score, then look at price and time to first answer on the compare page.
- Try the top two on twenty of your own tasks. Benchmarks narrow the field; they do not pick the winner for your codebase.