Skip to main content

Still paying full price for ChatGPT Plus, Claude & Gemini?

Split the exact same subscriptions with GamsGo and cut your monthly AI bill by up to 80%, same accounts, a fraction of the cost.

See how much you save →
Sponsored

OpenAI API Cost Calculator: Which Model Is Cheapest for Your Workload?

Most pricing tools answer what one model will cost you. That is the easy half. The hard half is that OpenAI charges output tokens at a different multiple of input on every model, and discounts cached input by three different amounts, so the cheapest model for a prompt-heavy job is often not the cheapest one for a reply-heavy job. Enter your workload and this OpenAI API cost calculator ranks all 20 models for it, then solves for the ratio at which the ranking flips.

Rates verified on 2026-07-31 from OpenAI pricing, platform.openai.com, cross-checked against openai.com/api/pricing. Prices change without notice, so verify at the source before committing a budget. Written by Jim Liu.

TL;DR

  • Cached input is not one discount. It is 90% off on the GPT-5 generation, 75% off on the GPT-4.1 line plus o3 and o4-mini, and 50% off on gpt-4o, gpt-4o-mini and o3-mini
  • Batch halves input and output on every model here, but gpt-5.4 publishes a batch cached-input rate of $0.13 rather than half of $0.25, and 8 models publish no batch cached rate at all
  • Of the 190 model pairs, only 12 can swap places as your input to output ratio changes. At a 90% cached share that rises to 30, because the uneven cache discount reorders the field
  • gpt-5.2 undercuts gpt-4.1 on a prompt-heavy job and loses to it once output passes roughly 4% of your tokens, which is the whole argument for ranking rather than estimating

Price your workload across 20 OpenAI text models

Enter one month of traffic. The table ranks the models cheapest first for that exact mix, and the panel below it shows where the ranking flips as your replies get longer.

Start from a workload

How many API calls you expect.

Prompt, history, tools, retrieved text.

Generated text, including reasoning tokens.

The share of input tokens served from a cache hit. The discount this earns differs by model, which is the point of the table below.

Service tier

Batch halves input and output on every model here, but its cached-input rate is not a uniform halving and several models publish none at all.

Cheapest for this workload

gpt-5-nano at $8.82 per month

The dearest priced model, gpt-5.5, would be $732.00, a 83.0x spread on identical traffic. Output is 6% of your tokens.

These totals cover input tokens, cached input reads and output tokens. They exclude the separate cache-write charge that only these models publish, which on the standard tier is gpt-5.6-sol at $6.25, gpt-5.6-terra at $2.50, gpt-5.6-luna at $0.25 per 1M tokens written. A cache hit rate does not imply how many tokens you write, so that volume is not something this calculator can infer from the inputs above. If you write large prefixes often, add it yourself on those models.

OpenAI models ranked by monthly cost for the workload entered above
RankModelEffective inputOutput rateMonthly costvs cheapest
1gpt-5-nanocheapest$0.0118$0.40$8.821.00x
2gpt-4.1-nano$0.0363$0.40$14.701.67x
3gpt-5.6-luna$0.047$1.20$29.283.32x
4gpt-4o-mini$0.0863$0.60$29.703.37x
5gpt-5.4-nano$0.047$1.25$30.033.40x
6gpt-5-mini$0.0588$2.00$44.105.00x
7gpt-4.1-mini$0.145$1.60$58.806.67x
8gpt-5.4-mini$0.1763$4.50$109.8012.45x
9o4-mini$0.3988$4.40$161.7018.33x
10o3-mini$0.6325$4.40$217.8024.69x
11gpt-5.1$0.2938$10.00$220.5025.00x
12gpt-5$0.2938$10.00$220.5025.00x
13gpt-5.6-terra$0.47$12.00$292.8033.20x
14gpt-4.1$0.725$8.00$294.0033.33x
15o3$0.725$8.00$294.0033.33x
16gpt-5.2$0.4113$14.00$308.7035.00x
17gpt-5.4$0.5875$15.00$366.0041.50x
18gpt-4o$1.4375$10.00$495.0056.12x
19gpt-5.6-sol$1.175$30.00$732.0082.99x
20gpt-5.5$1.175$30.00$732.0082.99x

