Skip to content
UtilPouch

OpenAI API cost calculator

Filtered to OpenAI’s current models. Set your tokens and traffic to see what GPT-5, GPT-5 mini, GPT-4.1 and GPT-4o cost per month, with cached input and the Batch API.

Your workload

Processed on this device
Start from
tokens
tokens
/ day
days
40%

Share of input tokens that repeat, like a fixed system prompt.

Custom rate

Add your own or a negotiated price, in USD per 1M tokens. It appears as Custom model in the table.

ModelPer month

Prices checked December 6, 2026. Sources: OpenAI, Anthropic, Google, DeepSeek. Confirm current rates before you budget.

Picking between GPT-5 and the smaller models

GPT-5 mini costs a fifth of GPT-5 for both input and output. For classification, extraction and short support replies it is usually enough; keep GPT-5 for reasoning-heavy or customer-visible writing.

GPT-4.1 has the largest context window in the lineup, about a million tokens, which matters for long documents more than its per-token price does.

Where the money goes

Output tokens cost eight times input on GPT-5. A chatbot that answers in long paragraphs can spend more on output than on the whole prompt. Capping response length is often the cheapest optimization.

OpenAI caches repeated prompt prefixes automatically for long prompts, at a tenth of the input price on GPT-5. Put stable instructions first so more of each request repeats.

OpenAI models compared (USD per 1M tokens)
ModelInputCached inputOutputContext
GPT-5$1.25$0.125$10.00400K
GPT-5 mini$0.25$0.025$2.00400K
GPT-4.1$2.00$0.50$8.001.05M
GPT-4.1 mini$0.40$0.10$1.601.05M
GPT-4o$2.50$1.25$10.00128K

Batch API halves these rates. Check openai.com/api/pricing for the current figures.

Questions

Is GPT-5 cheaper than GPT-4o?

Yes, on input: $1.25 against $2.50 per million tokens. Output is the same at $10. For most workloads GPT-5 costs less than GPT-4o.

Does OpenAI charge for cached tokens?

Yes, at a discount: cached input on GPT-5 costs a tenth of normal input. Caching applies automatically to repeated prompt prefixes above a minimum length.

When is the Batch API worth it?

For work that can wait up to a day: nightly summaries, evaluations, bulk classification. It halves the price of both input and output.

Are reasoning tokens counted as output?

Yes. Reasoning models bill their internal reasoning as output tokens, so set the output estimate higher than the visible answer for reasoning-heavy tasks.