OpenAI API pricing
OpenAI API Cost Calculator
Estimate ChatGPT and OpenAI API spend from monthly requests, input tokens, output tokens, cached input, and a practical budget buffer.
Estimate OpenAI API spend
Input and output split
Estimate costs separately because OpenAI input and output tokens can have different prices.
Model repeated prompts
Apply cached-input assumptions when your application repeats long system or context prompts.
Add a buffer
Plan for prompt growth, retries, longer answers, and unexpected user volume.
How OpenAI API cost is calculated
Monthly cost is estimated from total input tokens, total output tokens, the selected model's token prices, and optional cached-input share.
Formula: input tokens * input price + output tokens * output price. The budget estimate adds your selected buffer percentage.
| Planning question | Use this input | Related page |
|---|---|---|
| How many tokens does my prompt use? | Paste raw text into the OpenAI tokenizer page. | OpenAI Token Calculator |
| What if I compare providers? | Use the cross-provider LLM calculator. | LLM Cost Calculator |
| What if I use Gemini? | Estimate Gemini context caching, Batch API, and grounding cost. | Gemini Cost Calculator |
| What if I have RAG context? | Include retrieval context and generation cost. | RAG Cost Calculator |
FAQ
Is ChatGPT API cost the same as ChatGPT subscription cost?
No. API usage is usually priced by input and output tokens. ChatGPT subscriptions are separate products and are not estimated by this page.
Why include cached input?
Repeated system prompts, policies, examples, or long context blocks may qualify for lower cached-input pricing when supported by the selected model.
Sources
OpenAI model prices in this site were last checked on 2026-07-02. Pricing can change without notice.