Where the cheaper model stops being cheaper

Output tokens cost more than input tokens on every model, but not by the same multiple. So the ranking above is not fixed: shift your input to output ratio far enough and some pairs swap. Pick two models to see whether yours is such a pair.

They cost the same when output is about 4.97% of your tokens. Below that, gpt-5.2 is cheaper. Above it, gpt-4.1 is. Your current mix puts output at about 5.88%.

$0.00$3.78$7.56$11.34$15.120%25%50%75%100%output tokens as a share of all tokens
gpt-5.2 gpt-4.1

Every pair that flips at these settings (29 of 190)

At a 0% cached share there are 12 such pairs. Raising the cached share adds more, because caching cuts input rates by 90% on the GPT-5 generation but only 50% on gpt-4o, so it reorders the field rather than shifting it uniformly.

The cached-input discount by model

ModelInputCached inputSaving
gpt-5.6-sol$5.00$0.5090%
gpt-5.6-terra$2.00$0.2090%
gpt-5.6-luna$0.20$0.020090%
gpt-5.5$5.00$0.5090%
gpt-5.4$2.50$0.2590%
gpt-5.4-mini$0.75$0.075090%
gpt-5.4-nano$0.20$0.020090%
gpt-5.2$1.75$0.17590%
gpt-5.1$1.25$0.12590%
gpt-5$1.25$0.12590%
gpt-5-mini$0.25$0.025090%
gpt-5-nano$0.0500$0.005090%
gpt-4.1$2.00$0.5075%
gpt-4.1-mini$0.40$0.1075%
gpt-4.1-nano$0.10$0.025075%
gpt-4o$2.50$1.2550%
gpt-4o-mini$0.15$0.075050%
o3$2.00$0.5075%
o4-mini$1.10$0.27575%
o3-mini$1.10$0.5550%

Why a Ranking Answers a Question an Estimate Cannot

A single-model estimator takes your token counts and multiplies. It is correct and it is not very useful, because by the time you are typing token counts into a form you have usually already decided which model to use, and that decision is the expensive one. Picking gpt-5.6-sol over gpt-5-nano on the same traffic is a difference of two orders of magnitude, which is why this OpenAI API cost calculator leads with a ranking rather than a single figure.

The reason a ranking is not just a convenience is that the order is not stable. Every OpenAI model charges more for output than for input, but the multiple varies: gpt-5.2 charges eight times its input rate for output, while gpt-4.1 and o3 charge four times. So gpt-5.2 is the cheaper of the pair on a summarisation job that reads a transcript and writes a paragraph, and the more expensive one on a drafting job that reads a brief and writes an essay. The switch happens at a specific, computable ratio.

Running that comparison across the whole line gives a number worth knowing: of the 190 possible pairs, 12 can swap places on the input to output mix alone. That is a minority, which is genuinely reassuring, and it means the 12 that do flip are worth identifying by name rather than guessing at. The OpenAI API cost calculator lists them.

Turn caching on and the picture changes again, for a reason that has nothing to do with your workload and everything to do with how OpenAI prices the discount. That is the next section.

Cached Input Comes in Three Discount Tiers, Not One

Prompt caching bills repeated prompt prefixes at a reduced input rate. It is usually described as a 90% saving, and on the GPT-5 generation that is right. It is not right across the line, and the gap is large enough to change which model you should pick.

  • 90% off, cached input at one tenth of uncached: gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.2, gpt-5.1, gpt-5, gpt-5-mini, gpt-5-nano
  • 75% off, cached input at one quarter of uncached: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, o3, o4-mini
  • 50% off, cached input at half of uncached: gpt-4o, gpt-4o-mini, o3-mini

That accounts for 20 of the 20 models here. The remainder publish no cached-input rate at all.

The cleanest way to see why this matters: gpt-5.4 and gpt-4o both charge $2.50 per 1M uncached input tokens. Identical. At a 90% cache hit rate, gpt-5.4 has an effective input rate of $0.475 and gpt-4o has $1.375, nearly three times as much. Two models that look equally priced on the headline number are not equally priced for anyone reusing a prompt prefix.

