Claude Code vs Codex Cost: Plans, Limits, and the Real API Bill
Both tools sell $20, $100, and $200 tiers, but equal sticker prices do not buy equal capacity. Identify the bill first, then measure accepted work before upgrading.
On this page

Claude Code and Codex look deceptively easy to compare. Both have a $20 individual plan and heavier $100 and $200 tiers. That symmetry ends as soon as work starts: each vendor pools usage differently, model choice changes consumption, and an API key moves the same-looking terminal session onto a separate pay-as-you-go bill.
The safest default on August 31, 2026 is to buy one $20 plan for a month, measure what reaches review, and upgrade only when the same limit repeatedly blocks accepted work. If the work runs in CI, batch jobs, or a shared automation environment, skip subscription-capacity guesses and build an API cost model instead.
Find the bill before comparing prices
The product name does not identify the billing route. Authentication does.
| Session | Billing owner | First place to verify |
|---|---|---|
| Codex signed in with ChatGPT | ChatGPT Free, Go, Plus, Pro, or Business | Codex usage dashboard and /status |
| Codex signed in with an API key | OpenAI Platform project | Platform usage, budget, and model rate |
| Claude Code signed in with Claude | Claude Pro, Max, or Team | Settings > Usage and /status |
Claude Code with ANTHROPIC_API_KEY | Anthropic Console/API | Console usage, balance, and auto-reload |
This split explains a common surprise: paying for ChatGPT Plus does not pay an OpenAI API invoice, and paying for Claude Pro does not include Claude Console API usage. Anthropic's Claude Code billing guide also says an ANTHROPIC_API_KEY can take precedence over subscription authentication. If you want a fixed plan budget, verify the active login and decline the move to usage credits when the included allowance runs out.

Personal plans: the current sticker prices
OpenAI's current Codex pricing page lists Free at $0, Go at $8, Plus at $20, Pro 5x at $100, and Pro 20x at $200 per month. Plus includes Codex across the web, CLI, IDE extension, and other eligible surfaces. API-key use is a separate usage-based route.
Anthropic's current Claude pricing page lists Pro at $20 monthly or $200 prepaid annually (about $17 per month), Max 5x at $100, and Max 20x at $200. Claude Code is included in paid individual plans. Taxes, supported locations, local currency, and mobile-store pricing can change the checkout total.
| Monthly budget | Codex route | Claude Code route | What the tier is good for |
|---|---|---|---|
| $0 | Codex Free | Claude Free is not the paid Claude Code route | A lightweight fit check, not a capacity forecast |
| $8 | Codex Go | No matching individual tier | Occasional, lightweight Codex work |
| $20 | Codex Plus | Claude Pro | The best first month for most buyers |
| $100 | Codex Pro 5x | Claude Max 5x | Repeated, measured pressure on the $20 tier |
| $200 | Codex Pro 20x | Claude Max 20x | Heavy daily work; still subject to limits |
Do not read “5x” as a cross-vendor unit. It describes a multiplier over each company's own baseline, not an equivalent number of tokens, prompts, or completed tasks. OpenAI says Codex consumption varies with model, context, reasoning, tools, retrieval, and caching; local messages and cloud chats share a five-hour window, and weekly limits may also apply. Anthropic pools Claude and Claude Code activity and uses rolling five-hour plus weekly limits. Neither subscription is a fixed token bucket that can be converted cleanly into the other.
API cost: compare the same workload
For integrations that still pin the earlier models, see the Opus 4.6 versus GPT-5.3-Codex comparison for their API rates, cache costs, and context limits.
A useful API estimate needs more than the headline input rate:
monthly cost = uncached input MTok × input rate
+ cached input MTok × cache-read rate
+ output MTok × output rate
+ tools, retries, service tiers, and long-context premiumsOpenAI's GPT-5.6 Sol model page currently lists $4 per million input tokens and $20 per million output tokens. A request above 272K input tokens is priced at 2x input and 1.5x output for the whole request; cache writes also have a separate multiplier.
Anthropic currently lists Sonnet 5 at $2 input and $10 output, Opus 5 at $5 and $25, and Fable 5 at $10 and $50 per million tokens. Prompt caching, fast mode, US-only inference, and tools can add different charges. Claude Code may select a model automatically or follow user configuration, so Sonnet's price is not a universal Claude Code rate.
For a transparent example, assume 100 coding tasks in a month produce 5 million uncached input tokens and 0.5 million output tokens. Ignore caching, tools, retries, and long-context premiums:
| API model | Calculation | Example bill |
|---|---|---|
| GPT-5.6 Sol | 5 × $4 + 0.5 × $20 | $30 |
| Claude Sonnet 5 | 5 × $2 + 0.5 × $10 | $15 |
| Claude Opus 5 | 5 × $5 + 0.5 × $25 | $37.50 |
| Claude Fable 5 | 5 × $10 + 0.5 × $50 | $75 |

