Tools Web

Calculators

OpenAI Token Cost Calculator

Estimate OpenAI API spend from input and output tokens. Pick GPT-5, GPT-4.1, GPT-4o, or an o-series model, or enter custom $/1M rates. Cost = tokens ÷ 1,000,000 × price per 1M. Results are estimates; official OpenAI pricing prevails.

Math runs in your browser. Nothing is uploaded.

Custom $/1M rates (optional)

Estimated USD cost
—

Input cost
—

Output cost
—

Per 1k input tokens
—

Per 1k output tokens
—

Estimates only; official vendor pricing prevails (2026-10-30). Cost = tokens ÷ 1,000,000 × price per 1M.

Claude Token Cost Calculator · Gemini Token Cost Calculator · Grok Token Cost Calculator · LLM API Cost Calculator · RAG Cost Calculator

How it works

How is OpenAI token cost calculated?
USD cost = (input tokens ÷ 1,000,000 × input $/1M) + (output tokens ÷ 1,000,000 × output $/1M). With GPT-4o at $2.50 / $10 per 1M, 100,000 input + 20,000 output ≈ $0.45.
What models are included?
Presets cover GPT-6 Astra ($10 / $50), GPT-6.1 Sol ($2 / $10), GPT-6.1 Terra ($1 / $5), GPT-6 Luna ($0.10 / $0.50), plus GPT-5, GPT-5 mini, GPT-5 nano, GPT-4.1, GPT-4.1 mini, GPT-4o, GPT-4o mini, o3, and o4-mini at Standard list rates. Edit the $/1M fields for other snapshots or private rates.
Does this include cached input or batch discounts?
This page uses Standard input and output rates. GPT-6.1 Terra lists $1/$5 per 1M with cached input $0.05; prompts with more than 272K input tokens are priced at 2× input/cache and 1.5× output for the full request. Batch and Flex are 50% of Standard; Fast is 2×. Model caching with the prompt caching calculator; Batch with the Batch savings calculator; Flex/Fast with the Flex vs Fast vs Standard calculator.
What is the GPT-6.1 Terra long-context rule?
Official docs: prompts with more than 272K input tokens use 2× input and cache rates and 1.5× output for the entire request. Edit custom $/1M fields if you are modeling that band by hand.
Is this the same as ChatGPT Plus?
No. This page estimates API token spend. For Plus, Pro, or Go subscription totals use the ChatGPT Plus cost calculator.