OpenAI API Pricing Calculator

Pick an OpenAI model, enter input and output tokens, get the exact per-request cost — with the cached-input discount shown alongside.

$0.02input cost
$0.01output cost
$0.03total per request
$0.012with full cache hits

GPT-6 Sol: $2 per 1M input tokens, $10 per 1M output tokens, $0.2 per 1M cached input tokens. Rates checked 2026-09-23; confirm on OpenAI's pricing page before budgeting.

Prices change frequently — last verified 2026-09-30. Rates below are USD per 1M tokens from public pricing pages. Always confirm on the provider's official pricing page before budgeting.

About OpenAI API costs

OpenAI bills per token, split into input (what you send) and output (what the model generates). Output is the expensive half — on most models it costs 4–5× the input rate, so a 2,000-token answer can cost more than a 10,000-token prompt. Prompt caching softens the input side: repeated system prompts and documents are served from cache at 90% off.

Need exact token counts first? Use the GPT token counter. Comparing with other providers? The main token counter prices one prompt on all 14 models, and the pricing table lists every rate.

Frequently asked questions

How is the per-request cost calculated?

Cost = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate), using OpenAI's public per-million-token pricing. The “with full cache hits” figure assumes every input token hits the prompt cache, which gets a 90% discount.

How do I know my token counts?

Paste your prompt into the GPT token counter for an exact count using OpenAI's real tiktoken encodings. For output, estimate from your max_tokens setting or measure a few real responses and take the average.

Why is output priced higher than input?

Generating tokens costs the provider more compute than reading them, so output rates run about 4–5× input rates on most OpenAI models. Long responses dominate the bill — trimming max_tokens is often the fastest cost win.

Do these rates include batch API discounts?

No — this calculator uses standard on-demand rates. OpenAI's Batch API offers roughly 50% off for non-urgent workloads with 24-hour turnaround; if your jobs can wait, batching is usually the biggest single saving available.

How does OpenAI compare to other providers?

See the full LLM API pricing comparison for a sortable table of OpenAI, Anthropic, Google, and DeepSeek rates side by side — or paste one prompt into the main token counter to price it on all 14 models at once.