Models
Claude vs ChatGPT for coding in 2026
Neither lab wins everywhere. What each benchmark actually says, how Claude Code and Codex differ, what each costs, and why many teams use both.
For coding in October 2026, Claude and ChatGPT are close enough that the benchmark you pick decides the winner. On LMArena's WebDev leaderboard, where people vote on real builds, Claude Opus 5.5 is first, GPT-6 Astra second and Claude Sonnet 5.5 third; on the independent Terminal-Bench 4.0 leaderboard, GPT-6 Astra and Claude Fable 5.1 are tied within the margin of error. Each lab's own launch posts show its own models ahead. The bigger practical differences are the coding agents, Claude Code against Codex, and the free tiers: ChatGPT's free plan includes Codex, and Claude's free plan doesn't include Claude Code. Mid-tier prices match: Claude Sonnet 5.5 and GPT-6.1 Sol both cost $2 per million input tokens and $10 per million output.
Key takeaways
- People's votes (LMArena WebDev, October 1): Opus 5.5 at 1815, GPT-6 Astra 1788, Sonnet 5.5 1786, GPT-6.1 Sol 1758.
- Terminal-Bench 4.0 (September 21): GPT-6 Astra 58.2% and Fable 5.1 57.9%, a tie.
- The same prices at both ends: Sonnet 5.5 and GPT-6.1 Sol at $2 / $10, and Claude Haiku 5.5 and GPT-6 Luna at $0.10 / $0.50 (Haiku costs five times that on prompts over 100K tokens).
- In ChatGPT's chat window the model is GPT-5.6 Sol on paid plans and GPT-5.6 Luna on Free; the GPT-6 models run in Codex and ChatGPT Work.
| Claude (Anthropic) | ChatGPT (OpenAI) | |
|---|---|---|
| Top coding models | Fable 5.1, Opus 5.5, Sonnet 5.5 | GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna |
| Mid-tier price per million tokens | Sonnet 5.5: $2 / $10 | GPT-6.1 Sol: $2 / $10 |
| Cheapest model | Haiku 5.5: $0.10 / $0.50 | GPT-6 Luna: $0.10 / $0.50 |
| Context window | 1M | 1.05M |
| Coding agent | Claude Code | Codex |
| Agent on the free plan | No | Yes, GPT-6 Luna in the desktop app |
| Agent CLI open source | No | Yes, Apache 2.0 |
| LMArena WebDev (Oct 1) | Opus 5.5 #1 (1815); Sonnet 5.5 #3 | GPT-6 Astra #2 (1788); GPT-6.1 Sol #4 |
| Terminal-Bench 4.0 (Sep 21) | Fable 5.1: 57.9% | GPT-6 Astra: 58.2% |
| Team seat | $20 to $25 standard; $100 to $125 premium | The same |
How do Claude and ChatGPT compare on coding benchmarks?
Independent results:
- LMArena's code arena, from more than 838,000 votes on web builds as of October 1, 2026: Claude Opus 5.5 (max) 1815, GPT-6 Astra (max) 1788, Claude Sonnet 5.5 (xhigh) 1786, GPT-6.1 Sol (max) 1758, Claude Fable 5.1 (max) 1749.
- Terminal-Bench 4.0, updated September 21: GPT-6 Astra in Codex 58.2% (±2.8) and Claude Fable 5.1 in Claude Code 57.9% (±3.8). It has no entries yet for Opus 5.5, Sonnet 5.5 or GPT-6.1 Sol.
- Vals AI's Terminal-Bench 4.0 run, updated October 1, in one shared harness: Opus 5.5 65.2%, Sonnet 5.5 64.1%, GPT-6 Astra 59.6%, Fable 5.1 58.1%, GPT-6.1 Sol 55.1%. GPT-6.1 Sol cost $1.72 a task against Opus 5.5's $13.20.
The labs' own results favor their own models. Anthropic's Opus 5.5 post puts Opus 5.5 at 66.4% on Terminal-Bench 4.0 against GPT-6 Astra's 57.9%; OpenAI's GPT-6 Astra post puts Astra ahead of Claude Fable 5.1 on FrontierCode, 53.3% to 50.9%, and on DeepSWE, 74.1% to 67.4%. Settings and harnesses differ between posts.
Older leaderboards haven't caught up: SWE-bench's public board was last updated in February 2026 and Aider's polyglot board in November 2025, so neither includes these models.
How do Claude Code and Codex differ?
- Where they run. Claude Code runs in the terminal, VS Code, the Claude desktop app and the web. Codex runs in the ChatGPT desktop app, a CLI, an IDE extension, the web and iOS, plus Codex Cloud tasks.
- Free use. Codex comes with ChatGPT's free plan, with GPT-6 Luna in the desktop app; Claude Code needs a paid plan. Is Codex free? and Is Claude Code free?
- Open source. The Codex CLI is open source under Apache 2.0; Claude Code's isn't.
- Safety controls. Claude Code has permission modes from Manual to Auto, with Auto as the default in the terminal. Codex has sandbox modes, from read-only to full access, with workspace writes and no network as the default.
- Team surfaces. Claude Tag puts Claude in Slack channels for Team and Enterprise; Codex takes work from Slack through @ChatGPT and reviews pull requests on GitHub.
- What they share: a plan mode, GitHub integrations, seats per person, and no way for two people to work in one session.
What does each cost?
- API, per million tokens: Claude Fable 5.1 $10 / $50, Opus 5.5 $4 / $20, Sonnet 5.5 $2 / $10, Haiku 5.5 $0.10 / $0.50 (prompts up to 100K tokens). OpenAI's GPT-6 Astra $10 / $50, GPT-6.1 Sol $2 / $10, GPT-6 Luna $0.10 / $0.50.
- Individual plans: Claude Pro is $17 to $20 a month with Claude Code; ChatGPT Plus is $20 with Codex. Claude Max is $100 or $200; ChatGPT Pro is $100, $200 or $500.
- Team seats cost the same on both: ChatGPT Business vs Claude Team.
Which should you use for coding?
- Building web apps and interfaces: Claude leads the people's votes on LMArena's WebDev board.
- Long terminal and agent tasks: close. Astra and Fable tie on Terminal-Bench; Opus and Sonnet lead Vals AI's run.
- The lowest cost per task: GPT-6.1 Sol on Vals AI's run; GPT-6 Luna and Claude Haiku 5.5 are the cheapest models.
- Starting for free: Codex on ChatGPT's free plan.
- An agent you can read and change: the open-source Codex CLI.
The honest answer is to try both on your own code; the gap between them is smaller than the gap between a vague prompt and a clear one. Within Claude, Sonnet 5.5 vs Opus 5.5 covers which model to pick, and Gemini vs Claude for coding covers Google's models. Beyond code, see ChatGPT vs Claude.
How do you use both on one codebase?
Some teams have one lab review the other's code: a 2026 study found that helped in one direction and hurt in the other (cross-model code review). In Poly (usepoly.co), each person in a room picks Claude, run through Claude Code, or GPT, run through Codex, for their own turns, along with Grok, Kimi and Muse, all in one workspace and git history. When the conversation changes labs, the next model gets a catch-up of what it missed. The free tier includes Claude Sonnet 5.5 and GPT-6 Luna. Multi-model AI coding explains how it works.
Common questions
Is Claude or ChatGPT better for coding?
Neither everywhere. In October 2026 Claude Opus 5.5 leads LMArena's WebDev votes, GPT-6 Astra and Claude Fable 5.1 tie on the independent Terminal-Bench 4.0 leaderboard, and each lab's own benchmarks favor its own models.
Which is cheaper for coding, Claude or ChatGPT?
The mid-tier models cost the same per token: Sonnet 5.5 and GPT-6.1 Sol are both $2 and $10 per million input and output tokens. The cheapest are level too: Claude Haiku 5.5 and OpenAI's GPT-6 Luna both cost $0.10 and $0.50, though Haiku costs five times that on prompts over 100K tokens. ChatGPT's free plan includes Codex while Claude's doesn't include Claude Code.
What is the difference between Claude Code and Codex?
Both are coding agents that read and edit code and run commands. Claude Code needs a paid Claude plan and isn't open source; Codex comes with ChatGPT's free plan in a limited form, has an open-source CLI and adds Codex Cloud tasks on paid plans.
Can I use Claude and ChatGPT together for coding?
Yes. Some teams have one review the other's code, and in a shared room such as Poly each person can pick Claude or GPT for their own turns on the same codebase.