This is also why raising the cached share in the calculator reshuffles the ranking instead of shifting every row down together. Caching cuts input cost and leaves output cost untouched, by an amount that differs per model, so it pulls the models apart. At a zero cached share, 12 pairs can flip on the token mix. At 90%, 30 can. Any OpenAI API pricing calculator that models caching as one flat percentage will get this ordering wrong.

What the Batch Discount Covers, and Where It Stops

The Batch API trades latency for price: you submit a job file, results land within 24 hours. On input and output tokens the discount really is a clean halving, and it holds for every model in this calculator. Two details are not clean, and both of them are the kind of thing a blanket percentage quietly gets wrong, so this OpenAI API cost calculator stores the batch card separately rather than deriving it.

First, gpt-5.4 publishes a batch cached-input rate of $0.13 per 1M against a standard $0.25. Half of $0.25 is $0.125, so the published cell is a 48% cut rather than exactly half, rounded to the cent. Small in isolation, and a good signal that the batch table is a separate rate card rather than a formula applied to the standard one.

Second, and much larger: 8 models publish no batch cached-input rate at all. The cell is empty for gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o, gpt-4o-mini, o3, o4-mini, o3-mini. There is a real difference between a rate of zero, a rate equal to the standard one, and a rate that has not been published, and only the third is true here. When you set a cached share above zero on the batch tier, this calculator moves those models out of the ranking and says why, rather than halving their standard cached rate and presenting the output as a price.

Three models were left out of this OpenAI API cost calculator for related reasons. gpt-3.5-turbo and gpt-3.5-turbo-instruct appear in the standard table with no batch row at all. gpt-3.5-turbo-1106 does have a batch row, but its batch rates are identical to its standard rates, so it is the one model here that gets no batch discount. That is a legitimate published price rather than an error, and it is worth knowing precisely because a reader who assumes batch always halves the bill would get that model wrong.

Reading the Break-Even Crossover Point

The break-even crossover is the output share at which two models cost exactly the same. It falls out of the arithmetic rather than being fitted, so this OpenAI API cost calculator solves for it directly instead of sampling. Hold the total tokens per request fixed and let s be the fraction of them that are output. Cost per request is then proportional to (1 - s) x inputRate + s x outputRate, which is a straight line in s for each model. Two straight lines meet at one point, so setting them equal and solving gives

s* = (inputB - inputA) / ((outputA - inputA) - (outputB - inputB))

That point is a real crossover only when s* lands strictly between 0 and 1. If it falls outside, one model is cheaper at every possible mix and no amount of changing your prompt shape will flip them. gpt-4o-mini against gpt-4o is that case: gpt-4o-mini wins on input and on output, so there is nothing to cross.

One edge case is worth naming because it looks like a crossover and is not. o4-mini and o3-mini publish identical input and output rates and differ only on cached input, so their cost difference works out to (1 - s) times the gap in input rate. That reaches zero only at s of exactly 1, meaning they tie solely on an all-output workload with no input at all. Equal output rates therefore rule out an interior crossover outright, and the OpenAI API cost calculator tests for that directly rather than trying to catch it with a tolerance.

In practice the useful reading is the direction. When s* is small, say the 4% between gpt-5.2 and gpt-4.1, the crossover is nearly always behind you: almost any workload that generates real prose sits above 4% output, so gpt-4.1 is the cheaper choice and gpt-5.2 only wins on near-pure classification. When s* is large, say the 78% between gpt-5.4-mini and o4-mini, the crossover is nearly always ahead of you and gpt-5.4-mini wins for anything that is not almost entirely generation.

Six Workloads, and What Each One Actually Costs

Each card below is a real run of this OpenAI API cost calculator on the standard tier, computed from the same verified rates. One result is worth stating plainly because it is the opposite of what a comparison page usually implies: on raw price alone the winner does not change. gpt-5-nano is cheaper than or equal to every other model here on input, cached input and output, so it takes first place in all six scenarios and no token mix can dislodge it. What does change is the order behind it, and how far ahead it sits. Read these for the size of the gap, then choose from the models you would actually trust with the task, which is where the crossovers above start to matter.

