Pricing / News

Best AI for coding in 2026: we tested 27 models on the same jobs

We gave 27 AI models the same three secret coding jobs. 15 passed every check, so price and speed decided. The cheapest that passed everything was Claude Haiku 5.5, at about 0.19 cents per job; the fastest was GPT-6.1 Sol on ultrafast.

Bar chart of the 15 models that passed all 186 check results, by cost per job: from Claude Haiku 5.5 at 0.19 cents to Gemini 4 Neon at 23.1 cents, with the middle time per job for each
Our secret coding test, 6 October to 27 November 2026, at the prices of those days. Chart by Not an AI App.

Which is the best AI for coding? We gave 27 AI models the same three secret coding jobs and checked every answer with hidden tests. 15 of the 27 passed every check. So on our jobs, the best AI for coding came down to price and speed. The cheapest model that passed everything was Claude Haiku 5.5, at about 0.19 cents per job.

How we tested

Diagram of the test: the same three secret coding jobs, nine runs per model through the API, graded with 62 hidden checks per round, 186 check results per model
Diagram by Not an AI App.

Each of the 27 ranked models got the same three jobs:

  • Fix the money maths in a small program.
  • Write a program that splits a bill between people.
  • Write a CSV reader. A CSV file stores rows of data, with commas between the values.

Each job ran three times, so each model had nine runs. One round of the three jobs has 62 hidden checks: small tests that the AI never sees. Three rounds give 186 check results. Our methods page explains the jobs and the checks.

We sent the jobs through the API, the connection programmers use from their own software. Most models ran through OpenRouter, a paid service that gives access to many models; the cost is what OpenRouter charged. GPT-6.1 Sol and GPT-6.1 Terra ran through OpenAI's own API; there we worked out the cost from the token counts at OpenAI's list price. A token is a small piece of text that AI companies count and bill.

The full ranking

Bar chart of the 12 models that missed some checks, from GLM-5.3 FlashX at 185 of 186 to Claude Haiku 4.5 at 157
Our secret coding test, nine runs per model. Chart by Not an AI App.

Here are all 27 models. Models that passed every check come first, ordered by cost per job. Then come the models that missed some checks, ordered by how many they passed.

ModelMakerChecks passedCost per job (US cents)Middle timeLast test day (2026)
Claude Haiku 5.5Anthropic186/1860.1915 s8 Oct
GPT-6.1 TerraOpenAI186/1860.9321 s27 Oct
GPT-6.1 SolOpenAI186/1861.322 s9 Oct
Gemini 4 ArgonGoogle186/1861.424 s17 Oct
Claude Sonnet 5.5Anthropic186/1862.617 s7 Oct
Muse Spark OpenMeta186/1865.093 s17 Oct
Claude Opus 5.5Anthropic186/1865.930 s7 Oct
Gemini 4 HydrogenGoogle186/1867.669 s12 Nov
Muse WonderMeta186/1868.031 s17 Oct
Gemini 3.8 FlashGoogle186/1868.5147 s10 Oct
Claude Fable 5.1Anthropic186/18614.232 s7 Oct
Gemini 4 CarbonGoogle186/18614.9172 s12 Nov
Gemini 3.1 Pro (preview)Google186/18616.4100 s10 Oct
Claude Fable 5.2Anthropic186/18622.248 s13 Nov
Gemini 4 NeonGoogle186/18623.1123 s27 Nov
GLM-5.3 FlashXZ.ai185/1861.962 s9 Oct
Muse Spark 1.3Meta185/1864.383 s17 Oct
GPT-6 LunaOpenAI184/1860.1225 s8 Oct
GLM-5.3 FlashZ.ai184/1860.69180 s7 Oct
GLM-5.3 PrimeZ.ai184/18629.4365 s9 Oct
Grok 4.7xAI182/1869.5153 s10 Oct
GLM-5.3Z.ai182/18611.0184 s7 Oct
Mistral Large 4Mistral181/1861.622 s7 Oct
DeepSeek V4 ProDeepSeek180/1861.4271 s7 Oct
MiniMax M3MiniMax178/1862.3116 s21 Oct
MiniMax M3.1 Flash (free)MiniMax175/186free215 s21 Oct
Claude Haiku 4.5Anthropic157/1860.817 s7 Oct

Cost per job is the average of nine runs, at the prices on the days we ran the tests. Middle time is the middle value when we put the nine runs in order. Click a model's name for a related article of ours. We left out Qwen 3.8. It ran only two of the three jobs, so its numbers do not fit this table.

Most of the 12 models that missed checks came close: nine of them passed 180 or more of 186. The lowest score was 157, for Claude Haiku 4.5, the older small Claude model.

Cheapest AI for coding

