HCODX/GPT Cost Calculator
100% browser-based · OpenAI pricing · GPT-5, 4o, 4o mini

GPT Cost Calculator

Estimate the cost of running OpenAI models (GPT-5, GPT-4o, GPT-4o mini) against your prompts. Adjust expected output tokens and call volume to forecast usage costs.

Prompt text0 tokens
Cost breakdown
Options
3,000calls / month · ~100 / day
Compare all LLMs
Input tokens
0
Output tokens
0
Per call
Status
Ready
Pricing reference

OpenAI GPT pricing (per 1M tokens)

Rates are charged per million tokens. Output is consistently more expensive than input — typically 4-5x.

ModelInputOutputContext
GPT-5$5.00$25.00256K
GPT-4o$2.50$10.00128K
GPT-4o mini$0.15$0.60128K
Use cases

What you'll use this for

Forecasting AI spend is the difference between a sustainable feature and an unexpected invoice. Pre-flight every prompt.

Budget planning

Forecast monthly and annual costs based on expected call volume and prompt size.

Model selection

Compare GPT-5, GPT-4o, and GPT-4o mini side-by-side to pick the right cost/quality tradeoff.

Cost optimization

See how prompt caching, shorter outputs, and smaller models slash bills.

Pricing transparency

All rates visible up front — no surprises after the invoice arrives.

Step by step

How to estimate GPT costs

1

Paste your prompt

Drop a representative prompt into the left editor. Tokens are estimated at ~4 chars/token.

2

Set expected output tokens

How long do you expect the response to be? Default 500 covers a paragraph or two.

3

Set calls per day

How often does this prompt run? 100 = trial-scale, 10000+ = production-scale.

4

Read the forecast

Per-call, per-day, per-month, per-year totals update live. Switch model to compare.

FAQ

Frequently asked questions

We use ~4 chars/token, accurate to about ±20%. For exact counts use the model-specific token counter such as the OpenAI token counter.

OpenAI's public pricing pages as of 2026. Subject to change — always confirm at openai.com/pricing before signing contracts.

Yes. Completely free, no signup, runs entirely in your browser.

Toggle "Cached input" for a 90% input discount — this is approximate and varies by provider. OpenAI's prompt caching kicks in for repeated prefixes ≥ 1024 tokens.

Provider tokenizers can differ slightly from our estimate; system prompts and tool definitions also count toward input; rates change over time. Treat this as a planning tool, not a billing replica.

About

About GPT API pricing

OpenAI bills GPT API usage per million tokens, split between input (your prompt, system messages, tool definitions) and output (the model's response). Output is typically 4-5x more expensive than input because generation is more compute-intensive than prefill.

Why context size matters

  • GPT-5 ships with a 256K-token context, useful for long documents, big codebases, and multi-turn agents.
  • GPT-4o / GPT-4o mini share a 128K-token context — still ample for most chat and RAG workflows.
  • Bigger context isn't free — every token you stuff in counts at the input rate, every call.

How to keep costs down

  • Use the cheapest model that works. GPT-4o mini at $0.15/1M input is 33x cheaper than GPT-5.
  • Cap output tokens. Tell the model "respond in one paragraph" — output bills at the highest rate.
  • Cache aggressive system prompts. Prompt caching gives ~90% discount on the cached prefix.
  • Batch where possible. OpenAI's Batch API offers ~50% discounts for non-realtime jobs.
Related

Related tools