Codex vs Claude Code: Price and Cost per Task
Codex and Claude Code both offer a paid plan with terminal access. This comparison uses the published US list prices and standard API rates checked November 25, 2026. The task examples start with the same token counts. Paying for one large API request and using a monthly subscription can produce different bills.
Plans, limits and token rates
| Comparison | Codex | Claude Code |
|---|---|---|
| Entry plan with CLI | ChatGPT Plus · $20/month | Claude Pro · $20/month or $200/year |
| Higher individual tiers | Pro 100 · $100 / Pro 200 · $200 / Pro 500 · $500 | Max · $100 / Ultra · $200 |
| Team seat per month | Business Standard $25, Premium $125. Annual billing brings the monthly equivalents to $20 and $100. | Team Standard $25, Premium $125. Annual billing brings the monthly equivalents to $20 and $100. |
| Included usage | On Plus, roughly 17–180 local GPT-6.2 Sol messages per 5h. Weekly limits can also apply. Pro tiers have a weekly allowance and no 5h cap. | Pro shares its 5h and weekly allowance with Claude chat. Max has 5× Pro’s usage in both windows. Ultra has 10× Pro’s weekly usage and removes the 5h cap for verified accounts. |
| After included usage | Wait for reset, buy eligible credits, or switch local work to API-key billing. | Wait for reset, upgrade or enable usage credits at Standard API rates. |
| API USD per 1M tokens (new input / cache read / output) | GPT-6.2 Sol · $2.00 / $0.10 / $10.00 | Claude Sonnet 5.5 · $2.00 / $0.10 / $10.00 |
| Model context window | GPT-6.2 Sol · 1,050,000 tokens, up to 922,000 input. | Claude Sonnet 5.5 · 1 million tokens. |
| Editor and terminal access | Codex CLI, VS Code extension (also Cursor and Windsurf), JetBrains and Xcode integrations. | Claude Code CLI, VS Code extension (also Cursor), JetBrains plugin, desktop and web. |
OpenAI does not publish a fixed monthly token allowance for ChatGPT plans. Anthropic likewise says task length, model and files determine when a rolling window is reached. Check the account usage page for your remaining usage. OpenAI Codex pricing · Claude plans · Claude API rates · Codex IDEs · Claude Code clients
API cost for one coding task
The estimates below charge every token at standard API rates. They exclude cached input, tools, taxes and subscription allowances. Large Codex requests over 272k input tokens use the higher GPT-6.2 Sol long-context rates.
| Task | Input tokens | Output tokens | GPT-6.2 Sol | Sonnet 5.5 |
|---|---|---|---|---|
| Small fix | 10,000 | 2,000 | $0.04 | $0.04 |
| Medium feature | 100,000 | 10,000 | $0.30 | $0.30 |
| Large refactor | 500,000 | 50,000 | $2.75 | $1.50 |
The refactor row puts all 500,000 input tokens into one request. If the same totals were spread over five requests of 100,000 inputs each, GPT-6.2 Sol would cost $1.50 instead of $2.75. Sonnet 5.5 stays at $1.50 in both cases. Actual agents can reread files or tokenize the same text differently. OpenAI rate thresholds · Claude model specifications
For a task that fits an active subscription allowance, the incremental subscription cost is $0. Use the API prices for API-key sessions. For signed-in Codex overage, apply your credit purchase price. Codex pricing calculator · Claude API pricing
Choose by published price and allowance
- Choose Codex when a $20 Plus seat and its published local-message window covers your weekly work, or when you need Pro 100/200/500 tiers and OpenAI's credit option.
- Choose Claude Code if paying $200 up front for a year of Claude Pro fits your budget (about $16.67 per month), or when Max and Ultra's stated 5×/10× multipliers match your workload.
- For teams, both products publish the same $25 Standard and $125 Premium monthly seat prices in their current US pages. Compare the shared allowance and admin agreement your workspace receives.
FAQ
Do subscriptions include the API?
An API key uses the provider’s API billing account. Eligible ChatGPT Pro subscriptions can claim API credits for other integrations. OpenAI explicitly excludes Codex API-key sessions from that grant. Claude Max and Ultra list $100 and $200 monthly Claude Platform credits, respectively, subject to the plan terms. OpenAI API credit terms
Are the message numbers fixed?
No. OpenAI gives ranges and Anthropic gives relative multipliers. Context, reasoning, tools, model and speed all change consumption.
Does one tool always have the lower cost per task?
The two chosen models tie at $0.04 for the small fix. For one large prompt, the GPT-6.2 Sol long-context rate makes Sonnet 5.5 cheaper at the same token counts. The size of each individual API request matters.
Where can I see live usage?
OpenAI shows current limits and reset times in its usage dashboard. Claude shows remaining capacity in Settings → Usage.