Support chatbot

A long standing system prompt and knowledge snippet on every turn, then a short reply. Input heavy, so caching carries the bill.

Requests
60,000/mo
Cached share
85%
Tokens in/out
4,000/250
Output share
6%
  1. 1.gpt-5-nano$8.82
  2. 2.gpt-4.1-nano$14.70
  3. 3.gpt-5.6-luna$29.28

gpt-5-nano stays at or below gpt-4.1-nano at every mix here, so the ranking is stable for this shape of traffic.

Bulk classifier

One label per document across a nightly queue. Almost pure input, and the kind of job the batch tier was built for.

Requests
500,000/mo
Cached share
40%
Tokens in/out
900/12
Output share
1%
  1. 1.gpt-5-nano$16.80
  2. 2.gpt-4.1-nano$33.90
  3. 3.gpt-4o-mini$57.60

gpt-5-nano stays at or below gpt-4.1-nano at every mix here, so the ranking is stable for this shape of traffic.

Long-form writer

A short brief in, a full draft out. Output dominates, which is where the cheap small models stop being cheap.

Requests
4,000/mo
Cached share
0%
Tokens in/out
700/3,200
Output share
82%
  1. 1.gpt-5-nano$5.26
  2. 2.gpt-4.1-nano$5.40
  3. 3.gpt-4o-mini$8.10

gpt-5-nano stays at or below gpt-4.1-nano at every mix here, so the ranking is stable for this shape of traffic.

Coding agent

Repeated file context plus tool results, with patches coming back. Big prompts, mid-sized replies, heavy cache reuse.

Requests
25,000/mo
Cached share
90%
Tokens in/out
18,000/1,400
Output share
7%
  1. 1.gpt-5-nano$18.27
  2. 2.gpt-4.1-nano$28.63
  3. 3.gpt-4o-mini$58.13

gpt-5-nano stays at or below gpt-4.1-nano at every mix here, so the ranking is stable for this shape of traffic.

RAG answers

Retrieved passages change every call, so the cache barely helps and raw input rate decides the winner.

Requests
120,000/mo
Cached share
15%
Tokens in/out
6,500/400
Output share
6%
  1. 1.gpt-5-nano$52.94
  2. 2.gpt-4.1-nano$88.43
  3. 3.gpt-4o-mini$137.03

gpt-5-nano stays at or below gpt-4.1-nano at every mix here, so the ranking is stable for this shape of traffic.

Meeting summariser

A transcript in, bullet points out. A 20 to 1 input to output ratio that flatters the models with deep cache discounts.

Requests
9,000/mo
Cached share
25%
Tokens in/out
12,000/600
Output share
5%
  1. 1.gpt-5-nano$6.35
  2. 2.gpt-4.1-nano$10.94
  3. 3.gpt-4o-mini$17.41

gpt-5-nano stays at or below gpt-4.1-nano at every mix here, so the ranking is stable for this shape of traffic.

The Published Rates Behind This OpenAI API Cost Calculator

All figures are USD per 1M tokens on the short-context column, read from OpenAI's own pricing tables on 2026-07-31. Empty cells below are genuinely unpublished, not zero.

Published OpenAI standard and batch rates per 1M tokens
ModelInputCachedOutputBatch inBatch cachedBatch out
gpt-5.6-sol$5.00$0.50$30.00$2.50$0.25$15.00
gpt-5.6-terra$2.00$0.20$12.00$1.00$0.10$6.00
gpt-5.6-luna$0.20$0.0200$1.20$0.10$0.0100$0.60
gpt-5.5$5.00$0.50$30.00$2.50$0.25$15.00
gpt-5.4$2.50$0.25$15.00$1.25$0.13$7.50
gpt-5.4-mini$0.75$0.0750$4.50$0.375$0.0375$2.25
gpt-5.4-nano$0.20$0.0200$1.25$0.10$0.0100$0.625
gpt-5.2$1.75$0.175$14.00$0.875$0.0875$7.00
gpt-5.1$1.25$0.125$10.00$0.625$0.0625$5.00
gpt-5$1.25$0.125$10.00$0.625$0.0625$5.00
gpt-5-mini$0.25$0.0250$2.00$0.125$0.0125$1.00
gpt-5-nano$0.0500$0.0050$0.40$0.0250$0.0025$0.20
gpt-4.1$2.00$0.50$8.00$1.00not published$4.00
gpt-4.1-mini$0.40$0.10$1.60$0.20not published$0.80
gpt-4.1-nano$0.10$0.0250$0.40$0.0500not published$0.20
gpt-4o$2.50$1.25$10.00$1.25not published$5.00
gpt-4o-mini$0.15$0.0750$0.60$0.0750not published$0.30
o3$2.00$0.50$8.00$1.00not published$4.00
o4-mini$1.10$0.275$4.40$0.55not published$2.20
o3-mini$1.10$0.55$4.40$0.55not published$2.20

