Free tool · no sign-up
AI API Cost Calculator
Estimate what GPT, Claude, and Gemini will cost for your workload. Enter your tokens per request and how many requests you run — see the cost per call and per month, side by side.
~750 words ≈ 1,000 tokens. Rates are per 1M tokens, current as of July 2026.
| Model | Per request | Per month |
|---|---|---|
| GPT-4.1OpenAI | — | — |
| GPT-4.1 miniOpenAI | — | — |
| GPT-4.1 nanoOpenAI | — | — |
| GPT-4oOpenAI | — | — |
| GPT-4o miniOpenAI | — | — |
| Claude Opus 4.8Anthropic | — | — |
| Claude Sonnet 4.6Anthropic | — | — |
| Claude Haiku 4.5Anthropic | — | — |
| Gemini 3.1 ProGoogle | — | — |
| Gemini 3 FlashGoogle | — | — |
Cheapest option for your workload is highlighted. Excludes prompt caching and batch discounts, which can lower these further.
How AI API pricing actually works
Every major AI provider bills the same way: by the token, split into input and output. Input is everything you send — the system prompt, the user's message, and any documents or context you attach. Output is what the model writes back. Output almost always costs several times more than input, so a chatty model that returns long answers can cost far more than its headline input rate suggests.
The practical takeaway is that model choice is the single biggest lever on your bill. A small model like GPT-4.1 mini or Claude Haiku can be ten to twenty times cheaper than a flagship model, and for tasks like classification, tagging, or short replies the quality difference is often negligible. Send the easy work to a cheap model and reserve the expensive ones for the jobs that truly need them.
Comparing tools before you commit?
Our roundup of the best AI tools for business covers which models fit which jobs, and the AI business automation guide shows where API spend turns into real savings.
Frequently asked questions
How do I calculate the cost of an AI API call?
API cost is based on tokens, not requests. You pay one rate for input tokens (your prompt plus any context) and a higher rate for output tokens (the model reply). Multiply your input tokens by the input rate, your output tokens by the output rate, add them together, then multiply by how many requests you make. This calculator does that math for you across the major models.
What is a token?
A token is a chunk of text the model reads or writes — roughly three-quarters of a word in English. So 1,000 tokens is about 750 words, and one million tokens is about 750,000 words. Providers quote prices per million tokens, which is why small individual requests cost fractions of a cent but high volume adds up.
Why do output tokens cost more than input tokens?
Generating text is more computationally expensive than reading it, so providers charge more for output. Across current models the output rate is often three to five times the input rate. That means the length of the model reply usually drives your bill more than the length of your prompt.
How can I reduce my AI API costs?
The biggest lever is model choice — route simple tasks like classification or extraction to a cheaper small model, and reserve the flagship models for work that genuinely needs them. Beyond that, prompt caching can cut repeated input costs by up to 90%, and batch processing gives around 50% off when you can wait for results. Keeping prompts short and asking for concise output also helps directly.
Is this AI cost calculator accurate?
The calculator uses each provider's published per-million-token rates, but AI pricing changes frequently and your real bill depends on caching, batch discounts, and exact token counts. Treat the result as a solid estimate for planning, and always confirm against the provider's live pricing page before committing to a budget.