Best • TECHNICAL REPORT

The Best Claude Model for Coding: What the Benchmarks Actually Show

The Best Claude Model for Coding: What the Benchmarks Actually Show
The Best Claude Model for Coding: What the Benchmarks Actually Show

Nearly every article answering this question ranks models by vibes or by repeating Anthropic’s launch posts. This one uses the Terminal-Bench 2.1 leaderboard, which publishes accuracy, error margins and the dollar cost of every verified run, alongside list prices taken from Anthropic’s own pricing documentation.

Which Claude model is best for coding?

Claude Opus 4.8, for most work. Of the four Claude models with verified Terminal-Bench 2.1 results, it delivers the most accuracy per dollar. Fable 5 scores higher in absolute terms and is the right choice when the problem is genuinely difficult.

best-claude-model-for-coding-terminal-bench-scores

Every verified Claude Code run on Terminal-Bench 2.1, with the cost of each.

ModelAccuracyRun costCost/pointVerdict
Fable 583.8%$552.67$6.60Highest score. Pay for it only when the task is hard.
Opus 4.878.9%$286.94$3.64Best value. The default for most coding.
Sonnet 574.6%$288.18$3.86Same run cost as Opus 4.8, 4.3 points worse.
Opus 4.768.9%$599.52$8.70Worst on both axes. Switch off it.

Source: Terminal-Bench 2.1 leaderboard, read 15 August 2026. Cost per point is our calculation. All runs used Claude Code as the agent.

An honest gap. Claude Opus 5 and Claude Haiku 4.5 have no verified Terminal-Bench submission. Any article ranking them for coding is guessing, and so would we be. They are in the pricing table below but not in the benchmark table, and that is deliberate.

The finding that changes how you should pick

Sonnet 5 costs $2 per million input tokens. Opus 4.8 costs $5 — two and a half times more. Sonnet 5 is obviously the cheaper model. Except it was not.

claude-sonnet-5-vs-opus-4-8-cost-per-task

The cheaper model per token was not the cheaper model per task.

Running the same benchmark, Sonnet 5 cost $288.18 and Opus 4.8 cost $286.94. Effectively identical — despite Opus 4.8 being 2.5x dearer per token. The only way that arithmetic works is if Sonnet 5 consumed roughly two and a half times more tokens to get through the same tasks. And it still scored 4.3 points lower.

The lesson generalises: a weaker model on an agentic coding task does not simply produce worse output. It takes more turns, re-reads more files, makes more failed attempts and retries. Every one of those steps resends the whole conversation. Sticker price per token tells you almost nothing about cost per finished task.

This is why picking a coding model on the price list is a mistake, and why nobody who has only read the price list can answer this question properly.

What do the Claude models cost?

Anthropic publishes list prices per million tokens. Here is the current lineup, with retired models omitted.

claude-model-api-pricing-august-2026

Current Claude models and API list prices, August 2026.

ModelInputOutputNotes
Claude Fable 5$10$50Most capable. Batch: $5 / $25.
Claude Opus 5$5$25Newest Opus. No verified coding benchmark yet.
Claude Opus 4.8$5$25Fast mode available at $10 / $50.
Claude Opus 4.7$5$25Same price as 4.8 but scores 10 points lower.
Claude Opus 4.6$5$251M context at standard pricing.
Claude Sonnet 5$2$10Introductory price is now permanent.
Claude Sonnet 4.6$3$15Older and dearer than Sonnet 5.
Claude Haiku 4.5$1$5Cheapest. No verified coding benchmark yet.
Current Claude models and API list prices, August 2026.

Anthropic’s pricing page, 15 August 2026, including the note that Sonnet 5’s introductory price is now permanent.

A price cut worth knowing about. Sonnet 5 launched at $2/$10 as introductory pricing, with an increase to $3/$15 scheduled for 1 September 2026. Anthropic has now confirmed that increase will not happen and $2/$10 is the standard price. If you budgeted for a 50% rise next month, you can stop.

That also makes Sonnet 4.6 obsolete for new work: it is an older model at $3/$15, which is more expensive than the newer Sonnet 5.

The hidden cost in newer models

There is a change buried in Anthropic’s pricing documentation that materially affects what you pay, and almost nobody writing about model selection mentions it.

claude-4-7-tokenizer-30-percent-more-tokens

Claude 4.7 and later count the same text as roughly 30% more tokens.

Claude 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text. Anthropic says it contributes to improved performance, and the exact increase depends on your content.

What this means for you: two models at the same headline price are not the same price. Opus 4.6 and Opus 4.8 both list at $5/$25, but the same codebase costs you meaningfully more to process on 4.8. When you compare a 4.6-or-earlier model against a 4.7-or-later one, the older model is cheaper than the price list implies.

This does not change the recommendation — Opus 4.8 still wins on measured cost per point, and that measurement already includes the tokenizer effect because it is based on actual run costs. But it does mean you should never compare Claude generations on list price alone.

How does Claude compare to other coding agents?

Claude Code with Fable 5 is the highest-scoring configuration on Terminal-Bench 2.1 overall, not just among Claude models.

How does Claude compare to other coding agents?

Terminal-Bench 2.1, top ten. Claude Code leads; Codex is second.