What is deliberately missing, and why

  • gpt-5.5-pro, gpt-5.4-pro, gpt-5.2-pro, gpt-5-pro, o1-pro, o3-pro: no cached-input rate is published, so the caching half of this calculator cannot be modelled honestly for them
  • gpt-3.5-turbo, gpt-3.5-turbo-instruct: they appear in the standard table but have no batch tier row at all
  • gpt-3.5-turbo-1106: its published batch rates are identical to its standard rates, so it gets no batch discount and would distort a batch comparison
  • gpt-4-turbo, gpt-4-0613, gpt-4o-2024-05-13, o1, davinci-002, babbage-002: dated or superseded snapshots that no new project should be starting on
  • Prompts at or above 272,000 tokens on the gpt-5.4, gpt-5.5 and gpt-5.6 families move to a separate, higher rate card that this page does not model, so a very long prompt on those models will cost more than the figure shown.
  • The flex and fast-mode service tiers, regional processing endpoints, which carry a 10% uplift on models released from March 2026, and models billed through Amazon Bedrock are all priced differently and are out of scope here.
  • Audio, realtime, image, embedding and fine-tuning rates are separate tables on the source page. This calculator covers text tokens only.

Which Cost Calculator on This Site to Use

There are several cost tools here and they are not interchangeable. Some are a plain OpenAI token cost estimator for one model, some compare providers, and this one ranks a single provider's whole line. Each models a different question, so the fastest route to an answer is picking the right one first.

ToolBest forNot for
This pageChoosing between OpenAI models when you have not decided yet, and finding the token ratio at which that choice changesNot for pricing Claude or Gemini, and not for a model you have already committed to
Claude API pricing calculatorPricing a workload on Anthropic's Claude models, where the rate card and the caching mechanics are Anthropic's ownNot for OpenAI model selection. It does not rank the OpenAI line or solve for a crossover
Gemini API cost calculatorGoogle's models, where cache storage bills by the hour and the deciding variable is request rate rather than hit rateNot for OpenAI, which charges nothing for holding a cache and so has no hourly meter to cover
Prompt caching cost calculatorDeciding whether to implement caching at all, on a model you have already pickedNot for comparing many models at once. It goes deep on one decision rather than across a field
LLM API cost calculatorWorking backwards from a fixed monthly budget to how many requests it buys, across providersNot for per-model OpenAI precision. It trades depth for provider breadth
Context window calculatorChecking whether your document fits at all, before cost is even the questionNot a pricing tool. It answers a capacity question, not a cost one

Frequently Asked Questions

How much does the OpenAI API cost?

There is no single figure, and that is why a gpt api cost calculator has to ask about your workload rather than quote a price. OpenAI bills per million tokens and the per-model rates span three orders of magnitude. On 2026-07-31 the published standard rates ran from $0.05 per 1M input tokens and $0.40 per 1M output on gpt-5-nano up to $5.00 and $30.00 on gpt-5.6-sol. Your bill is requests times tokens times those rates, which is what this OpenAI API cost calculator works out. The useful question is not what the API costs but which model is cheapest for your particular mix of input and output tokens, and that answer changes with the mix.

Is the OpenAI batch API discount always 50%?

