AI API cost calculator
Enter how many tokens you send, how many come back and how often. See what that costs on 13 models from OpenAI, Anthropic and Google, cheapest first.
Free tool · Updated
How to use it
- Paste a typical prompt to count its tokens, or type the input tokens yourself.
- Set the output tokens you expect back and how many calls you make a day.
- Read the cost per call and per month for each model, cheapest first.
- Tap a provider to compare only its models.
Tips
- Output tokens cost about five times as much as input tokens, so long answers add up fastest.
- Count everything you send: the system prompt, documents and earlier messages, not only the question.
- Try the small models first. For simple tasks they are often good enough at a fraction of the price.
- Batch and caching discounts can cut these costs by half or more. The calculator shows standard prices.
Frequently asked questions
Where do the prices come from?
From the official pricing pages of OpenAI, Anthropic and Google, checked on November 13, 2026. Links to each page are under the table.
Why do some models cost more for long prompts?
Some providers charge a higher rate for the whole request once the prompt passes a set length: 272,000 tokens on OpenAI's GPT-6 models and 100,000 tokens on Claude Haiku 5.5. The calculator switches to that rate for you.
How do I count my tokens?
Paste a prompt in the box and the calculator estimates it at about 4 characters per token. For an exact number, use the token count your provider returns with each response.
Is my prompt sent anywhere?
No. The math happens in your browser.
More free tools
AI Token CounterPaste any text to estimate its tokens, words and characters, and see how much of a 1M-token context window it fills. Free, private, runs in your browser.Context Window CheckerPaste a document to see whether it fits in the context window of GPT-6, Claude and Gemini models, with room left for the answer. Free, runs in your browser.ChatGPT Character CounterCount characters, words, sentences and tokens in any prompt or AI answer as you type. Free, private and runs in your browser.Want a full prompt, not just keywords?
PromptItIn turns a rough idea into a clear prompt for ChatGPT, Claude, Gemini or any image model. Free to start.