Codex with GPT-5.5 sits second at 83.1%, close enough that the error bars overlap — but its run cost $2,059 against Claude Code’s $553. We broke that comparison down in full in Codex CLI vs Claude Code.

Which model should you actually use?

which-claude-model-to-use-for-coding

Six situations and the Claude model that fits each.

Opus 4.8 — your default

Best measured cost per accuracy point of any Claude model. Use it for feature work, debugging, refactors and anything you would normally hand to an agent without thinking about it.

Fable 5 — when the problem is genuinely hard

The only Claude model that scores higher, at 83.8%. You pay 1.9 times the run cost for 4.9 points. That is worth it when a task is at the edge of what an agent can do, and wasteful when it is not. Switching mid-session is cheap: /model does not clear your conversation.

Sonnet 5 and Haiku 4.5 — high volume, low complexity

Sonnet 5 at $2/$10 and Haiku 4.5 at $1/$5 are the right tools for mechanical, well-specified work — bulk edits, formatting, simple test generation. Neither is the right tool for a hard debugging session, and the benchmark data shows why: on complex agentic tasks the cheaper model can cost as much and deliver less.

Opus 4.7 — stop using it

Same list price as Opus 4.8. Ten accuracy points lower. Its benchmark run cost $599.52 against Opus 4.8’s $286.94, making it both the worst-performing and the most expensive Claude configuration on the board. There is no scenario in which it is the right choice.

Opus 5 — the honest answer is we do not know

It is the newest Opus, listed at $5/$25, and it has no verified Terminal-Bench result. It may well be excellent. Nobody has measured it under controlled conditions, and we will not pretend otherwise.

How to switch models in Claude Code

Use /model to change model mid-session. This does not clear your conversation, so the new model still sees everything the previous one produced.

A useful pattern: /model opusplan plans with Opus and executes with Sonnet. Given the cost data above, planning with Fable 5 and executing with Opus 4.8 is the version worth trying for hard work.

Whichever you pick, model choice interacts with your quota. Claude Code shares one pool across Claude.ai, Claude Desktop and Cowork, and a heavier model burns through it faster — here is how to see what you are actually using.

Frequently asked questions

Which Claude model is best for coding?

Claude Opus 4.8 for most work, on the basis that it delivers the most accuracy per dollar of any Claude model with a verified benchmark result — 78.9% on Terminal-Bench 2.1 at $3.64 per accuracy point. Claude Fable 5 scores higher at 83.8% and is the better choice for genuinely difficult problems.

Is Opus better than Sonnet for coding?

Yes, on the measured evidence. Opus 4.8 scored 78.9% against Sonnet 5’s 74.6%, and the two runs cost effectively the same — $286.94 and $288.18 — despite Sonnet 5 being 2.5 times cheaper per token.

Is Claude Fable 5 worth the extra cost for coding?

For hard problems, yes. Fable 5 scores 4.9 points higher than Opus 4.8 for 1.9 times the run cost. For routine coding, the premium is difficult to justify.

What is the cheapest Claude model for coding?

Claude Haiku 4.5 at $1 input and $5 output per million tokens. But cheapest per token is not cheapest per task — on complex agentic work a weaker model consumes more tokens and may cost as much as a stronger one while producing worse results.

Should I use Claude Opus 5 for coding?

There is no verified Terminal-Bench result for Opus 5, so there is no evidence either way. It is priced identically to Opus 4.8, which does have a measured result.

Why is Sonnet 5 cheaper than Sonnet 4.6?

Sonnet 5 launched at an introductory $2/$10 with an increase to $3/$15 scheduled for 1 September 2026. Anthropic has since confirmed that increase will not occur, so the newer model is permanently cheaper than the older one.

Do newer Claude models cost more than the price list suggests?

Effectively, yes. Claude 4.7 and later use a tokenizer that produces roughly 30% more tokens for the same text, so an identical file costs more to process on a 4.7-or-later model than on an earlier one at the same headline rate.

Methodology

Benchmark figures come from the public Terminal-Bench 2.1 leaderboard, which requires submissions to run through the Harbor harness so results are produced under comparable conditions. We report every verified Claude run rather than selecting favourable ones, and we say explicitly where models have no verified result. Cost per accuracy point is our own calculation, dividing each run’s published cost by its published score; it is a directional ratio, not a precise prediction, because spend and score do not scale linearly.

Prices are list prices taken from Anthropic’s own pricing documentation on 15 August 2026, not from secondary sources. We have no commercial relationship with Anthropic and this page contains no affiliate links.

Sources

Every figure verified against a primary source on 15 August 2026. Anthropic’s lineup and prices change often — if a number here no longer matches its source, tell us and we will re-verify.

Abdullah Zulfiqar
Abdullah Zulfiqar Founder & Technical Editor

Abdullah Zulfiqar is the founder of Vibecoder Journal. He designs independent test harnesses and evaluates Large Language Models on SWE-bench Verified and agentic coding execution.

Related Benchmarks & Evaluations

Guides 7 min read

How to Download a Claude Chat Session

This guide covers every route, what each one actually gives you, and the two traps that cost people their export. What are your options?

Leave a Reply

Your email address will not be published. Required fields are marked *