AI cost calculator

Codex pricing calculator

Codex is included in ChatGPT Plus, Pro and Business, and it also runs on an API key billed per token. Enter your tasks to see the API-key bill, the credits the same work uses, and how many messages OpenAI expects a Plus plan to allow.

Your inputs

One task is one prompt the agent works on until it is done.
tokens
Context the agent reads across all its turns: files, tool results, history.
%
tokens
Code, messages and reasoning tokens.

Result

$45.70 a month on an API key, or 1,142 credits

At API prices this work is worth 2.3 times the $20 Plus price; whether a plan covers it depends on its limits.

API key cost per task
$0.11
API key cost per month
$45.70
Credits per task
2.7 creditsOpenAI says a typical GPT-5.6 Sol task uses 2 to 15
Credits per month
1,142 creditsused after a plan's included limits run out
Plus or Standard Business, local messages per 5 hours
15 to 160OpenAI estimate for GPT-6.1 Sol; Pro has no five-hour limit

Worked examples

Each row is the calculator run on the inputs shown, with every other input at its default.

WorkloadModelTasks a dayAPI key per monthCredits per month
A few tasks a dayGPT-6.1 Sol5$11.42286 credits
Daily codingGPT-6.1 Sol20$45.701,142 credits
Daily coding on TerraGPT-6.1 Terra20$22.85571 credits
Hard tasks on GPT-6 AstraGPT-6 Astra10$2466,143 credits
Quick edits on GPT-6 LunaGPT-6 Luna80$2.6265.5 credits
Parallel agentsGPT-6.1 Sol80$1834,570 credits

How it is calculated

Codex can be paid for in two ways, and the calculator prices your tasks both ways.

API key: (fresh input x input price + cached input x cached price + output x output price) / 1,000,000 credits: (fresh input x input credits + cached input x cached credits + output x output credits) / 1,000,000 month = per task x tasks per day x active days

With an API key, Codex is billed at OpenAI API prices: GPT-6.1 Sol is $2 per million input tokens, $0.10 cached and $10 output. API cache writes ($2.50 per million on GPT-6.1 Sol for a 30-minute write) are not counted here.

With a ChatGPT plan, Codex usage comes out of the plan's included limits first and then out of credits. OpenAI publishes credit rates per million tokens, for example 50 credits input, 2.5 cached and 250 output on GPT-6.1 Sol, but the dollar price of a credit depends on your account, region and plan, so the calculator shows credits, not dollars. At API prices, one credit of GPT-6.1 Sol work is worth about $0.04.

The default task (60,000 input tokens, 80% cached, 8,000 output) uses about 5.7 credits on GPT-5.6 Sol, inside the 2 to 15 credits OpenAI gives as typical. The message ranges are OpenAI's estimates of local messages per five hours on Plus and Standard Business seats; Pro plans have no five-hour limit.

Questions

How much does Codex cost?

Codex is included in ChatGPT Plus ($20 a month), Pro ($100, $200 or $500) and Business ($20 per seat yearly, $25 monthly), with usage limits. On an API key it costs API prices per token, with no monthly fee.

How many Codex messages do I get on Plus?

OpenAI estimates 15 to 160 local messages every five hours on GPT-6.1 Sol, 35 to 285 on GPT-6.1 Terra and 350 to 3,000 on GPT-6 Luna, with weekly limits as well. Cloud tasks use more.

What are Codex credits?

Credits pay for usage after your plan's included limits run out. OpenAI lists them per million tokens: GPT-6.1 Sol uses 50 credits per million input tokens, 2.5 cached and 250 output.

Is Codex cheaper on an API key or a plan?

For light use the API key can cost less than $20 a month. For daily agent work, a plan usually costs less than the same tokens at API prices, as long as its limits cover you.

Sources

Prices and plans change. This page was last checked on 2026-10-29. The data is open: llm-prices.json, ai-plans.json (CC BY 4.0).

Related calculators