Bar chart of the six cheapest models that passed every check: Claude Haiku 5.5 0.19, GPT-6.1 Terra 0.93, GPT-6.1 Sol 1.3, Gemini 4 Argon 1.4, Claude Sonnet 5.5 2.6, Muse Spark Open 5.0 cents per job
OpenAI's cost is worked out at list price; the others are what OpenRouter charged. Chart by Not an AI App.

If you pay per use, cost per job matters most. In our API test, these were the five cheapest models that passed every check:

  • Claude Haiku 5.5: about 0.19 cents per job.
  • GPT-6.1 Terra: about 0.93 cents.
  • GPT-6.1 Sol: about 1.3 cents.
  • Gemini 4 Argon: about 1.4 cents.
  • Claude Sonnet 5.5: about 2.6 cents.

The most expensive model that passed everything, Gemini 4 Neon, cost about 23.1 cents per job, more than 100 times as much as Claude Haiku 5.5. Among the 15 models that passed every check, paying more did not get a better score.

GPT-6 Luna was even cheaper, at 0.12 cents, but it passed 184 of 186. MiniMax M3.1 Flash was free through OpenRouter when we tested it. It passed 175 of 186. Its middle time was about 3 minutes and 35 seconds per job.

Prices change. Our Gemini costs are what OpenRouter charged on the test day. Google's own Gemini API doubles the standard input and output prices of Gemini 4 Argon and Carbon on 1 December 2026. See our price comparison for the current list prices.

Fastest AI for coding

Bar chart of the eight fastest setups that passed every check, with time and cost per job: Sol ultrafast 6 s, 7.8; Terra low effort 12 s, 0.51; Haiku 5.5 15 s, 0.19; Sol fast 15 s, 2.4; Sonnet 5.5 17 s, 2.6; Terra 21 s, 0.93; Sol 22 s, 1.3; Argon 24 s, 1.4; cost in US cents
Middle time per job in our secret coding test. Chart by Not an AI App.

GPT-6.1 Sol has a speed setting. On "ultrafast", it finished a job in about 6 seconds (middle value) and still passed every check. But it cost about 7.8 cents per job, about six times as much as on its normal setting. Our ultrafast test explains the settings.

Without a special setting, the fastest models that passed everything were Claude Haiku 5.5 (about 15 seconds) and Claude Sonnet 5.5 (17). GPT-6.1 Terra took 21 seconds and GPT-6.1 Sol 22. GPT-6.1 Terra also has an effort setting. On the "low" effort setting, Terra took about 12 seconds per job, cost 0.51 cents and still passed every check.

Some models were much slower. Gemini 4 Carbon took about 172 seconds per job, and GLM-5.3 Prime about 365. We tested these models on different days.

Best AI for coding from each maker

Cheapest model per maker that passed every check, on its normal setting: Anthropic Claude Haiku 5.5, OpenAI GPT-6.1 Terra, Google Gemini 4 Argon, Meta Muse Spark Open; no model from xAI, DeepSeek, Mistral, MiniMax or Z.ai passed every check
Our secret coding test. Chart by Not an AI App.

If you already use one company's tools, this is the cheapest model from each maker that passed every check:

  • Anthropic: Claude Haiku 5.5, about 0.19 cents per job. Claude Sonnet 5.5 (2.6 cents) and Opus 5.5 (5.9 cents) also passed everything.
  • OpenAI: GPT-6.1 Terra, about 0.93 cents on its normal setting and 0.51 cents on low effort. GPT-6.1 Sol also passed everything.
  • Google: Gemini 4 Argon, about 1.4 cents through OpenRouter in October. Google's own standard API prices for Argon double on 1 December.
  • Meta: Muse Spark Open, about 5.0 cents.

From xAI, DeepSeek, Mistral, MiniMax and Z.ai, none of the models we tested passed all 186 checks. Most came close.

Is Claude or ChatGPT better for coding?

The paid Claude, ChatGPT and Gemini apps each passed 62 of 62 coding checks, on the settings shown: Fable 5.2 Gemiddeld, 6.2 Instant and Neon
Our app test of 27 November 2026, one valid run per job. Chart by Not an AI App.

On our jobs, neither was clearly better. Through the API, every Claude and OpenAI model we tested passed all 186 check results, except Claude Haiku 4.5 (157) and GPT-6 Luna (184). The cheapest that passed everything was a Claude model, Haiku 5.5. The fastest setup was an OpenAI one, Sol on ultrafast.

Many people use the apps instead of the API. On 27 November 2026 we gave the paid Claude, ChatGPT and Gemini apps the same three coding jobs. All three passed all 62 hidden checks. ChatGPT's middle time over the three jobs was about 9 seconds, on the Instant setting our account had selected. For both Claude and Gemini, it was at least 28 seconds. For one job in each of those two apps, we only had an upper limit.

