Models
Best LLM for Coding by Use Case: Prices and Scores
The best LLM for coding depends on the job: agentic work, cheap bulk code, open weights or long context. Prices and benchmark scores, dated.
Loading poll...
There is no single best LLM for coding; the right pick depends on the job. For long agentic work, Claude Opus 5.5 ($4 in, $20 out per million tokens) tops the figures we cite, with GPT-6 Astra and Gemini 4 Carbon close behind. For cheap bulk code, look at Claude Haiku 5.5, GPT-6 Luna and DeepSeek V4.1 Flash. Prices and scores checked 31 October 2026.
The short answer by use case
Use case | First pick | Why | Price per million tokens (in / out) |
|---|---|---|---|
Long agentic coding | Highest Terminal-Bench 4.0 figure in Anthropic's own table, and first on the Arena WebDev board | $4 / $20 | |
Daily driver for most coding | Near the top at a lower price | $2 / $10 each | |
Hardest reasoning, cost no object | Vendors' flagship tiers | $10 / $50 each | |
Cheap bulk coding | Lowest list prices that still have agent-grade features | $0.10 to $0.15 in | |
Open weights, hosted | Vendor-reported agentic scores near closed models | See below | |
Open weights, your own GPU | Fit one large GPU | Hardware cost only | |
Long context | Any 1M model; see the context table | Check long-prompt pricing first | Varies |
Every score on this page is either the vendor's own or a leaderboard's, and we did not run any of it. Treat the table as a shortlist.
How we picked
We built this page only from our own live model and benchmark pages, plus three official leaderboards we read on 31 October 2026: the Arena WebDev and Coding boards, and the Artificial Analysis model table. We used three kinds of evidence, because each has a different weakness:
- Vendor-reported benchmark tables. Useful for relative position inside one launch post. Biased by the maker's choice of harness and effort setting.
- Human-vote boards. Show which answers people prefer. Do not prove that code runs.
- Index and cost-per-task boards. Show quality and cost together. Mostly English text, one run per test for several parts.
For how to weigh them, see how to read AI benchmarks. The two benchmarks that matter most for agents are SWE-bench and Terminal-Bench.
What the leaderboards show today
Arena, dated 27 October 2026
The WebDev board, where models build web apps, listed Claude Opus 5.5 (Max) first at 1810, GPT-6 Astra (Max) at 1773, Claude Sonnet 5.5 (xHigh) at 1770, Gemini 4 Carbon (High) at 1768 (Preliminary) and GPT-6.1 Sol (Max) at 1751. The Coding category of the Text board put Gemini 4 Carbon (High) first at 1573 ±18 (Preliminary), then Claude Opus 4.7 (High), Claude Opus 5.5 (High), Claude Fable 5 (High) and Gemini 4 Argon (High) between 1550 and 1551. Those four are inside each other's margins. The full tables and caveats are on our LMArena page.
Artificial Analysis, read 31 October 2026
The Intelligence Index, version 5.0, listed Gemini 4 Carbon (high) at 59, Claude Opus 5.5 (max with fallback) at 58, Claude Opus 5.5 (xhigh) and GPT-6 Astra (max) at 57, then GPT-6 Astra and GPT-6.1 Sol (max) at 55 and Claude Sonnet 5.5 (max) at 54. Cost per task is where they differ most: GPT-6.1 Sol (max) was listed at $1.27 a task for 55, Opus 5.5 (max) at $10.04 for 58. See our Artificial Analysis page for method and limits. Its best open-weights entries were DeepSeek V4.1 Flash 1017 (Max) and GLM-5.3 (Max), both at 32.
Vendor-reported test results
From Anthropic's Opus 5.5 launch table, as reproduced on our Claude Opus page:
Benchmark | Opus 5.5 | Fable 5.1 | GPT-6 Astra |
|---|---|---|---|
Terminal-Bench 4.0 | 66.4% | 55.8% | 57.9% |
FrontierCode v1.1 (Main) | 54.4% | 50.3% | 53.3% |
CursorBench 4.0 | 57.8% | 51.8% | not shown |
Anthropic reports Terminal-Bench 4.0 for Opus 5.5 at xhigh effort and for GPT-6 Astra at high effort, the latter "as reported by OpenAI". Its Sonnet 5.5 table lists 70.6% on Terminal-Bench 4.0 and 55.5% on CursorBench 4.0, and the Haiku 5.5 table lists 39.2% against 16.4% for GPT-6 Luna. A cheaper model scoring above a pricier one on one test is a reason to run both, not a ranking.
Our SWE-bench page lists the Bash Only view on Verified from the project's own data, entries dated 17 February 2026: Claude 4.5 Opus (high) at 76.8%, Gemini 3 Flash (high) and MiniMax M2.5 (high) at 75.8%. Those predate the 5.5 generation, so use them for method, not for the current order. The Aider polyglot page has the same warning: its data ends on 3 October 2025.
1. Agentic coding
Agentic coding means the model reads files, edits, runs tests and recovers from errors over many turns. Quality and staying power matter more than price per token.
Model | Price (in / out) | Context | What the evidence says |
|---|---|---|---|
Claude Opus 5.5 | $4 / $20 | 1M | 66.4% Terminal-Bench 4.0 (Anthropic); first on Arena WebDev; second on AA Index at 58 |
Claude Sonnet 5.5 | $2 / $10 | 1M | 70.6% Terminal-Bench 4.0 (Anthropic); 1770 on WebDev at xHigh |
GPT-6 Astra | $10 / $50 | 1.05M | 57.9% Terminal-Bench 4.0 (as reported by OpenAI); AA Index 57 at max; second on WebDev |
GPT-6.1 Sol | $2 / $10 | 1.05M | OpenAI says near-Astra performance at lower cost; AA Index 55 at max for $1.27 a task |
Gemini 4 Argon | $2 / $10 until 30 Nov, then $4 / $20 | 1M | Google's flagship for software engineering and agents; Arena Coding top five |
Claude Fable 5.1 | $10 / $50 | 1M | 55.8% Terminal-Bench 4.0 (Anthropic); Anthropic says the gap to Opus 5.5 is narrower in its own use than scores suggest |
Our reading, from those figures: Opus 5.5, Sonnet 5.5 and GPT-6.1 Sol are the three that combine strong scores with prices most teams can run all day. Sonnet 5.5 and Sol cost half as much as Opus 5.5 per token. Because Sonnet's 70.6% in Anthropic's table sits above Opus's 66.4%, there is a case to try Sonnet first and move to Opus only for the tasks it fails. Anthropic's own words are that Opus 5.5 "remains clearly stronger at complex, open-ended work requiring sustained judgment", so we would not call Sonnet a drop-in.
Pairs and tools matter as much as the model. See Claude Opus vs Sonnet, Claude Code vs Codex and Cursor vs Claude Code. Agents are tuned to particular models, and a different backend can behave differently even when it works.
Prompts past 272K input tokens on GPT-6 cost 2x on input and 1.5x on output, per our GPT models page. Note that before you fill the window.
2. Cheap bulk coding
Bulk coding covers lint fixes, test generation, code review passes, migrations and subagent tasks. You want the lowest cost that still finishes the task.
Model | Price (in / out) | Cached input | Notes |
|---|---|---|---|
DeepSeek V4.1 Flash (deepseek-flash), off-peak | $0.15 / $0.60 | $0.003 | MIT weights, 1M context, 384K max output; peak rates are double |
Claude Haiku 5.5, up to 100K prompt | $0.10 / $0.50 | $0.01 | 39.2% Terminal-Bench 4.0 (Anthropic); over 100K prompt, $0.50 / $2.50 |
GPT-6 Luna | $0.10 / $0.50 | $0.01 | OpenAI's most efficient model for focused, high-volume tasks |
GLM-5.3-Flash | $0.15 / $0.50 | $0.03 | Z.ai's multimodal Flash model |
Gemini 3.5 Flash-Lite | $0.30 / $2.50 | see page | Google's cost-efficient tier |
Gemini 3.8 Flash | $0.75 / $3.75, rising to $1.50 / $7.50 later | see page | Google calls it its most intelligent Flash model |
An example from our open-source coding page: a session that reads 2 million input tokens and writes 200,000 output tokens costs about $0.42 on deepseek-flash off-peak with no cache hits, against $6.00 on Sonnet 5.5. That saving is real only if the cheaper model finishes the job as often, which is the thing you have to test.
Haiku 5.5 is the only Claude model priced by prompt length, so a 120K-token request costs the higher rate for the whole request. DeepSeek's cheap rate applies off-peak: its peak windows are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, excluding Chinese public holidays. Data terms matter for hosted APIs, because your code goes to the maker. Our DeepSeek models page and the DeepSeek vs Claude comparison cover that tradeoff.
Anthropic pairs Haiku 5.5 with Opus and Sonnet as a subagent on coding work, which is a clean pattern: one larger model plans, smaller ones carry out narrow tasks.
3. Open weights and local
"Open" covers a spread: MIT and Apache-2.0 weights you can use freely, and custom licences with revenue lines. Our open source LLM page has the full licence table.
Need | Pick | Licence | Evidence |
|---|---|---|---|
Strongest open agentic coder, hosted or cluster | GLM-5.3 | Custom (revenue line at 10 billion dollars for Model-as-a-Service) | 88.2 Terminal Bench 2.1, 66.9 DeepSWE (Z.ai card) |
Cheap strong API | DeepSeek V4.1 Flash | MIT | 77.0 DeepSWE v1.1, 42.3 Terminal-Bench 4.0 (DeepSeek card) |
Largest open model | Kimi K3 | Custom | 88.3 Terminal Bench 2.1, 67.5 DeepSWE |
One 80 GB GPU | gpt-oss-120b | Apache-2.0 | One 80 GB card, MXFP4, 131K context |
24 to 48 GB workstation | Qwen3.8 27B or Gemma 4 31B | Apache-2.0 | Qwen card lists SWE-bench Pro 61.7 (vendor-reported) |
16 GB laptop | gpt-oss-20b | Apache-2.0 | Fits within 16 GB per its card |
DeepSeek's own card shows its Flash model ahead of a listed Opus 5 on DeepSWE (77.0 against 74.0) and behind on Terminal-Bench 4.0 (42.3 against 51.8), ProgramBench and NL2Repo-Bench. That is a good illustration of why one test does not settle it. All of those numbers are the makers' and use different harnesses.
For hardware tiers and runtimes, use our companion page on the best local LLM, plus GPU requirements for LLMs, Ollama and vLLM. If you want an agent to use a local model, local coding agent with Ollama has the configuration.
4. Long context
Many models list 1M tokens now, but how a model behaves at the far end of its window is a separate question. Z.ai's own benchmark notes, for example, used managed context for long-horizon tests.
Model | Context | Max output | Long-prompt pricing note |
|---|---|---|---|
Claude Fable 5.1, Opus 5.5, Sonnet 5.5 | 1M | 128K | Same rate across the window |
Claude Haiku 5.5 | 1M | 128K | Over 100K prompt, $0.50 in and $2.50 out |
GPT-6 family | 1,050,000 | 128K | Over 272K input tokens, 2x input and 1.5x output |
Gemini 4 Argon, 3.8 Flash | 1M | Up to 1M output on Argon | See Gemini models |
DeepSeek V4 Pro and V4.1 Flash | 1M | 384K | Flat list prices |
Kimi K3 | 1M | see page | Open weights |
Mistral Large 4 | 1M | see page | $0.70 in, $2.10 out |
Grok 4.7 | 500K | see page | $2 in, $6 out |
gpt-oss-120b | 131,072 | see page | Smallest in this group |
If you need to put a large repository in the prompt, Claude's flat pricing across 1M tokens and DeepSeek's cheap rates are the easiest to budget. If you only occasionally exceed the window, GPT-6's step up above 272K will not matter. For big codebases, a retrieval step often beats a full window; the model pages explain how each vendor handles caching, which can cut repeated input costs sharply (for example, Claude cache reads are $0.20 per million tokens on Opus 5.5 against $4 for fresh input).
Which agent runs which model
The model is half the choice. These pages show how the tool and model pair up.
Tool | Models | Page |
|---|---|---|
Claude Code | Claude only | |
Codex CLI | GPT-6 family | |
Cursor | Claude, GPT, Gemini and others | |
GitHub Copilot | Claude, GPT and others | |
Cline, OpenCode, Aider | Any compatible provider |
Where you host matters too. API prices are the same wherever you call a model directly, but cloud marketplaces such as AWS Bedrock add their own terms, and OpenRouter routes to many. See AI hosting and the full LLM API prices table.
A simple way to decide
- Write down your task type: new features in a big repo, quick fixes, test writing, review, or front-end pages.
- Choose a primary model from the agentic table and a cheap model from the bulk table.
- Add an open model only if privacy, licence or cost pushes you there.
- Run ten real tasks through two finalists at the effort level your tool uses.
- Count tests passed and dollars spent. Keep the cheaper model if both pass.
- Re-check every quarter; model names and prices here changed several times in 2026.
Mistakes to avoid
- Comparing across test versions. Terminal-Bench 2.1 and 4.0 are different tests. The same model scores very differently across them.
- Ignoring effort settings. The leaderboard row "(Max)" is not the same product as the default setting in your tool.
- Reading a vote board as a pass rate. Arena ranks preference.
- Trusting a snapshot. Dates are in the table headings for a reason.
- Forgetting the price change in your plan. Gemini 4 Argon's $2 and $10 rate ends on 30 November, when it becomes $4 and $20.
- Skipping data terms. Check what a maker's API does with your code before you send it.
Our take
If we had to name a starting trio from the evidence on our own pages, it would be Claude Sonnet 5.5 for daily work, Claude Opus 5.5 for the hard tasks, and DeepSeek V4.1 Flash or Claude Haiku 5.5 for bulk. GPT-6.1 Sol deserves a test in the daily slot because its Artificial Analysis cost per task was low for its score. For privacy or a licence reason, gpt-oss-120b on one 80 GB GPU is the cleanest open route we list. None of this replaces a test on your own repository, and we have not run these models ourselves.
What we could not confirm
- Independent coding scores for the newest 5.5 and GPT-6 models. Most scores are vendor-reported.
- Kimi K3 and K2.7-Code per-token prices, which Moonshot's table did not show when we read it.
- Whether the Arena Coding lead for Gemini 4 Carbon holds; it is marked Preliminary with 1,106 votes.
- Artificial Analysis publishes no separate Coding Index on the pages we read.
Questions
What is the best LLM for coding?
For long agentic coding, Claude Opus 5.5 leads on the vendor and leaderboard figures we cite, and GPT-6 Astra and Gemini 4 Carbon are close. For cheap bulk work, Claude Haiku 5.5, GPT-6 Luna and DeepSeek V4.1 Flash cost the least. Test two or three on your own code.
What is the cheapest good LLM for coding?
DeepSeek V4.1 Flash is $0.15 in and $0.60 out per million tokens off-peak under an MIT licence. Claude Haiku 5.5 and GPT-6 Luna are $0.10 and $0.50, and Haiku reports 39.2% on Terminal-Bench 4.0 against 16.4% for Luna in Anthropic's table.
Which coding LLM has the longest context?
Claude, Gemini, DeepSeek V4, Kimi K3 and Mistral Large 4 list 1M tokens. GPT-6 lists 1,050,000. Grok 4.7 lists 500K. Long prompts cost more on some models, so check the price tier.
Can an open model match a closed one for coding?
On vendor-reported numbers, open models are close on some tests and behind on others. DeepSeek's own card shows its V4.1 Flash ahead of Opus 5 on DeepSWE and behind on Terminal-Bench 4.0. These are the makers' figures, not independent ones.
Do LLM leaderboards decide which model to use?
They narrow the list. Human-vote boards, index boards and test-based benchmarks measure different things, so we use all three and then ask you to run a few of your own tasks.
Loading poll...
Sources
- aiagentduo.com/models/claude-models/
- aiagentduo.com/models/claude-opus/
- aiagentduo.com/models/gpt-models/
- aiagentduo.com/models/gemini-models/
- aiagentduo.com/models/deepseek-models/
- aiagentduo.com/models/best-open-source-llm-for-coding/
- aiagentduo.com/benchmarks/swe-bench/
- aiagentduo.com/benchmarks/terminal-bench/
- arena.ai/leaderboard/webdev
- arena.ai/leaderboard/text/coding
- artificialanalysis.ai/leaderboards/models