The Best LLM for Coding, Ranked on Independent Benchmarks
How we compared. We only use benchmarks that independent testers run. Labs also publish scores for their own models, but we can't see how they ran those tests, so we leave them out. We use these three.
- Terminal-Bench 4.0 from Artificial Analysis. A model gets 66 coding, admin and research tasks in a terminal. A task counts only if all its checks pass.
- FrontierCode 2.0 from Artificial Analysis. A model fixes bugs and adds features in real software projects. Graders score each change against what the maintainers asked for.
- WebDev Arena from Arena. People ask for a web app, get answers from two anonymous models and vote for the better one.
To keep it simple, the rest of the page calls them agentic coding, existing codebases and frontend, in that order.
Claude Fable 5.2 is the best AI for coding right now. It ranks first on existing codebases and frontend. Kimi K3.1 Pro, an open model, solves the most agentic coding tasks. GPT-6.1 Terra comes close to Opus 5.5 on existing codebases and costs 93% less per task.
Updated Nov 20, 2026 · See every coding model
- Best overall
Claude Fable 5.2
First on two of the three coding tests
- Best model for agentic coding
Kimi K3.1 Pro
Solves the most agentic coding tasks
- Best value
GPT-6.1 Terra
Near Opus 5.5 on existing codebases, 93% cheaper per task
- Best open model
Kimi K3.1 Pro
Top open score on two of the three coding tests
- Best coding agent
Claude Code
Shares the top agent score, with Opus 5.5
What is the best AI for coding?
The best AI for coding is Claude Fable 5.2. It ranks first on existing codebases and frontend, and fourth on agentic coding. Kimi K3.1 Pro solves the most agentic coding tasks but drops to twentieth place on existing codebases. The table shows where each model places on the three tests.
| Model | Agentic codingTerminal-Bench 4.0 | Existing codebasesFrontierCode 2.0 | FrontendWebDev Arena |
|---|---|---|---|
| #4 | #1 | #1 | |
| #2 | #3 | #3 | |
| #2 | #3 | #3 | |
| #5 | #2 | #1 | |
| #5 | #3 | #3 | |
| #7 | #3 | #8 | |
| #7 | #3 | #14 | |
| #1 | #20 | #14 |
Models within 2 points of each other share a place (within 15 points on WebDev Arena).
Best AI for agentic coding, existing codebases and frontend
Agentic coding
Kimi K3.1 Pro solves the most tasks. Gemini 4 Carbon and Sonnet 5.5 share second place. Fable 5.2 is fourth.
- #1 Kimi K3.1 Pro · Moonshot AI · 67.2% · open weights
- #2 Gemini 4 Carbon · Google · 65.2%
- #2 Claude Sonnet 5.5 · Anthropic · 63.6%
- #4 Claude Fable 5.2 · Anthropic · 61.6%
- #5 Claude Opus 5.5 · Anthropic · 59.6%
- #5 GPT-6 Astra · OpenAI · 59.6%
Existing codebases
Fable 5.2 scores highest. Opus 5.5 is second.
- #1 Claude Fable 5.2 · Anthropic · 49.1%
- #2 Claude Opus 5.5 · Anthropic · 46.4%
- #3 GPT-6 Astra · OpenAI · 42.4%
- #3 GPT-6.1 Terra · OpenAI · 42.3%
- #3 Claude Sonnet 5.5 · Anthropic · 41.7%
- #3 GPT-6.1 Sol · OpenAI · 40.6%
- #3 Gemini 4 Carbon · Google · 40.6%
Frontend
Fable 5.2 and Opus 5.5 share first place. Sonnet 5.5, Gemini 4 Carbon, Gemini 4 Neon, GPT-6 Astra and GPT-6.2 Astra share third place.
- #1 Claude Fable 5.2 · Anthropic · 1,823
- #1 Claude Opus 5.5 · Anthropic · 1,818
- #3 Claude Sonnet 5.5 · Anthropic · 1,771
- #3 Gemini 4 Carbon · Google · 1,769
- #3 Gemini 4 Neon · Google · 1,763
- #3 GPT-6 Astra · OpenAI · 1,763
- #3 GPT-6.2 Astra · OpenAI · 1,759
What is the best AI coding agent?
Claude Code with Opus 5.5, Devin Fusion CLI and GitHub Copilot Fusion share the top score among coding agents.
The model you pick matters more than the agent you run it in. Codex scores 43% lower with GPT-6 Luna, the model on its free plan, than with GPT-6 Astra. Claude Code drops about as much with Claude Haiku 5.5. The same model in another agent scores within a few points.
- Claude Code with Claude Opus 5.5 · 61.7 · $11.42 per task
- Devin Fusion CLI (Opus 5.5 and GPT-6 Luna) · 61.5
- GitHub Copilot Fusion · 59.9
- Antigravity CLI with Gemini 4 Carbon · 59.4 · $7.74 per task
- Claude Code with Claude Sonnet 5.5 · 59.3 · $13.30 per task
- Muse Code · 58.9
- Claude Code with Claude Fable 5.1 · 57.6 · $11.53 per task
- Codex with GPT-6 Astra · 54.7 · $7.04 per task
- Codex with GPT-6.1 Sol · 54.1 · $1.50 per task
- Antigravity CLI with Gemini 4 Argon · 53.2 · $11.73 per task
- Codex with GPT-6.1 Terra · 48.2 · $0.69 per task
- Codex with DeepSeek V4.1 Flash · 47.3 · $0.39 per task
- Claude Code with Claude Haiku 5.5 · 37.3 · $2.67 per task
- Codex with GPT-6 Luna · 31.1 · $0.16 per task
Coding Agent Index v2.0 from Artificial Analysis, Oct 23, 2026. Artificial Analysis runs three coding tests inside each agent and averages the scores.
Codex vs Claude Code vs Gemini CLI
Claude Code with Opus 5.5 scores highest of the three. Antigravity CLI with Gemini 4 Carbon scores lower but costs 32% less per task than Claude Code. Codex with GPT-6.1 Sol, its default model, scores lower but costs 87% less per task than Claude Code.
Full use of each starts at $20 a month. Only Antigravity CLI has a free plan in the terminal. Codex and Gemini CLI are open source, and Claude Code and Antigravity CLI are not.
| Fact | Claude Code | Codex | Antigravity CLIReplaces Gemini CLI on Google plans |
|---|---|---|---|
| Made by | Anthropic | OpenAI | |
| Default model | Opus 5.5 | GPT-6.1 Sol | Not published |
| Models | Claude only | OpenAI and others | Gemini and Claude |
| Free plan | No | Desktop app only | Yes, weekly limits |
| Full use from | $20 a month | $20 a month | $20 a month |
| Open source | No | Yes | No |
| Agent scoreCoding Agent Index | 61.7 | 54.1 | 59.4 |
| Cost per taskAt API prices | $11.42 | $1.50 | $7.74 |
Green marks the best value in each row. We checked plans and models on each maker's site on Nov 13, 2026. Scores and costs come from the same Artificial Analysis index.
Claude vs ChatGPT vs Gemini for coding
Anthropic's Claude models rank above OpenAI's and Google's available models on two of the three tests. OpenAI's best available model, GPT-6 Astra, is third on existing codebases and frontend, and fifth on agentic coding. Google's best available model, Gemini 4 Carbon, is second on agentic coding, and third on existing codebases and frontend.
- Agentic coding
- Claude (Anthropic): best is Sonnet 5.5, #2.
- ChatGPT (OpenAI): best is GPT-6 Astra, #5.
- Gemini (Google): best is Gemini 4 Carbon, #2.
- Existing codebases
- Claude (Anthropic): best is Fable 5.2, #1.
- ChatGPT (OpenAI): best is GPT-6 Astra, #3.
- Gemini (Google): best is Gemini 4 Carbon, #3.
- Frontend
- Claude (Anthropic): best is Fable 5.2, #1.
- ChatGPT (OpenAI): best is GPT-6 Astra, #3.
- Gemini (Google): best is Gemini 4 Carbon, #3.
Grey squares are models from other labs. Kimi K3.1 Pro from Moonshot AI is first on agentic coding.
Claude Fable vs Opus for coding
Fable 5.2 beats Opus 5.5 on agentic coding and existing codebases. They are level on frontend.
Opus 5.5 costs 50% less per token.
| Fact | Claude Fable 5.2 | Claude Opus 5.5 |
|---|---|---|
| Agentic codingTerminal-Bench 4.0 | 61.6% | 59.6% |
| Existing codebasesFrontierCode 2.0 | 49.1% | 46.4% |
| FrontendWebDev Arena | 1,823 | 1,818 |
| Input pricePer 1M tokens | $8 | $4 |
| Output pricePer 1M tokens | $40 | $20 |
Green marks the better model in each row. When the two are level, neither is green. Prices are API list prices.
Claude Opus vs Sonnet for coding
Opus 5.5 beats Sonnet 5.5 on existing codebases and frontend, and Sonnet 5.5 wins on agentic coding.
Sonnet 5.5 costs 50% less per token and runs 29% faster. But it uses more tokens on each task, so at their top settings both cost about the same per task.
| Fact | Claude Opus 5.5 | Claude Sonnet 5.5 |
|---|---|---|
| Agentic codingTerminal-Bench 4.0 | 59.6% | 63.6% |
| Existing codebasesFrontierCode 2.0 | 46.4% | 41.7% |
| FrontendWebDev Arena | 1,818 | 1,771 |
| Input pricePer 1M tokens | $4 | $2 |
| Output pricePer 1M tokens | $20 | $10 |
| Cost per taskAt the top setting | $5.98 | $5.46 |
| SpeedTokens per second | 112 | 144 |
Green marks the better model in each row. When the two are level, neither is green. Prices are API list prices. Cost per task (Intelligence Index v4.3) and speed come from Artificial Analysis, at the setting where each model scores best.
What is the cheapest good model for coding?
GPT-6.1 Terra is the cheapest good model for coding right now. On existing codebases it gets 91% of Opus 5.5's score and costs 93% less per task. Claude Haiku 5.5 is cheaper still and gets 75%.
You can also save with the effort setting. Opus 5.5 at xhigh effort scores the same on agentic coding as at max and costs 42% less per task. It scores a little lower on existing codebases.
- Claude Opus 5.5: 46.4%, $5.98 per task
- GPT-6.1 Terra: 42.3%, $0.40 per task
- Claude Haiku 5.5: 34.9%, $0.21 per task
Cost per task is the API bill for one task. Artificial Analysis runs its Intelligence Index v4.3 through each model's API at list prices and divides the bill by the number of tasks. It is not a subscription price.
What is the best open source model for coding?
Kimi K3.1 Pro is the best open source model for coding. On agentic coding it ranks first among all models, open or closed. On existing codebases the best open model is Hy4. It scores 36% lower than Fable 5.2. On frontend Kimi K3.1 Pro is also the best open model. In a head-to-head, people pick Fable 5.2 over it about 69% of the time.
Both need server hardware. For a model on your own graphics card or Mac, see the best local LLM for coding.
- Agentic coding: Kimi K3.1 Pro is the best model and open, 67.2%.
- Existing codebases: best model Fable 5.2 49.1%, best open model Hy4 31.4%.
- Frontend: best model Fable 5.2 1,823, best open model Kimi K3.1 Pro 1,683.
Open means you can download the weights.
How this ranking works
Labs' own scores often run higher than independent ones. Anthropic reports 70.6% for Claude Sonnet 5.5 on Terminal-Bench 4.0, and Artificial Analysis measured 63.6%.
| Test | Kind of work | Measured by | Data from |
|---|---|---|---|
| Terminal-Bench 4.0 | Agentic coding | Artificial Analysis | Nov 14, 2026 |
| FrontierCode 2.0 | Existing codebases | Artificial Analysis | Nov 14, 2026 |
| WebDev Arena | Frontend | Arena, from people's votes | Nov 19, 2026 |
| Coding Agent Index v2.0 | Coding agents, each with a model | Artificial Analysis | Oct 23, 2026 |
Tests this page leaves out
- SWE-bench Verified. OpenAI stopped reporting it in February 2026. It said some tests were flawed and answers had leaked into training data.
- SWE-bench Pro. Top models all score near the maximum, so it no longer separates them.
- Terminal-Bench 2.1. An older, easier edition of the agentic coding test.
- DeepSWE. It has no scores yet for several models on this page.
FAQ
What is the best LLM for coding right now?›
Claude Fable 5.2 is the best LLM for coding on independent tests, as of Nov 20, 2026. Fable 5.2 ranks first on existing codebases and frontend. Kimi K3.1 Pro, an open model, solves the most agentic coding tasks. GPT-6.1 Terra comes close to Opus 5.5 on existing codebases and costs 93% less per task.
Is Claude or ChatGPT better for coding?›
Claude's best models rank above OpenAI's on all three main coding tests. OpenAI's GPT-6.1 Terra comes close to Opus 5.5 on existing codebases and costs 93% less per task.
Is Claude Fable better than Opus for coding?›
Fable 5.2 beats Opus 5.5 on agentic coding and existing codebases. They are level on frontend. Opus 5.5 costs 50% less per token.
Which is better for coding, Claude Opus or Sonnet?›
Opus 5.5 beats Sonnet 5.5 on existing codebases and frontend, and Sonnet 5.5 wins on agentic coding. Sonnet 5.5 costs 50% less per token and runs 29% faster. But it uses more tokens on each task, so at their top settings both cost about the same per task.
Is Codex better than Claude Code?›
Claude Code with Opus 5.5 scores higher. Codex with GPT-6.1 Sol, its default model, costs 87% less per task than Claude Code. Full use of both starts at $20 a month.
Is Gemini CLI still available?›
Yes, for enterprise users and anyone with a paid Gemini API key. On Jun 18, 2026, Google moved users on the free tier and on Google AI Pro and Ultra to Antigravity CLI. Gemini CLI stays open source.
Can I run a good coding model on my own computer?›
Yes, but the open models that fit on one graphics card or a Mac solve far fewer tasks than the leaders. The best picks for each machine are on our best local LLM for coding page.
Is there a free AI for coding?›
Antigravity CLI has a free plan with weekly limits. Codex's free plan runs GPT-6 Luna in the desktop app only. Claude Code needs a paid plan.