This is arithmetic, not a quality benchmark or predicted bill. Coding agents repeatedly send instructions, files, diffs, test output, and tool results. Cache hit rate, automatic model routing, failed attempts, and oversized context can move the result far more than the first price-table comparison suggests.
Which $20 plan should you start with?
Choose based on how work enters the tool.
- Start with Codex Plus when tasks are already scoped and you want local, IDE, web, cloud, and review surfaces under one plan.
- Start with Claude Pro when the job is a long local repository conversation with frequent steering, unstaged state, and granular permission decisions.
- Use an API key and project budget when the workload belongs to CI, scheduled automation, or a team-owned service.
- Avoid buying both high tiers for occasional work. A free or $8 Codex route, or one paid month on either side, produces better evidence.
The $20 month is a calibration period, not a lifetime commitment. Use the Codex token and context guide to identify the active OpenAI meter. If Claude Code is the bottleneck, the Claude Pro versus Max guide separates plan pressure from context waste.
Upgrade only after the limit costs more than the plan
Track at least two representative weeks. For each task, record the task type, selected model, time to first usable result, human review minutes, whether the result was accepted, whether a limit interrupted it, and the minutes needed to recover.
An upgrade is justified only when all three are true:
- The same limit appears on several working days.
- The limit blocks deliverable work rather than exposing a vague task, bloated context, or missing tests.
- The interruption cost you expect to remove exceeds the additional $80 or $180 per month.
If Claude Code becomes slower as a session grows, clear or compact context, reduce unnecessary tools, and narrow the task before buying Max. If Codex repeatedly returns broad diffs that are expensive to review, improve the task contract and acceptance command before buying Pro. More allowance makes an inefficient loop larger; it does not repair it. Unexpected Anthropic charges should first go through the Claude extra-usage billing router.
Team seats do not equal team cost
OpenAI Business currently costs $20 per user per month when billed annually or $25 monthly. Anthropic Team Standard uses the same annual/monthly sticker prices, while Premium seats cost $100 annually billed or $125 monthly. Enterprise agreements, overages, security controls, and support terms sit outside those simple rows.
For a team, calculate the cost of accepted work:
cost per accepted unit =
(seats + API/PAYG + human review + failed-run recovery) / accepted unitsIdle seats, duplicated attempts, review time, context rebuilding, and incident recovery can outweigh a small model-rate difference. When local and cloud agents share the workload, the local versus cloud coding-agent cost guide helps assign the bill and execution risk to the right owner.
The buying decision
For most individual developers, $20 is the sensible starting point. Choose Codex when scoped delegation, cloud work, and review matter most; choose Claude Code when sustained local exploration and interactive steering dominate. Move to $100 or $200 only after your usage record shows that interruptions—not task design or context hygiene—are the recurring bottleneck.
For API work, hold the workload constant and calculate uncached input, cached input, output, tools, retries, and long-context pricing. For teams, combine seats, PAYG, and human review into cost per accepted unit. Equal sticker prices then stop looking like equivalent products, which is exactly the distinction a useful budget needs.





