Claude Code cost guide
Claude Code vs Codex cost per month and per token
Claude Code comes with Claude Pro for $20/month. ChatGPT Plus includes Codex for the same price, and ChatGPT Free offers limited desktop access. At standard API rates, Sonnet 4.6 costs $3 per million input tokens and $15 per million output tokens. GPT-6.2 Sol costs $2 and $10 respectively.
Last updated · Published
By CWYN · Published
Prices checked against Claude plans, Codex plans, Anthropic API rates and OpenAI API rates (as of ).
If your existing plan covers the work, compare Claude Code and Codex CLI for reviews, approvals and CI to decide where to run it.
1. Compare access, limits and API billing
For higher Claude Code limits, Max costs $100/month and Ultra costs $200/month. For Codex, ChatGPT Go costs $8/month and has the same desktop-only rollout as Free. Plus includes the CLI. ChatGPT Pro offers higher allowances at $100, $200 or $500 per month.
Estimate your own monthly bill with the free AI cost calculator.
| Budget item | Claude Code | OpenAI Codex |
|---|---|---|
| Free access | Claude Free covers limited chat. Claude Code access through a subscription starts on a paid plan. Claude plans (as of ). | Limited access to ChatGPT and Codex. ChatGPT plans (as of ). |
| Monthly plan example | Claude Pro costs $20 per month. Includes Claude Code within shared plan limits. Claude Pro terms (as of ). | ChatGPT Plus costs $20 per month. Includes expanded Codex usage. ChatGPT Plus terms (as of ). |
| Included usage | Claude Code shares the Claude plan allowance. Anthropic leaves the absolute limit unpublished. Claude limits (as of ). | For gpt-6.2-sol on Plus or Business Standard, OpenAI estimates 17 to 180 local messages per five hours. On Nov 25, 2026 at 9:50 PM ET, OpenAI’s Tibo reported a fix for a launch billing mistake that discounted GPT-6.2 Astra and Sol usage. Compared with last week, you reach limits 40% faster on GPT-6.2 Astra and 25% faster on GPT-6.2 Sol. Both still go further than GPT-6 Astra and GPT-6.1 Sol, respectively. Other models are unaffected. There is no charge for past usage. Go, Plus, Pro and Business each get one banked reset. Tibo’s billing update (as of ). At 10:51 AM ET on Nov 26, 2026, OpenAI’s pricing page still listed 6 to 50 local messages per five hours for GPT-6.2 Astra and 17 to 180 for GPT-6.2 Sol. The published credit rates were unchanged. Codex pricing and limits (as of ). |
| Direct API key | Claude Sonnet 4.6 costs $3 for regular input, $0.3 for cache reads and $15 for output, per million tokens. Anthropic API rates (as of ). | gpt-6.2-sol costs $2 for regular input, $0.1 for cache reads and $10 for output, per million tokens. OpenAI API rates (as of ). |
For the reset details and what to check before your next task, see why Codex reaches usage limits faster on GPT-6.2.
2. Run the same workload through both rate cards
The calculator's Coding agent preset assumes 4 sessions a day. 30 turns × (3,000 system + 16,000 history + 1,000 user) = 600,000 input tokens per session. 30 × 800 output = 24,000 output tokens per session. Over 30 days that gives 4 × 30 = 120 sessions.
The calculator models a growing conversation. It counts an eligible repeated prefix as a cache read and new cacheable input as a write. The ledger assumes live sessions and the standard rate for each request. Token counts in the ledger are rounded for display. Totals use the unrounded charges.
Claude Sonnet 4.6
| Charge | Tokens × rate per million ÷ 1,000,000 | Cost |
|---|---|---|
| Regular input | 0 × $3 ÷ 1,000,000 | $0.00 |
| Cache reads | 67,354,839 × $0.3 ÷ 1,000,000 | $20.21 |
| Cache writes (5m) | 4,645,161 × $3.75 ÷ 1,000,000 | $17.42 |
| Output | 2,880,000 × $15 ÷ 1,000,000 | $43.20 |
The 30-day total is $80.83. Daily estimate $80.83 ÷ 30 ≈ $2.69. Anthropic rates for Claude Sonnet 4.6 (as of ).
gpt-6.2-sol
| Charge | Tokens × rate per million ÷ 1,000,000 | Cost |
|---|---|---|
| Regular input | 0 × $2 ÷ 1,000,000 | $0.00 |
| Cache reads | 67,354,839 × $0.1 ÷ 1,000,000 | $6.74 |
| Cache writes (30m) | 4,645,161 × $2.5 ÷ 1,000,000 | $11.61 |
| Output | 2,880,000 × $10 ÷ 1,000,000 | $28.80 |
The 30-day total is $47.15. Daily estimate $47.15 ÷ 30 ≈ $1.57. OpenAI rates for gpt-6.2-sol (as of ).
Compare the cache-write and output lines first. Both examples use the same sessions, turns and token counts. The differences here come from the two models' rates and cache rules. To estimate the cost of one Claude Code session, use the turn count and cached input from one of your own tasks. Use the AI model comparison if model capability is also part of your decision.
3. What changes the number?
- The model you choose. Keep the task and run count fixed when comparing rate cards. Then repeat the task with each model and price the actual token counts if they differ.
- Cache reads and writes. Both API examples charge less for reading cached input than for sending fresh input. When the model writes tokens to the cache, use its write rate for those tokens. The workload tables show each charge separately.
- Plan usage. A busy period can hit a shared allowance even when the monthly fee looks attractive. Compare the limit for your actual plan and model with the timing of your work. Claude plan pricing (as of ). Codex pricing (research sheet as of ).
4. Claude Code and Codex cost FAQ
Can I treat a Codex message as one Claude Code session?
The Codex figure is an estimated range of local messages in a five-hour window on specific plans. Claude gives no absolute session count. Measure a finished task on each API for a comparison with a common unit. Codex pricing (research sheet as of ). Claude plan pricing (as of ).
Which costs less if I already subscribe?
Compare the additional charges for the work you want to move. If it fits in a plan you are already keeping, using that allowance adds no new plan fee. If a separate API key will run the task, budget for the metered calls. For Claude, the plan and API break-even guide lets you enter your own total.
For work that starts in chat, compare OpenClaw and Claude Code on the same model.