Code generation, debugging, refactoring, code review. Ranked by quality, cost, and real-world performance.
26 models compared · Data powered by Artificial Analysis
Ranked comparison of 26 AI models for coding tasks. Claude Opus 5 leads on quality (score 61), while GPT-5.6 Luna provides the most affordable entry point.
Claude Fable 5 currently leads our coding rankings with the highest quality score. Claude Sonnet 5 and GPT-5.5 follow closely and cost significantly less per token. For budget work, DeepSeek V4 Flash delivers solid code generation at a fraction of the price.
The best Claude model for coding depends on your budget. Fable 5 is the strongest overall. Sonnet 5 ($2/$10 per million tokens) is the sweet spot for daily coding work. Opus 4.8 sits between them. If you prefer OpenAI, GPT-5.6 Sol has the highest raw score but costs more. GPT-5.5 is the better value.
For coding agents that handle many tasks daily, pair a premium model (Sonnet 5 or GPT-5.5) with a fast, cheap model (GPT-5.6 Luna, DeepSeek V4 Flash) for simple edits and lookups. This two-tier approach cuts costs 60-80% while keeping quality where it counts. For a deeper analysis with real benchmarks and agent configuration examples, see our full guide to the best AI models for coding.
| # | Model | Tier | Quality | Price (In/Out) | Est. Cost (100/mo) |
|---|---|---|---|---|---|
| 1 | Claude Opus 5 Anthropic | Frontier | 61 | $5.00 / $25.00 | $58.50 |
| 2 | Claude Fable 5 Anthropic | Frontier | 60 | $10.00 / $50.00 | $117.00 |
| 3 | GPT-5.6 Sol OpenAI | Frontier | 59 | $5.00 / $30.00 | $67.50 |
| 4 | Kimi K3 Moonshot AI | Frontier | 57 | $3.00 / $15.00 | $35.10 |
| 5 | Claude Opus 4.8 Anthropic | Frontier | 56 | $5.00 / $25.00 | $58.50 |
| 6 | GPT-5.6 Terra OpenAI | Premium | 55 | $2.00 / $12.00 | $27.00 |
| 7 | GPT-5.5 OpenAI | Premium | 55 | $5.00 / $30.00 | $67.50 |
| 8 | Claude Opus 4.7 Anthropic | Premium | 54 | $5.00 / $25.00 | $58.50 |
| 9 | Grok 4.5 xAI | Premium | 54 | $2.00 / $6.00 | $16.20 |
| 10 | Claude Sonnet 5 Anthropic | Premium | 53 | $2.00 / $10.00 | $23.40 |
| 11 | GPT-5.4 OpenAI | Mid-Range | 51 | $2.50 / $15.00 | $33.75 |
| 12 | GPT-5.6 Luna OpenAI | Budget | 51 | $0.20 / $1.20 | $2.70 |
| 13 | GLM-5.2 Z AI | Mid-Range | 51 | $0.50 / $2.00 | $4.95 |
| 14 | Gemini 3.6 Flash Google | Mid-Range | 50 | $1.50 / $7.50 | $17.55 |
| 15 | Gemini 3.5 Flash Google | Budget | 50 | $1.50 / $9.00 | $20.25 |
| 16 | Gemini 3.1 Pro Google | Frontier | 47 | $2.50 / $15.00 | $33.75 |
| 17 | Claude Sonnet 4.6 Anthropic | Mid-Range | 47 | $3.00 / $15.00 | $35.10 |
| 18 | Gemini 3 Flash Google | Budget | 46 | $0.07 / $0.30 | $0.74 |
| 19 | DeepSeek V4 Pro DeepSeek | Mid-Range | 44 | $0.43 / $0.87 | $2.73 |
| 20 | KAT-Coder-Pro V2 KwaiPilot | Mid-Range | 44 | $0.30 / $1.20 | $2.97 |
| 21 | MiniMax M3 MiniMax | Mid-Range | 44 | $0.30 / $1.20 | $2.97 |
| 22 | Grok 4 xAI | Premium | 43 | $3.00 / $15.00 | $35.10 |
| 23 | Gemini 3 Pro Google | Premium | 40 | $2.00 / $12.00 | $27.00 |
| 24 | DeepSeek V4 Flash DeepSeek | Budget | 40 | $0.14 / $0.28 | $0.88 |
| 25 | MiniMax M2.7 MiniMax | Mid-Range | 38 | $0.30 / $1.20 | $2.97 |
| 26 | DeepSeek R1 (Free) DeepSeek | Free | 27 | Free / Free | Free |
Full rankings with cost comparison and agent configuration tips