# 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.

*Published 2026-06-12 · https://proxyllm.ai/blog/openai-api-cost-calculator-guide*

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:

| Text                 | Words | Tokens (approx.) |
| -------------------- | ----- | ---------------- |
| A short user message | 40    | 55               |
| One page of prose    | 500   | 665              |
| A long system prompt | 900   | 1,200            |
| 1,000 words          | 1,000 | 1,330            |
| A 10-page document   | 5,000 | 6,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:

```python
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](/blog/openai-reasoning-tokens-cost). 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](https://openai.com/api/pricing), full table in [OpenAI API pricing explained](/blog/openai-api-pricing-explained-2026).

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

```text
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.

```text
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](/blog/ai-agent-cost-calculation). 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 estimate | Covering tier (estimate) | Flat all-in (plan + $129 fee) |
| ------------------------- | ------------------------ | ----------------------------- |
| Up to about $700          | ChatGPT Plus, $20        | $20 + $129/mo                 |
| Up to about $3,500        | ChatGPT Pro 5x, $100     | $100 + $129/mo                |
| Up to about $14,000       | ChatGPT Pro 20x, $200    | $200 + $129/mo                |

The worked example's $525 sits inside the Plus estimate: a $20 plan plus our flat $129 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](/blog/openai-api-vs-chatgpt-subscription-cost).

The [calculator](/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.
