The best AI models for coding

Updated February 2026 · 9 models · ranked by coding capability

Coding workloads reward reasoning quality and large context for whole-repo edits. These models all target code generation; we rank the highest-quality options first, then by price.

#ModelInputOutputContext
1DeepSeek V4
DeepSeek
$0.40$1.20256K
2Mistral Large 3
Mistral
$2.00$6.00256K
3Claude Sonnet 5
Anthropic
$3.00$15.00400K
4Gemini 2.5 Pro
Google
$5.00$15.002M
5Grok 4
xAI
$5.00$15.00256K
6GPT-5
OpenAI
$10.00$30.00256K
7Claude Opus 4.8
Anthropic
$15.00$75.00500K
8Codestral 2
Mistral
$0.50$1.50256K
9Llama 4 Maverick
Meta
$0.60$0.901M

1. DeepSeek V4

DeepSeek · $0.40 in / $1.20 out per 1M · 256K context · Jan 2026

Open-weight MoE model with strong reasoning and coding at a very low price.

2. Mistral Large 3

Mistral · $2.00 in / $6.00 out per 1M · 256K context · Feb 2026

European frontier model with strong multilingual and function-calling support.

3. Claude Sonnet 5

Anthropic · $3.00 in / $15.00 out per 1M · 400K context · Feb 2026

Balanced frontier model — near-Opus quality at a fraction of the price.

4. Gemini 2.5 Pro

Google · $5.00 in / $15.00 out per 1M · 2M context · Sep 2025

Massive context window and strong multimodal grounding for document-heavy tasks.

5. Grok 4

xAI · $5.00 in / $15.00 out per 1M · 256K context · Dec 2025

Real-time knowledge model with strong reasoning and a conversational style.

6. GPT-5

OpenAI · $10.00 in / $30.00 out per 1M · 256K context · Dec 2025

Top general-purpose model with strong tool-use and multimodal reasoning.

7. Claude Opus 4.8

Anthropic · $15.00 in / $75.00 out per 1M · 500K context · Jan 2026

Flagship for the hardest reasoning, agentic, and coding workloads.

8. Codestral 2

Mistral · $0.50 in / $1.50 out per 1M · 256K context · Nov 2025

Code-specialized model tuned for autocomplete, fill-in-the-middle, and refactors.

9. Llama 4 Maverick

Meta · $0.60 in / $0.90 out per 1M · 1M context · Aug 2025

Open-weight model you can self-host — strong coding with permissive licensing.

Pricing is illustrative and per 1M tokens. Not sure which to pick? Run the model finder for a recommendation, or browse the full directory.