For coding, Claude scores higher and ChatGPT costs less.
As of November 10, 2026, Claude Opus 5.5 ranks 2nd on our coding board at 82.4. GPT-6 Astra, OpenAI's best coding model, ranks 6th at 74.0.
That gap shrinks when someone other than the developer runs the test. And the cheapest strong option is OpenAI's. On one independent bug-fixing benchmark, Codex with GPT-6.1 Sol fixed 44.3 bugs for $5.88, and Claude Code with Sonnet 5.5 fixed 51.3 for $154.03.
So pick Claude when a missed bug costs more than the tokens. Pick ChatGPT when you run the agent all day on a budget.
Claude holds the top three places on our coding board
Our coding ranking combines the coding benchmarks we track into one score per model. On November 10, 2026, Anthropic models held the first three places and OpenAI's best sat 6th.
| Coding rank, November 10, 2026 | Model | App | Score | Evidence |
|---|---|---|---|---|
| 1 | Claude Fable 5.2 | Claude | 86.9 | Estimated |
| 2 | Claude Opus 5.5 | Claude | 82.4 | Supported |
| 3 | Claude Sonnet 5.5 | Claude | 81.4 | Supported |
| 6 | GPT-6 Astra | ChatGPT | 74.0 | Supported |
| 11 | GPT-6.1 Sol | ChatGPT | 69.4 | Supported |
| 42 | GPT-6 Luna | ChatGPT | 51.7 | Supported |
Supported means we have enough independent evidence to stand behind the row. Estimated means the rank is visible and the uncertainty is wider. Fable 5.2 launched on November 9, so its first place rests mostly on Anthropic's launch results and our estimate, with only one outside test so far. We'd treat Opus 5.5 as the Claude leader until that changes.
Opus 5.5 leads GPT-6 Astra by 8.4 points. Those are point estimates. The 90% ranges around them overlap, with Astra's upper bound at 83.5 and Opus's lower bound at 75.1, and our uncertainty policy hasn't validated those ranges yet. What the board establishes is an order, with Claude ahead. It doesn't establish how far ahead in a way you'd feel on your own repository.
The two companies also publish different things. Our SWE-bench Pro page has Opus 5.5 at 89.9% and Sonnet 5.5 at 81.3%, both from Anthropic's system cards, and no GPT-6 row. OpenAI's newest result there is GPT-5.6 Sol at 64.6%, and in July OpenAI stopped recommending the benchmark after estimating that about 30% of its public tasks are broken. On a test only one side still reports, the comparison you want doesn't exist. That's why we lean on the tests where an outside party ran both companies' models, which is the next section.
The gap narrows when an outside party runs the test
Terminal-Bench 4.0 asks an agent to finish real command-line tasks, such as getting a build to pass or configuring a server, and checks the end state. It's the closest public test to what Claude Code and Codex do, and three sources publish numbers for it.
| Terminal-Bench 4.0 | Developer's launch post | Official board, Oct 19 snapshot | Artificial Analysis |
|---|---|---|---|
| Claude Opus 5.5 | 66.4% | 64.85% (Claude Code) | 59.6% |
| Claude Sonnet 5.5 | 70.6% | 61.82% (Claude Code) | 63.6% |
| GPT-6 Astra | 57.9% | 58.18% (Codex) | 59.1% |
| GPT-6.1 Sol | Not published | 58.18% (Codex) | 56.1% |
Anthropic's own posts put Sonnet 5.5 12.7 points ahead of GPT-6 Astra. The official leaderboard lists each model inside its maker's agent, and at max reasoning it puts the best Claude configuration 6.7 points ahead. Artificial Analysis, running all four through its own harness, has Opus 5.5 and GPT-6 Astra half a point apart, with Sonnet 5.5 four points clear of both.
OpenAI's launch number for Astra lands within about a point of both outside runs. Anthropic's numbers come down when someone else runs them, by 1.6 to 8.8 points depending on the source. We can't say from these rows why. Prompting, retries, time limits, and reasoning settings all differ between harnesses, and none of the three publishes enough to separate them.
What the table does support is narrower than the coding board. Claude stays first or tied on every independent run of Terminal-Bench 4.0. The margin on terminal work is somewhere between zero and seven points, not the twelve in the launch post.
Per bug fixed, Codex costs a fraction of Claude Code
Bug Hunt Bench is the one coding test we track that records what each run cost. It plants 105 bugs in two production TypeScript repositories, gives each model one round in its maker's command-line agent, and has an independent judge check the diff against a withheld answer key. Only verified fixes count.
We divided each configuration's list-rate cost by its fixes. These are the publisher's October 14 rows at max reasoning, averaged over three runs.
| Bug Hunt Bench, max reasoning | Agent | Bugs fixed of 105 | Run cost at list rates | Cost per fix |
|---|---|---|---|---|
| Claude Sonnet 5.5 | Claude Code | 51.3 | $154.03 | $3.00 |
| GPT-6 Astra | Codex CLI | 45.0 | $33.03 | $0.73 |
| GPT-6.1 Sol | Codex CLI | 44.3 | $5.88 | $0.13 |
| Claude Opus 5.5 | Claude Code | 41.7 | $58.53 | $1.40 |
| GPT-6 Luna | Codex CLI | 18.3 | $0.52 | $0.03 |
Sonnet 5.5 in Claude Code fixed the most bugs, seven more than GPT-6.1 Sol. It paid 23 times as much per fix to do it. Opus 5.5 fixed fewer bugs than GPT-6 Astra and GPT-6.1 Sol here, which runs against its coding rank and is a useful reminder that one repository set in one language can rank models differently from the average.
Dropping Claude to xhigh reasoning cuts the bill but also the score. Opus 5.5 and Sonnet 5.5 each fixed 36.0 bugs at xhigh, for $34.98 and $42.86, which is still more per fix than GPT-6 Astra at max.
Sonnet 5.5 and GPT-6.1 Sol have the same list price, $2 per million input tokens and $10 per million output. So the 26-fold gap in run cost isn't a pricing difference. Claude Code with Sonnet used roughly that many more tokens on the same two repositories.
One clarification, though: these are API list rates. On a $20 or $200 subscription you don't pay per token, but you do run into usage limits, and an agent that burns more tokens on the same job reaches them sooner. That's the cost a subscriber feels, as a limit reached on a Tuesday afternoon rather than a bill.
The free plans give you opposite halves
The model you get depends on the plan. These rows come from OpenAI's and Anthropic's plan pages, which we read on October 16, 2026, and the app features we rechecked on November 10.
| Plan | Price a month | Coding agent | Models listed | Usage stated |
|---|---|---|---|---|
| ChatGPT Free | $0 | Codex, limited | GPT-6 Luna in Codex, GPT-5.6 Terra with limited access | Not itemized |
| Claude Free | $0 | None | Sonnet and Haiku | Five-hour session limit, not itemized |
| ChatGPT Plus | $20 | Codex | GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol, and GPT-6 Luna in Codex | 5 to 45 Astra messages or 15 to 160 GPT-6.1 Sol messages per five hours, and weekly limits may apply |
| Claude Pro | $20 ($17 billed yearly) | Claude Code | Opus, Sonnet, and Haiku. Fable only through paid usage credits | At least 5x Free per five-hour session, plus a weekly limit |
Claude's free chat runs Sonnet, which ranks 3rd on our coding board, but there's no agent to run it in your repository. ChatGPT's free tier gives you an agent, but the model in it is GPT-6 Luna, 42nd on the same board, and on Bug Hunt Bench it fixed 18.3 bugs to Sonnet's 51.3.
At $20 both apps give you an agent and a top-ten coding model. OpenAI publishes message ranges and Anthropic publishes a multiple of its free tier, so the two allowances can't be compared directly. The cost-per-fix table suggests which way it leans: work that fits in a Plus allowance on GPT-6.1 Sol would use up a Pro allowance faster on Sonnet or Opus. Our coding plan comparison has the Max and Pro tiers above $20, and the Claude usage limits page tracks how Anthropic's limits work.
What a failure costs you decides the pick
We'd make the choice by asking what a failure costs you and how many hours a day the agent runs.
| Your situation | Our pick | Where the pick loses |
|---|---|---|
| Hard bugs in a large codebase, where a missed fix costs hours | Claude Pro with Opus 5.5 or Sonnet 5.5 in Claude Code | If the agent runs all day, you'll likely reach the limits before a Plus subscriber on GPT-6.1 Sol does |
| An agent running long sessions on routine changes | ChatGPT Plus with GPT-6.1 Sol in Codex | On Bug Hunt Bench it fixed seven fewer bugs than Sonnet 5.5 |
| Learning to code, asking why something fails | Claude Free, chatting with Sonnet | You paste code into a chat window, because there's no agent on the free plan |
| Trying an agent without paying | ChatGPT Free with Codex | GPT-6 Luna fixed about a third as many bugs as Sonnet 5.5 |
| Front-end pages and visual design | Either | Design Arena's website board has Opus 5.5 at 1335, Sonnet 5.5 at 1324, and GPT-6.1 Sol at 1321 |
For front-end work the scores don't separate the apps. Those three ratings sit within 14 points of each other on an Elo-style scale built from people's votes, which is too close for us to pick an app on, so use the one you prefer to work in.
The one model we'd hold off on is Fable 5.2. It tops the coding board on an estimated score, and on Pro it runs only through usage credits billed at API rates of $8 and $40 per million input and output tokens. Cursor's November 9 snapshot of CursorBench 4.0 gives the first outside read: Fable 5.2 at max effort scored 60.0 against 57.8 for Opus 5.5, at $32.79 per task against $13.43. That's two points for well over twice the cost, which suits a hard problem and not an agent left running all day.
You don't have to choose only one. If you can pay for both, the split we'd suggest is Plus for long Codex sessions and Pro for the problems Codex gets stuck on. At $40 a month, that's still less than either company's next plan up, which starts at $100.
Three missing results would change this comparison
We compared models and their makers' agents. Plenty of developers reach Claude and GPT models through Cursor, GitHub Copilot, or an API key in another tool, and none of the agent rows above test those setups. If you work in Cursor, CursorBench is the closer test. We left it out of the main comparison because its newest OpenAI rows are GPT-5.6 models, not GPT-6.
Three gaps would change this post. Independent Terminal-Bench and Bug Hunt Bench runs for Fable 5.2 would tell us whether Anthropic's newest model belongs in the first row. A GPT-6 row on CursorBench would show how OpenAI's current models do inside the editor many developers already work in. And published Claude Pro message counts would let anyone compare the two $20 plans directly.
Until then, the number to watch is cost per fix. Claude's best configuration fixes the most bugs, OpenAI's fixes them for the least, and the next model release on either side will move one of those two columns. The full ranking lives on our coding leaderboard, the head-to-head app comparison is on ChatGPT vs Claude, and the method for testing a shortlist on your own code is in how to evaluate an LLM.
Frequently asked questions
01Is Claude or ChatGPT better for learning to code?
For explanations in a chat window, the free tiers favor Claude. Claude Free runs Sonnet, and Claude Sonnet 5.5 ranks 3rd on our coding board, while ChatGPT Free's coding agent runs GPT-6 Luna, which ranks 42nd. A beginner asking why code fails gets the stronger model from Claude without paying anything.
02Which Claude model is best for coding?
Claude Opus 5.5 is the best Claude model for coding that we can stand behind, at 82.4 and 2nd place on November 10, 2026. Claude Fable 5.2 ranks 1st, but that score is estimated a day after launch. Sonnet 5.5 sits one point below Opus at half the API price, so it's the better default for most work.
03Is Claude Code better than Codex?
On the official Terminal-Bench 4.0 board, Claude Code with Opus 5.5 completed 64.85% of tasks and Codex with GPT-6 Astra 58.18%. On Bug Hunt Bench, Claude Code with Sonnet 5.5 fixed the most bugs, but Codex with GPT-6.1 Sol fixed 44.3 of 105 for about 13 cents each, against $3.00 for Claude.
04Can I use Claude Code or Codex for free?
Codex, yes, with limits. As of October 16, 2026, OpenAI's pricing page lists limited Codex access on ChatGPT Free, running GPT-6 Luna. Claude Code starts with the $20 Pro plan, and Claude Free covers chat with Sonnet and Haiku but no coding agent. Both companies also sell API access billed by the token.
