AI cost comparison
Claude Code vs Codex cost
Claude Sonnet 5.5 and GPT-6.1 Sol have the same list price ($2 in, $10 out per million tokens), and the subscriptions line up too: $20, then $100 and $200. Enter your sessions to see where the bills differ.
Your inputs
Result
Claude Code $150 vs Codex $150 a month at API prices
For 420 sessions, the two cost the same. On subscriptions both start at $20 and have $100 and $200 tiers; ChatGPT Pro also has a $500 tier.
- Session on Claude Sonnet 5.5
- $0.36
- Session on GPT-6.1 Sol
- $0.368.1 Codex credits
- Claude Code on the API
- $150 a month
- Codex on an API key
- $150 a month
- Codex credits per month
- 3,404used after a ChatGPT plan's included limits
Worked examples
Each row is the calculator run on the inputs shown, with every other input at its default.
| Pairing | Sessions a day | Claude Code (API) | Codex (API key) |
|---|---|---|---|
| Sonnet 5.5 vs GPT-6.1 Sol | 20 | $150 a month | $150 a month |
| Opus 5.5 vs GPT-6 Astra | 20 | $300 a month | $1,006 a month |
| Opus 5.5 vs GPT-6.1 Sol | 20 | $300 a month | $150 a month |
| Haiku 5.5 vs GPT-6 Luna | 20 | $10.06 a month | $10.06 a month |
| Sonnet 5.5 vs GPT-6.1 Terra | 20 | $150 a month | $74.91 a month |
| Fable 5.1 vs GPT-6 Astra, light use | 5 | $155 a month | $251 a month |
How it is calculated
The calculator runs the same agent session through both price lists.
Claude cache writes are priced at the 5-minute rate (1.25 times input); OpenAI cache writes at the 30-minute rate ($2.50 per million on GPT-6.1 Sol). Cache reads cost a tenth of input on Sonnet 5.5 and on GPT-6.1 Sol, so the two price lists match almost line for line.
A session is Anthropic's example Claude Code session (940,000 cache reads, 50,000 cache writes, 1,200 input and 5,300 output tokens) raised by 30% for the Claude 4.7 and later tokenizer. GPT models use a different tokenizer, and the two agents read different amounts of context for the same task, so treat the comparison as like for like on tokens, not on tasks.
Codex credits use OpenAI's published credit rates. Cache writes have no separate credit charge, so they are counted at the input rate.
Questions
Is Claude Code or Codex cheaper?
At API prices Claude Sonnet 5.5 and GPT-6.1 Sol cost the same per token, so the bill depends on how many tokens each agent uses for your tasks. On subscriptions both start at $20 a month with $100 and $200 tiers; ChatGPT Pro adds a $500 tier with Ultrafast mode.
What does Codex cost per month?
Codex is included in ChatGPT Plus ($20), Pro ($100, $200 or $500) and Business ($20 per seat yearly). On an API key it costs OpenAI API prices with no monthly fee.
What does Claude Code cost per month?
Claude Code is included in Pro ($20, or $17 yearly) and Max ($100 or $200). On the API, Anthropic reports $150 to $250 per developer per month on average across enterprise deployments.
Which is cheaper for heavy use?
Compare your API-priced usage with the $100 and $200 tiers of each. Claude Max also includes $100 or $200 a month of API credits, which helps if you build on the Claude API as well.
Sources
- Anthropic: Claude API pricing, checked 2026-10-29
- OpenAI: API pricing, checked 2026-10-29
- OpenAI: Codex pricing, checked 2026-10-29
- Anthropic: Claude plans and pricing, checked 2026-10-29
- Claude Code docs: Manage costs effectively, checked 2026-10-29. Example session and average cost per developer
Prices and plans change. This page was last checked on 2026-10-29. The data is open: llm-prices.json, ai-plans.json (CC BY 4.0).