Best LLM for coding (2026)

Which model writes and fixes code best right now?

Rebuilt from live model data · August 3, 2026

How we ranked

Ranked by Artificial Analysis Coding Index, reported through OpenRouter's model API.

Top 3 for coding

  1. 1

    Claude Opus 5

    Coding index: 78.0 $5.00 in / $25.00 out per 1M 1M context 5 providers

    Claude Opus 5 is Anthropic’s flagship model for demanding reasoning, coding, and long-horizon agentic work. It is particularly strong at end-to-end software tasks, code review and bug finding, visual analysis...

    Vision Tool calling Reasoning Released Jul 24, 2026
  2. 2

    GPT-5.6 Sol

    Coding index: 77.4 $5.00 in / $30.00 out per 1M 1.1M context 2 providers

    GPT-5.6 Sol is the flagship model in OpenAI's GPT-5.6 series. It is suited for complex reasoning, coding, and agentic workflows, and is particularly strong at command-line and multi-step coding tasks...

    Vision Tool calling Reasoning Released Jul 9, 2026
  3. 3

    GPT-5.6 Terra

    Coding index: 76.7 $1.25 in / $7.50 out per 1M 1.1M context 2 providers

    GPT-5.6 Terra is a balanced model in OpenAI's GPT-5.6 series, positioned between the flagship Sol tier and the cost-efficient Luna tier. It is suited for everyday coding, reasoning, and agentic...

    Vision Tool calling Reasoning Released Jul 9, 2026

Full ranking

#ModelCoding indexOutput / 1M ContextProvidersWeights
1 Claude Opus 5 78.0 $25.00 1M 5 Closed
2 GPT-5.6 Sol 77.4 $30.00 1.1M 2 Closed
3 GPT-5.6 Terra 76.7 $7.50 1.1M 2 Closed
4 Claude Fable 5 76.5 $50.00 1M 4 Closed
5 Kimi K3 76.2 $15.00 1.0M 6 Open
6 GPT-5.5 74.9 $30.00 1.1M 2 Closed
7 Claude Opus 4.8 74.3 $25.00 1M 4 Closed
8 Claude Opus 4.7 73.6 $25.00 1M 4 Closed
9 Grok 4.5 72.4 $6.00 500K 1 Closed
10 Claude Sonnet 5 71.5 $10.00 1M 4 Closed
11 GPT-5.6 Luna 71.4 $3.00 1.1M 2 Closed
12 Muse Spark 1.1 71.3 $4.25 1.0M 1 Closed

FAQ

Which model writes and fixes code best right now?

Claude Opus 5 leads for coding with coding index 78.0, at $25.00 per 1M output tokens. GPT-5.6 Sol (77.4) and GPT-5.6 Terra (76.7) follow. Ranked by Artificial Analysis Coding Index, reported through OpenRouter's model API.

How is this ranking produced?

Ranked by Artificial Analysis Coding Index, reported through OpenRouter's model API. The list rebuilds from the live model catalogue on every deploy, so a model that launches or changes price appears here without an editor rewriting the page. Last rebuild: August 3, 2026.

What does the top pick cost to run?

Claude Opus 5 costs about $12.50 for a workload of 1M input + 300K output tokens, based on the cheapest of 5 provider(s).