The OpenAI batch API discount is a clean halving of input and output tokens on every model in this calculator. On cached input it is not that tidy. gpt-5.4 publishes a batch cached-input rate of $0.13 per 1M against a standard $0.25, which is a 48% cut rather than exactly half. More importantly, several models publish no batch cached-input rate at all, including the whole gpt-4.1 line, gpt-4o, gpt-4o-mini, o3, o4-mini and o3-mini. For those the batch-plus-caching combination has no published price, so this calculator says so instead of halving the standard cached rate and presenting the result as fact.

How much does OpenAI cached input pricing actually save?

It depends entirely on the model, which is the single most useful thing to know about it. Cached input runs at 10% of the uncached rate on the GPT-5 generation, a 90% saving. On gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, o3 and o4-mini it is 25% of uncached, a 75% saving. On gpt-4o, gpt-4o-mini and o3-mini it is 50% of uncached, so caching halves input cost and no more. A prompt-heavy workload on gpt-4o therefore gets far less relief from caching than the same workload on gpt-5.4, even though both charge $2.50 per 1M uncached input.

gpt-4o mini vs gpt-4o cost: which one is cheaper?

gpt-4o-mini is cheaper at every input to output mix: $0.15 against $2.50 per 1M input and $0.60 against $10.00 per 1M output. Neither raising your output share nor turning caching on flips that, because gpt-4o-mini wins on both rate cards and both models sit in the same 50% cached tier. This is the common case. Across the models here only a minority of pairs ever swap places as the mix shifts, and the calculator lists exactly which ones do.

Does a cheap model stay cheap when replies get longer?

Not always, and this is the crossover the ranking table exposes. Output tokens cost several times input tokens on every OpenAI model, but the multiple differs: gpt-5.2 charges 8 times its input rate for output, while gpt-4.1 and o3 charge 4 times. So gpt-5.2 undercuts gpt-4.1 on a prompt-heavy job and loses to it once output grows past roughly 4% of your tokens. Turning caching on widens the effect, because it lowers input rates without touching output rates.

Why does turning on caching change which model is cheapest?

Because caching cuts input cost and leaves output cost alone, and the size of that cut varies by model. Raising the cache hit rate pulls the effective input rate down much further on a GPT-5 model, at 90% off, than on gpt-4o at 50% off. Pairs that were cleanly ordered at a zero hit rate can cross once the discount lands unevenly. Running the numbers across the 20 models here, 12 pairs can flip on the input to output mix alone; at a 90% cache hit rate that rises to 30.

What counts as an input token versus an output token?

Input tokens are everything you send: system prompt, tool and function schemas, conversation history you replay, retrieved documents, and the current user message. Output tokens are what the model generates, and on reasoning models that includes reasoning tokens you never see in the response text. That last point matters for budgeting, because a reasoning-heavy call bills far more output than the visible answer suggests. Enter the token counts you actually observe in the usage field of your API responses rather than counting words.

Do these rates cover long prompts too?

The rates here are the short-context column. On the gpt-5.4, gpt-5.5 and gpt-5.6 families, prompts at or above 272,000 tokens move to a separate, higher rate card, so a calculation for a very long prompt on those models will understate the bill. Regional processing endpoints and models served through Amazon Bedrock are also billed differently from direct API rates. Check the source page for those cases.

How often do these prices change?

Often enough that you should treat any calculator, including this one, as a snapshot. Every rate here was read from OpenAI's own pricing tables on 2026-07-31 and cross-checked against a second OpenAI page for the headline models. OpenAI adds models, retires snapshots and adjusts rates without notice, so verify against the source before you commit a budget to a number.

Next: turn the choice into a saving

This OpenAI API cost calculator has given you a model. The next lever is usually caching, because it cuts input cost without changing a line of prompt logic, and input is the larger half of most bills. Work out whether it pays for your prefix, then check your prompt fits before you build around it.

Related tools

Built by Jim Liu, who ships AI tooling and writes about token budgeting for teams running production LLM pipelines. Every rate on this page was transcribed from OpenAI's own pricing tables rather than from a summary of them, because a summary of a pricing table is exactly where the wrong column gets read.

Sponsored

Ad served by Adsterra. OpenAIToolsHub is not responsible for advertiser content.