Pro for $12/month, for life · first 100 customers only. Claim your spot →

AI coding cost calculator: Claude Code vs Codex

Tell it how many hours a week your AI agent works and how you use it. You'll see roughly how many tokens that is, what it would cost on pay-as-you-go pricing, and which Claude or ChatGPT plan fits. No account needed.

10 h

Count the time it's actually building, not the time your laptop is open.

How do you work with it?
Which model do you use most?

Claude Code

Best plan for you

Claude Pro · $20/month

Includes Claude Code. Limits reset every five hours, with a weekly cap.

Tokens a month
~130 million
Same use on the API
~$69/month

The plan saves you about $49 a month compared with paying per use on Sonnet 5.5. If the limits keep stopping you, move up to Claude Max 5x ($100/month).

Codex

Best plan for you

ChatGPT Plus · $20/month

Includes Codex. Limits reset every five hours, with a weekly cap.

Tokens a month
~130 million
Same use on the API
~$69/month

The plan saves you about $49 a month compared with paying per use on GPT-6.1 Sol. If the limits keep stopping you, move up to ChatGPT Pro ($100/month).

A rough guide, not a quote. Anthropic and OpenAI don't publish exact limits per plan, and your token use depends on your project. API prices from claude.com/pricing and the Codex rate card, checked October 28, 2026.

Claude Code and Codex plans compared

Both tools come with a monthly plan. Each plan has usage limits that reset every few hours and every week. When you reach them you wait, buy extra usage, or move up a plan.

PlanPriceWhat you get
Claude Pro$20/monthIncludes Claude Code. Limits reset every five hours, with a weekly cap.
Claude Max 5x$100/monthFive times the usage of Pro, for building most days.
Claude Max 20x$200/monthTwenty times the usage of Pro, for all-day use.
ChatGPT Plus$20/monthIncludes Codex. Limits reset every five hours, with a weekly cap.
ChatGPT Pro$100/monthNo five-hour limit at the moment, only weekly limits.
ChatGPT Pro$200/monthMore weekly usage, for long agent runs every day.
ChatGPT Pro$500/monthThe largest personal plan, for agents running all day.

How the calculator works

An AI agent like Claude Code or Codex sends your project and the whole conversation to the model at every step. Most of that is cached and cheap, but it adds up: a few million tokens per hour of work is normal. The calculator multiplies your hours by a typical token use for how you work, then prices it at these API rates (per million tokens):

  • Claude Code, Sonnet 5.5: $2 input, $0.10 cached input, $10 output
  • Claude Code, Opus 5.5: $4 input, $0.20 cached input, $20 output
  • Codex, GPT-6.1 Sol: $2 input, $0.10 cached input, $10 output
  • Codex, GPT-6 Astra: $10 input, $1 cached input, $50 output

Then it picks the smallest plan that comfortably covers that use. Prices were checked on 2026-10-28. Anthropic says the average Claude Code user at a company spends about $13 per active day at API prices, so the numbers here are in the same range.

How to spend fewer tokens

  1. Plan before you build. Know which features your app needs and in which order. Vague prompts make the agent read your whole project and guess, and guesses get redone.
  2. One feature per session. Start a fresh session for each feature, so the agent doesn't carry old conversation along at every step.
  3. Use the everyday model. Switch to the strongest model only for a hard problem, then switch back.
  4. Stop it early. If the agent heads the wrong way, stop it and say what you want instead of letting it finish.

More tips in How to save Lovable credits and How to plan an app before building with AI.

Frequently asked questions

How much does Claude Code cost?

Claude Code is included in Claude Pro ($20 a month), Max 5x ($100) and Max 20x ($200). You can also pay per use with an API key. Anthropic says the average across companies is about $13 per developer per active day at API prices.

How much does Codex cost?

Codex is included in ChatGPT plans: Plus is $20 a month, and Pro comes at $100, $200 or $500. When you hit a limit you can buy credits, about $40 for 1,000, or pay per use with an API key.

Is a subscription cheaper than the API?

For regular use, almost always. A plan costs the same every month, while API use adds up per token. Pay-as-you-go only wins if you use the agent for a few hours a month.

How exact is this calculator?

It's a rough guide. Anthropic and OpenAI don't publish exact limits per plan, and token use depends on your project and prompts. The prices come from their public pricing pages, checked on the date shown.

How do I use fewer tokens?

Plan before you build. Clear prompts for one feature at a time mean fewer retries and less rework. Start a fresh session for each new feature, and use the everyday model unless a task is really hard.

Spend your tokens on building, not on guessing

Flowmaps turns your idea into a map of features in build order, with a clear prompt for each one. Connect Claude Code and it builds from the plan. Free to start.