Skip to main content

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.

LaoZhang AI TeamPublishedUpdated 6 min read
On this page
Cost decision board for Claude Code and Codex subscriptions, API billing, and accepted work

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.

SessionBilling ownerFirst place to verify
Codex signed in with ChatGPTChatGPT Free, Go, Plus, Pro, or BusinessCodex usage dashboard and /status
Codex signed in with an API keyOpenAI Platform projectPlatform usage, budget, and model rate
Claude Code signed in with ClaudeClaude Pro, Max, or TeamSettings > Usage and /status
Claude Code with ANTHROPIC_API_KEYAnthropic Console/APIConsole 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.

Billing-route visual for Codex and Claude Code subscription logins, API keys, and bill owners

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 budgetCodex routeClaude Code routeWhat the tier is good for
$0Codex FreeClaude Free is not the paid Claude Code routeA lightweight fit check, not a capacity forecast
$8Codex GoNo matching individual tierOccasional, lightweight Codex work
$20Codex PlusClaude ProThe best first month for most buyers
$100Codex Pro 5xClaude Max 5xRepeated, measured pressure on the $20 tier
$200Codex Pro 20xClaude Max 20xHeavy 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 premiums

OpenAI'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 modelCalculationExample bill
GPT-5.6 Sol5 × $4 + 0.5 × $20$30
Claude Sonnet 55 × $2 + 0.5 × $10$15
Claude Opus 55 × $5 + 0.5 × $25$37.50
Claude Fable 55 × $10 + 0.5 × $50$75

Comparable-workload cost visual for Codex and Claude models using the same input and output volume

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:

  1. The same limit appears on several working days.
  2. The limit blocks deliverable work rather than exposing a vague task, bloated context, or missing tests.
  3. 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 units

Idle 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.

OpenAI Codex March 2026 capability stack showing GPT-5.4, app workflows, security, and mini subagents
Developer Tools & Agents

OpenAI Codex in March 2026: What's New and What It Can Do Now

March 2026 was the month Codex started making sense as a full agent system rather than a loose collection of surfaces. GPT-5.4 became the new core model, GPT-5.4 mini changed cheaper task routing, Codex Security entered research preview, and the app made parallel agents, worktrees, skills, and automations much easier to use.

11 min
Codex Usage dashboard with separate five-hour and weekly windows plus wait, reset, credits, and API paths
Developer Tools & Agents

Codex Weekly Limit Reset: Find Your Time or Reset Now

There is no universal Codex reset day. Use your account’s Usage page to find the actual time, then decide whether to wait, buy an eligible instant reset, use a banked reset, spend credits, or switch to separately billed API usage.

8 min