Estimating Your OpenAI API Costs: A Calculator Walkthrough

Estimate OpenAI API costs from token counts: 0.75 words per token, the per-request formula, volume with a buffer, then map the total to a ChatGPT plan tier.

To estimate an OpenAI API bill before you have usage logs: convert words to tokens at roughly 0.75 words per token, price one request with the formula (input tokens × input rate + output tokens × output rate) ÷ 1,000,000, multiply by monthly volume, then add a 20 to 30 percent buffer. At June 2026 GPT-5 rates, a typical 2,800-input, 350-output request costs about $0.007, and 60,000 of them a month cost about $420. The walkthrough below builds that number step by step, then maps it to a flat plan tier.

Step 1: turn words into tokens

One token is about three quarters of an English word, or about four characters, and one page of prose is about 665 tokens. Working conversions:

TextWordsTokens (approx.)
A short user message4055
One page of prose500665
A long system prompt9001,200
1,000 words1,0001,330
A 10-page document5,0006,650

Code, JSON, and non-English text tokenize heavier; budget about 1.5x the prose estimate for structured content. When the estimate matters, count exactly with OpenAI’s tokenizer library:

import tiktoken

enc = tiktoken.get_encoding("o200k_base")
print(len(enc.encode(open("prompt.txt").read())))

Step 2: count the whole request, not the message

Input is everything you send, and most of it is invisible in the product: the system prompt, tool schemas, conversation history, and retrieved context all bill as input on every single call. A 1,200-token system prompt at 60,000 requests a month is 72 million input tokens before any user types a word.

Output is everything the model generates, including reasoning tokens that never appear in the response; on reasoning models the thinking bills at the output rate, covered in reasoning tokens explained. Estimate output from the format you ask for: a JSON field is around 50 tokens, a paragraph around 130, a full page around 665.

Step 3: price one request

June 2026 rates per million tokens: GPT-5.5 $5 input / $30 output, GPT-5 $1.25 / $10, GPT-5 Mini $0.25 / $2. Live numbers at openai.com/api/pricing, full table in OpenAI API pricing explained.

A worked example, a support assistant on GPT-5:

input:  system 1,200 + history 800 + tool schemas 600 + message 200 = 2,800 tokens
output: 350 tokens

input    2,800 × $1.25/1M = $0.0035
output     350 × $10/1M   = $0.0035
per request                 $0.0070

A second shape, estimated straight from words this time: a pipeline that summarizes 20,000 ten-page documents a month on GPT-5 Mini. Ten pages is about 5,000 words, so 6,650 input tokens at the 0.75 rule; a 150-word summary is about 200 output tokens.

input    6,650 × $0.25/1M = $0.00166
output     200 × $2/1M    = $0.00040
per document                $0.00206
20,000 documents a month    $41.20

Two estimates, two shapes, one method. The chat workload is request-heavy and model-sensitive; the document pipeline is token-heavy and nearly free on the right tier.

Step 4: multiply by volume, then buffer

At 60,000 requests a month: 60,000 × $0.007 = $420. Add 25 percent for retries, context drift, and growth: about $525 a month.

The buffer is not pessimism; it absorbs the three multipliers that break naive estimates. Conversations resend their history every turn, so chat costs grow with conversation length. Agents make 15 to 50 model calls per task, so one product “action” is many billed requests; the loop formula is in how to calculate AI agent costs. And real traffic retries: 10 to 25 percent in the logs we see. Budgets fail on the multipliers, not the rates.

One shortcut outranks every rule of thumb here: if you have even a day of real traffic, pull the token counts from your usage logs and let them replace steps 1 and 2 entirely.

The mistakes that sink estimates

Four show up constantly in budgets we get asked to sanity-check. Pricing only the user message, when the system prompt and schemas are usually 5 to 10 times larger. Pricing output at input rates, when output costs eight times more on GPT-5. Treating words as tokens, which undercounts by a third before the math even starts. And assuming one product action equals one API call, when a single agent task fans out into dozens. Each one alone can halve an estimate; stacked, they produce the classic “budgeted $300, billed $2,400” month.

Step 5: map the total to a plan tier

A metered estimate is also a shopping signal, because ChatGPT plans include Codex, which runs programmatically against flat plan windows. Compare the buffered estimate to the capacity each tier absorbs, as estimates and never guarantees:

Buffered monthly estimateCovering tier (estimate)Flat all-in (plan + $129 fee)
Up to about $700ChatGPT Plus, $20$149/mo
Up to about $3,500ChatGPT Pro 5x, $100$229/mo
Up to about $14,000ChatGPT Pro 20x, $200$329/mo

The worked example’s $525 sits inside the Plus estimate: $149 flat against $525 metered, with overflow falling back to a second account or your own API key when a window hits. What the flat lane is, what it serves, and when the meter still wins is worked through in OpenAI API vs ChatGPT subscription cost.

The calculator runs steps 3 through 5 for you: paste token counts and volume, and it prices the metered bill next to the tier that covers it.

Frequently asked questions

How do I estimate OpenAI API costs without usage data?

Count the words in a typical request and response, convert at roughly 0.75 words per token, then price each side: (input tokens × input rate + output tokens × output rate) ÷ 1,000,000. Multiply by monthly request volume and add a 20 to 30 percent buffer for retries and growth.

How many tokens are in 1,000 words?

About 1,330 tokens for English prose, using the rule of thumb that one token is roughly 0.75 words or four characters. Code, JSON, and non-English text run heavier, so budget about 1.5x the prose estimate for structured content. For exact counts, run the text through OpenAI's tiktoken library.

Why do OpenAI cost estimates come in too low?

Because the visible message is a fraction of the request. The system prompt, tool schemas, and conversation history ride along as input on every call, reasoning tokens bill as output you never see, and agents make 15 to 50 model calls per task. Estimates that only price the user message routinely miss by 3 to 10x.

How do I map an estimated API bill to a ChatGPT plan tier?

Compare the buffered monthly estimate to plan capacity estimates: ChatGPT Plus absorbs roughly $700 of API-equivalent work a month, Pro 5x roughly $3,500, Pro 20x roughly $14,000. These are estimates, never guarantees. A $500 estimate fits the Plus tier; a $2,000 estimate fits Pro 5x with room to grow.

More on OpenAI costs
Codex Hosted · the main feature

Run your AI workloads on your ChatGPT subscription.

ProxyLLM runs OpenAI's Codex for you, signed in with your own ChatGPT account. Your apps call one OpenAI-compatible endpoint and the work bills to your flat plan instead of per-token API pricing.