What about coding tools?

Coding tools we tested: Codex and Claude Code did equally well; with the same model, Cursor, OpenCode and Claude Code all passed every check; GitHub Copilot Free with the Copilot CLI passed all its checks
Results as published in each tool test. Chart by Not an AI App.

Coding tools such as Claude Code, Codex and Cursor work inside your project. They can read your files and run commands. We tested some of them with the same kind of jobs:

  • Codex vs Claude Code: both did equally well. Claude Code was about three times faster; Codex cost less than half as much for developers.
  • Cursor vs Claude Code: with the same model, both passed every secret check in about the same time. Claude Code read about 2.9 times as much text per job.
  • OpenCode vs Claude Code: with the same model, both passed every secret check, but OpenCode read about one fifth as much text as Claude Code.
  • GitHub Copilot Free: with Copilot in the terminal (the Copilot CLI, where you type commands), it passed all its hidden checks in our test.

In those tests, the tools differed mostly in speed, in how much text they read, and in cost.

Which AI should you use for coding?

Picks: lowest cost, Claude Haiku 5.5; fastest, GPT-6.1 Sol ultrafast; low cost and quick, GPT-6.1 Terra on low effort; Google, Gemini 4 Argon, measured through OpenRouter; free but slower, MiniMax M3.1 Flash at 175 of 186
Based on our secret coding test. Chart by Not an AI App.
  • You want the lowest cost and every check passed (API test): Claude Haiku 5.5, about 0.19 cents per job.
  • You want speed (API test): GPT-6.1 Sol on ultrafast, about 6 seconds per job, if the higher cost is fine.
  • You want low cost and quick answers: GPT-6.1 Terra on low effort, about 0.51 cents and 12 seconds per job.
  • You use Google: Gemini 4 Argon passed everything for about 1.4 cents through OpenRouter. Google's own standard prices for it double on 1 December.
  • You want something free (when we tested it): MiniMax M3.1 Flash was free through OpenRouter, but it was slow and passed 175 of 186.
  • You work on big, hard projects: our jobs are small, so this test cannot tell you which model is best there. Try a few on your own work and compare the cost.

Questions people ask

The 3 questions from Google's "People also ask" that this article answers, about Claude or ChatGPT for coding, the best OpenAI model and the number one AI
"People also ask" questions from Google (US) for "best ai for coding" and "best ai model for coding", 28 November 2026, via DataForSEO. Chart by Not an AI App.

Is Claude or ChatGPT better for coding?

On our coding test, neither was clearly better. Through the API, every Claude and OpenAI model we tested passed all 186 check results, except Claude Haiku 4.5 (157) and GPT-6 Luna (184). The cheapest that passed everything was Claude Haiku 5.5, at about 0.19 cents per job; GPT-6.1 Sol cost about 1.3 cents. In the paid apps, Claude and ChatGPT both passed all 62 checks. ChatGPT had the lower middle time on the coding jobs, on the Instant setting our account had selected.

What's the best OpenAI model for coding?

Of the OpenAI models we tested, GPT-6.1 Terra and GPT-6.1 Sol passed all 186 check results. Terra was the cheaper of the two. On its normal setting it cost about 0.93 cents per job. On low effort it cost 0.51 cents and still passed every check. Sol on its ultrafast setting was the fastest setup in our test, about 6 seconds per job, but cost about 7.8 cents. GPT-6 Luna cost only 0.12 cents but passed 184 of 186.

What is the #1 AI right now?

There is no single number one in our test. 15 of the 27 models we ranked passed every check on our coding jobs, so price and speed decide. The cheapest of those was Claude Haiku 5.5, at about 0.19 cents per job. Our jobs are small; for big projects the order may differ.

How we checked

Last test day for each of the 27 models, from 7 October to 27 November 2026; most ran in October, the Gemini 4 models Carbon, Hydrogen and Neon and Claude Fable 5.2 in November
Last day of each model's nine runs. Chart by Not an AI App.

We took every result from our own test runs between 6 October and 27 November 2026. Each model had nine runs: three jobs, three tries each, with one request per run. We graded every answer with the same 62 hidden checks per round. The cost per job is the average of the nine runs. The time is the middle value.

Most models ran through OpenRouter, at the prices on the days we ran the tests. We sent one message per request and left the model settings at their defaults. GPT-6.1 Sol and Terra ran through OpenAI's own API; their cost is worked out from the token counts at OpenAI's list price. There we used the model's own default, except where we name a setting: Sol's fast and ultrafast speed settings and Terra's low effort. GPT-6 Luna ran through OpenRouter.

These are small, clear jobs, so many models pass them all. Your results on big projects may differ. Models and prices change, so check the date column. The charts are our own, and none of the images was made by AI.