AI Prompt Cost Calculator
Compare the API cost of the same prompt across GPT-4o, Claude, Gemini and more, with built-in model pricing, a batch-API discount, and a shareable link.
- Free, no account
- No watermark
- No usage limit
About the AI Prompt Cost Calculator
Most cost calculators for AI make you do the annoying part yourself. You look up a price, type it in, get one number, then repeat the whole thing for the next model. Here you start from the model rather than the price. Pick GPT-4o, a Claude model, or Gemini from the dropdown and the per-million input and output rates fill in for you. Enter your token counts once and the comparison table below ranks every built-in model from cheapest to most expensive for that exact prompt. So the real question, which model is actually cheapest for the work you are doing, gets answered on one screen instead of across three pricing pages and a spreadsheet.
That comparison is the part that matters, because a bare per-token price list quietly points you at the wrong model. Output tokens usually cost several times more than input, so a model with a cheap headline input rate can lose badly once it actually starts generating. Tokenizers differ too, which means the same paragraph becomes a different number of tokens depending on which model reads it. The honest way to compare is to price the same prompt through each model and read the totals, which is what the table does.
How to use
- Enter your input tokens. Count everything you send in one call: the system prompt, retrieved context or documents, prior chat history, few-shot examples, and the user's question. It all bills as input.
- Enter your output tokens. This is the reply length you expect back. If you are not sure, estimate from a typical answer or use the
max_tokenscap as an upper bound. - Set the number of requests. Leave it at 1 for a single call, or raise it to a daily or monthly volume to turn a fraction of a cent into a real budget.
- Pick a model. Choose one from OpenAI, Anthropic, or Google and its input and output prices load automatically. Want your own numbers, or a model that is not listed? Choose Custom prices and type the two rates yourself.
- Flip on Batch API pricing if it fits. For work that can wait, most providers run an asynchronous batch queue at roughly half the standard rate. The toggle applies that discount to your estimate and to every row of the comparison at once.
- Read the results. The top box shows the cost of your chosen model. The table below prices the same prompt across every built-in model, cheapest first, with the winner tagged.
Every price field stays editable after a model loads, so if a provider changed a rate since these were set you can correct it in place. The built-in rates carry the date they were captured, and you should confirm against the official pricing page before committing a budget, since these numbers move.
Why output usually decides the bill
Almost every provider charges more for output than input, often three to six times more. It comes down to how the models run. Reading your prompt is one pass over the text. Writing a reply happens one token at a time, and each new token means another pass through the model over everything generated so far, which is more compute per token and so a higher price.
The practical result is that long replies tend to dominate a bill, not long prompts, and they do it on every single call. A wordy system prompt you send once is cheap, because you pay for it a single time. A model that generates two thousand tokens on every answer keeps costing you on each call. When you want to cut cost, capping max_tokens or asking for concise, structured output moves the number more than trimming the prompt does. Watch the "Per request" column with that in mind. A model can look cheap on its input rate and still land near the top of the table once output is priced in.
Reading the comparison honestly
The table sorts by total cost for your workload, which is the figure that shows up on an invoice. A few habits keep the read honest.
Use realistic token counts, averaged across typical calls rather than a best case. If you want the counts exact instead of estimated, run your actual prompt and a sample reply through a token counter first, then bring those numbers here. Remember that the same text tokenizes differently per model, so a cheaper-per-token model is not automatically cheaper per document.
And think past the raw price. A model that costs more per token but gives shorter, more correct answers can win on total cost by needing fewer retries. The table gives you the list-price ranking, but your own sense of which models one-shot the task matters just as much.
Batch and caching, the two real discounts
The estimate is list price by default, which is the right baseline. Two provider features can drag the real bill well under it, and most people never switch them on.
Batch processing is the toggle already on the page. Send requests to an asynchronous queue that returns results within a longer window, commonly up to about a day, and you typically pay around half on both input and output. Overnight reports, bulk classification, and data enrichment are natural fits, and the only real cost is the wait.
Prompt caching is the other lever, and it is not a toggle here because the savings depend on your setup. If you send the same large prefix on every call, a system prompt, a fixed instruction block, or a long reference document, providers can bill the reused portion at a small fraction of the normal input rate on a cache hit, often around a tenth, after a small write charge the first time. To model it, lower the input price you enter to reflect how much of your input is cached.
Watch the input creep in long chats
A chatbot resends the whole conversation as input on every turn, so the input token count grows as the chat gets longer, and you pay for all of it each time. If your per-call cost climbs over a session, growing history is usually why. Trim old turns, summarize earlier ones, or use a provider feature that condenses history. When you fill in the input tokens above, use a figure for a typical mid-conversation call, not the first message, or the estimate will run low.
Frequently asked questions
Are the built-in model prices current?
They are list rates captured on the date shown next to the model note, across OpenAI, Anthropic, and Google. Providers change pricing often, and some rates vary by prompt size or region, so treat the built-ins as a fast, close starting point rather than a live feed. Any figure you doubt is editable, so you can paste the official number straight over it.
Which models can I compare?
The dropdown covers current chat models from the three big providers: GPT-4o and the GPT-4.1 line, Claude Opus, Sonnet, and Haiku, and the Gemini 2.5 and 2.0 families. Anything not on the list works through the Custom prices option, where you type the two rates and still get the same estimate and full comparison.
How do I get accurate token counts?
A rough rule is one token per four English characters, or about 1.3 tokens per word, which is fine for a quick guess. It falls apart on code, JSON, and other languages, and each model splits text a little differently. For a number you can trust, paste your real prompt and a sample response into a dedicated token counter and use its output here.
Does the batch toggle change both input and output?
Yes. It applies the same discount to both rates, in your headline estimate and across every row of the comparison, so the ranking stays fair. It defaults to roughly fifty percent because that is the common batch discount, though the exact figure varies by provider, so verify yours and adjust the prices by hand if it differs.
Can I share or embed a specific setup?
Yes. The Share button copies a link that carries your token counts, request volume, chosen model, and the batch setting, so a teammate opens the exact same estimate. Embed drops the live calculator onto your own page with a credit link back, which suits a docs page or an internal wiki.
Is anything I type sent anywhere?
No. Every calculation happens in your browser, and nothing you enter, token counts, prices, or model choice, is uploaded or stored. That matters because these inputs can hint at how a production system is set up. Once the page has loaded it keeps working with no connection at all.
Why does one model top the table on input but not on total?
Because input is only part of the bill and output is usually the bigger part. A model with a low input rate and a high output rate can sit near the bottom of the "In / Out" column yet climb once your output tokens and request count are priced in. Trust the Total column, since that is the one you actually pay.