BV
All tools
utility

OpenAI API Cost Calculator

Calculate your OpenAI API costs by model, token volume and monthly usage, with standard, batch and fast-mode rates side by side and the caching maths that decides whether your bill goes down or up.

Muhammad Bilal
Muhammad Bilal Virk
6 min read
Live tool
Input cost
$2.25
Output cost
$3.00
Monthly total
$5.25
Annual total
$63.00
Cost per call
$0.00052
Tokens / month
20,000,000
Pricing is per 1M tokens from published rate cards (gpt-4o-mini: $0.15 in / $0.6 out). Verify against the provider's current pricing page before budgeting.

OpenAI costs are easy to underestimate and easy to misread, because the same model has four different rates depending on how you call it. Enter your input and output token volumes and this calculator shows the monthly figure, so you can choose a model and a caching strategy before the first invoice rather than after it.

What OpenAI actually charges for

Everything is priced per million tokens, and a token is roughly three quarters of an English word. What trips people up is that a single model has four separate rates. The same request costs half as much through the Batch API and twice as much in Fast mode, and there is a fifth and sixth rate hiding in the cached-input and cache-write columns.

These figures were read off OpenAI's own pricing page on 13 August 2026. Rates and model names move often, so check the source before you quote a number to a client.

OpenAI API Cost Calculator — illustration

Standard rates, per 1M tokens, short context

Model Input Cached input Cache write Output
gpt-5.6-sol $5.00 $0.50 $6.25 $30.00
gpt-5.6-terra $2.00 $0.20 $2.50 $12.00
gpt-5.6-luna $0.20 $0.02 $0.25 $1.20

Every model also has a long-context column at roughly double those rates, so a workload that quietly grows past the short-context window does not get gradually more expensive, it steps up.

The same models, priced by service tier

Tier gpt-5.6-sol in / out gpt-5.6-terra in / out When it applies
Standard $5.00 / $30.00 $2.00 / $12.00 Ordinary synchronous calls
Batch $2.50 / $15.00 $1.00 / $6.00 Asynchronous, 24-hour window
Flex $2.50 / $15.00 $1.00 / $6.00 Latency-tolerant synchronous work
Fast mode $10.00 / $60.00 $4.00 / $24.00 Priority processing, renamed from Priority on 30 July 2026

Tool calls are billed on top. Web search is $10.00 per thousand calls and the retrieved content is billed as ordinary input tokens. File search is $2.50 per thousand calls with storage at $0.10 per GB per day after the first free gigabyte. Regional processing endpoints for data residency carry a 10% uplift on models released from 5 March 2026 onwards.

A worked example: a support assistant

Take a customer support assistant on gpt-5.6-terra, with a 3,000-token stable prefix of instructions and product knowledge, about 500 tokens of changing conversation, 250 tokens of reply, and 2,000 conversations a day.

No caching. Each request bills 3,500 input tokens at $2.00 per million and 250 output tokens at $12.00. That is $0.007 plus $0.003, so a penny a conversation, $20 a day, roughly $600 a month.

Caching turned on and left at its defaults. This is the expensive case, and it surprises people. On GPT-5.6 and later, prompt caching places an implicit breakpoint on the latest user or tool message. Because the conversation changes on every request, the prefix at that breakpoint is never the same twice: cached_tokens stays at zero while the service writes the whole 3,500-token prefix to cache each time, at the 1.25x write rate of $2.50 per million. That is $0.00875 plus $0.003 of output, or $705 a month — about a quarter more than not caching at all.

Caching configured properly. Put an explicit prompt_cache_breakpoint at the end of the 3,000-token stable prefix, set the same prompt_cache_key on every request that shares it, and set prompt_cache_options.mode to explicit so the implicit breakpoint is switched off. Now the steady state bills 3,000 tokens at the cached rate of $0.20, the 500 changing tokens at $2.00, and the output at $12.00. That is about $0.0046 a conversation, $276 a month.

Same model, same traffic, same prompt. The gap between the best and worst configuration is 2.5x, and none of it shows up in a naive token count.

If the work is classification or enrichment rather than live chat, the Batch API halves the figure again for a 24-hour turnaround.

Common mistakes

Pricing from an old table. The GPT-4o and GPT-3.5 rates that circulate in blog posts no longer describe any model OpenAI sells. Re-read the pricing page rather than a summary of it.

Forgetting that output is the expensive column. On terra, output costs six times input. A verbose agent that returns three paragraphs where one would do is not slightly more expensive, it dominates the bill. Trimming responses is usually worth more than switching model.

Caching a prefix shorter than 1,024 tokens. That is a strict minimum on GPT-5.6 and later. Below it nothing is cached and cached_tokens reads zero, which looks identical to a misconfiguration.

Hammering one cache key. OpenAI's guidance is roughly fifteen requests a minute per key. Past that, requests start missing the cache. Partition high-volume traffic across more keys with a stable mapping.

Ignoring tool call fees. A thousand web searches is $10 before the model has processed a single retrieved token, and those tokens then bill at the model's input rate.

Reducing the bill without reducing quality

Pick the smallest model that passes your evaluations rather than the best one available; luna costs one twenty-fifth of sol on input. Keep the system prompt tight, since it rides along on every single call — How to Write a System Prompt for AI Agents covers how to shorten one without losing reliability. Test prompt variants against each other with the Prompt Tester before you settle. And if you are retrieving documents, a properly scoped retrieval layer sends fewer tokens than stuffing the context window: How to Build a RAG System walks through the trade-off.

Frequently asked questions

Are these prices current? They were verified against OpenAI's pricing page on 13 August 2026. OpenAI changes rates and retires model names several times a year, so treat this page as a worked method and the pricing page as the authority.

How do I know my token counts? Do not estimate from word counts for anything that matters. Every response carries a usage object with input, output, cached and cache-write token counts. Log those from a small sample of real traffic and multiply.

Does the Batch API really halve the cost? Yes, a flat 50% against synchronous rates, with a 24-hour completion window, up to 50,000 requests and a 200 MB input file per batch. Two practical catches: output lines do not come back in input order, so match on custom_id, and the output file is deleted after 30 days.

My bill went up after I enabled caching. Why? Almost certainly the implicit-breakpoint problem in the worked example above. Log cache_write_tokens alongside cached_tokens. If writes are high and reads are near zero, you are paying 1.25x for a prefix nobody ever reads back.

Does this cover voice agents? No. Realtime audio is priced on a separate scale, with gpt-realtime-2.1 at $32.00 per million audio input tokens and $64.00 output, and telephony billed by whoever carries the call. For that whole stack use the AI Agent Cost Calculator, which models the voice, LLM and telephony layers together.

Getting a cost projection you can rely on

A calculator gives you the arithmetic. What it cannot tell you is whether your prompt is three times longer than it needs to be, or whether half your traffic could run on a cheaper model. That comes from reading the actual usage logs.

If you want that done properly before you commit to an architecture, I take this work through Fiverr and Upwork.

Muhammad Bilal
Muhammad Bilal Virk
AI automation engineer — building agents, workflows, and RPA that remove repetitive work.
Share
Newsletter

One email, when I ship something worth reading.

No cadence, no filler. Unsubscribe any time.

Free consultation

Want this built against your real numbers?

A 30-minute call to scope the workflow, agent, or automation you actually need.

Book a free consultation

More utility tools

All tools
Next step

Have a workflow that's burning hours every week?

Bring me one real bottleneck. I'll tell you whether it's worth automating, and what it would take.

Book 30 Minutes Call