LLM Cost Calculator Widget
Help developers and product managers budget an AI feature. Enter input and output tokens per request - or words, estimated at OpenAI's rule of thumb - requests per day and the provider's price per million tokens, and see the cost per request, per day and per month. No built-in price list: prices are typed from the provider's current page.
Live preview
Under the widget on your page: Powered by A2Z Tools
Embed code
<iframe src="https://a2z.tools/embed/w/llm-cost-calculator" title="LLM Cost Calculator by A2Z Tools" width="100%" height="700" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>
A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.
<div data-a2z-widget="llm-cost-calculator" data-height="700"></div> <script async src="https://a2z.tools/embed.js"></script>
Adds a small script (what it does) that sizes the widget to fit its content, loads it lazily and keeps it isolated from your page's CSS.
Works with
How it works
LLM APIs bill input (prompt) tokens and output (completion) tokens separately, usually as a price per million tokens, and output is normally the dearer of the two. The cost of one request is input tokens x input price / 1,000,000 plus output tokens x output price / 1,000,000. Multiplying by requests per day and by days per month gives the daily and monthly bill. With 1,500 input and 500 output tokens at 3 and 15 per million, each request costs 0.012 and 1,000 requests a day cost 12 a day, 360 a month. If only word counts are known, the widget converts them with OpenAI's published rule of thumb that 100 tokens are approximately 75 words (tokens = words / 0.75, rounded up) and flags the estimate. The bar shows how the cost splits between input and output - often the clue to where savings lie. Prices are deliberately not built in, because they change often; copy them from your provider's pricing page.
Calculation method
- Cost per request = input tokens x input price per 1M / 1,000,000 + output tokens x output price per 1M / 1,000,000
- Cost per day = cost per request x requests per day; per month = per day x days per month
- Word estimate: tokens = ceil(words / 0.75) (OpenAI: 100 tokens ~ 75 words)
- Tokens per month = (input + output tokens) x requests per day x days
Worked examples
Chatbot budget
Inputs: 1,000 input + 500 output tokens; 1,000 requests a day; 3 and 15 per 1M; 30 days
Result: 315 a month; 10.50 a day; 0.0105 a request
1,000 x 3 / 1M = 0.003; 500 x 15 / 1M = 0.0075; total 0.0105 x 1,000 x 30 = 315.
From word counts
Inputs: 1,500 words in, 300 words out; 200 requests a day; 0.50 and 1.50 per 1M
Result: 9.60 a month; 0.0016 a request; 2,000 + 400 tokens per request (estimated)
1,500 / 0.75 = 2,000 tokens; 300 / 0.75 = 400 tokens.
Limitations
- Word-to-token conversion is an English-language rule of thumb, not a tokenizer count.
- Does not model cached input, batch discounts, reasoning tokens, tool calls, rate-limit tiers or taxes.
- Prices must be entered by the reader and kept up to date.
Where publishers use it
- A startup's engineering blog budgeting a customer-support chatbot
- An AI consultancy's proposal page estimating running costs for clients
- A developer-tools newsletter comparing prompt lengths
- An internal wiki page for teams requesting an LLM budget
- A course on building with AI APIs, in the lesson on cost control
Questions
Why are input and output priced differently?
Generating each output token takes a full pass of the model, while input tokens are processed together, so most providers charge several times more for output. In the default example output is 500 of 2,000 tokens but 62.5% of the cost.
How many tokens is a word?
OpenAI's rule of thumb for English is that 1 token is about 4 characters and 100 tokens are about 75 words. Code, numbers and many non-English languages need more tokens per word, so the estimate can be low.
Where do I find the prices?
On your provider's official pricing page, usually as a price per 1 million input tokens and per 1 million output tokens. Prices change and differ by model, region and tier, which is why the widget does not ship a price list.
Does the calculator include cached or batch pricing?
No. Prompt caching, batch APIs, fine-tuned models, image or audio inputs and reasoning tokens are billed differently. Enter an effective blended price if you want to approximate them.
How can I reduce the cost?
Shorten repeated system prompts, send only relevant context, cap output length and route simple requests to a smaller model. The input/output bar shows which side dominates your bill.
Which currency are the results in?
The currency set for the widget. Enter prices in that same currency - for example convert a USD price list to INR before typing it - and every result follows.
Sources
- Understanding and counting tokens - OpenAI Help Center . 1 token is approximately 4 characters; 100 tokens are approximately 75 words; estimates vary by language. Checked 2026-10-01.
Cite or recommend this tool
If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.
A2Z Tools LLM Cost Calculator https://a2z.tools/llm-api-cost-calculator
<a href="https://a2z.tools/llm-api-cost-calculator">A2Z Tools LLM Cost Calculator</a>
[A2Z Tools LLM Cost Calculator](https://a2z.tools/llm-api-cost-calculator)
LLM Cost Calculator by A2Z Tools - https://a2z.tools/llm-api-cost-calculator
Related widgets
-
Estimated GPU memory to run a language model: weights by precision plus KV cache and overhead.
-
Pretty-print, minify or validate JSON, with the line and column of the first syntax error.
-
Return on investment as a percentage, plus the annualised figure when you add the period.
-
Convert a JSON array of objects to CSV and CSV back to JSON, with RFC 4180 quoting.
-
Encode text to Base64 or decode it, with proper UTF-8 and an optional URL-safe alphabet.
-
Percent-encode or decode text and URLs, and find the exact position of a malformed escape.