Free Tool
AI Prompt Cost Calculator
Estimate what an AI feature will cost before you ship it. Enter input and output tokens per request, how many requests you expect each day, and the price per million tokens from your provider. You get the cost per request, month and year.
Your AI API cost
Fill in the fields above and your result will appear here.
Everything is worked out in your browser. What you type is never sent to Ovoform or stored.
How AI API pricing works
Most model providers charge per token, and they charge different prices for tokens you send (input) and tokens the model writes back (output). Output tokens are usually several times more expensive than input tokens. A token is roughly three quarters of an English word, so 1,000 tokens is about 750 words.
The cost of one request is input tokens times the input price plus output tokens times the output price, each divided by one million. Multiply by your request volume and you get a daily, monthly and yearly cost.
Prices are yours to enter
Model prices change often and differ by provider and model, so this calculator does not guess them. Copy the current input and output prices from your provider's pricing page. That way the result is only as old as your numbers, not ours.
Cutting the bill
Three levers matter most. Shorten the prompt and the context you send each time. Cap the length of the answer. And use prompt caching for the instructions that repeat on every call. Use the caching fields to model how much a given cache share would save, then compare it with the cost of a smaller, cheaper model for the easy requests.
A worked example
A support assistant sends about 2,000 tokens of instructions and context with each question and writes back about 500 tokens. It handles 5,000 questions a day and 40% of the input is served from a cache.
What goes in
- Input tokens per request
- 2000
- Output tokens per request
- 500
- Requests per day
- 5000
- Input price per 1M tokens
- $3
- Output price per 1M tokens
- $15
- Input served from cache
- 40 %
- Cache discount
- 90 %
What comes out
Cost per month$1,701.00
- Cost per request
- $0.0113
- Input cost per request
- $0.00384
- Output cost per request
- $0.00750
- Cost per 1,000 requests
- $11.34
- Cost per day
- $56.70
- Cost per year
- $20,695.50
More free tools you might need
FAQs
Frequently Asked Questions
Divide your input tokens by one million and multiply by the input price. Do the same for output tokens at the output price. Add the two. For 2,000 input tokens at $3 and 500 output tokens at $15 per million, a request costs $0.0135.
A token is a chunk of text a model reads or writes. In English, a token is about four characters or three quarters of a word. Other languages and code often use more tokens for the same meaning. Your provider's tokenizer gives the exact count.
Generating each output token takes a full pass through the model, while the input can be processed in parallel. Providers price accordingly, and output is usually several times the input price. Shorter answers are an easy way to save money.
When the start of your prompt is the same across requests, some providers let you cache it and charge a lower price to read it. Enter the share of input that is cached and the discount your provider offers to see the saving.
Divide the number of characters by four for English text. This tool does that if you paste text and leave the input tokens empty. It is a rough guide. For exact counts, use your provider's tokenizer or the token counter in our AI Token Counter and Optimizer.
Trim the prompt, remove unneeded context, cap output length, cache repeated instructions and use a smaller model for simple tasks. Our AI Token Counter and Optimizer compresses prompts and JSON in your browser so you can see the token saving.
No, on purpose. Prices change often, and a stale number gives you a wrong budget. Enter the current prices from your provider. You can try several models by changing the two price fields and comparing the monthly cost.
The daily cost is the cost per request times requests per day. The monthly figure assumes 30 days, and the yearly figure assumes 365 days. Traffic that varies by weekday will shift the real number, so use your average.
No. The calculation and the token estimate run in your browser. Nothing you type or paste leaves your device, so you can safely paste real prompts when estimating cost.
Made by Ovoform
Send form responses straight into your tools
Build a free Ovoform form with AI, then send every response to Slack, Google Sheets, Airtable or your own webhook. Start free.
Build a free formFree to start. No credit card required.
Ready to Build Smart Forms with AI?
Ovoform is your gateway to effortless, intelligent, and high-performing funnel experiences to expand your global reach. Build smarter forms, automate form workflows, and gather powerful insights — all in minutes.
Get Started FreeNo credit card required. Unlimited responses.