Formula: LLM API Monthly Budget Calculator
- R: Requests per day
- I,O: Average input and output tokens per request
- pᵢ,pₒ: Input and output price per million tokens
Turn daily request volume and token averages into a monthly API budget.
Use an example rate card of $2/M input and $8/M output for a 30-day month.
Use your provider’s current pricing page and enter the rate for your selected model and tier.
Because each output token is priced higher. In the example, output costs 8 per million and input 2 per million, four times as much. The 18 million output tokens therefore cost $144.00 while the 60 million input tokens cost $120.00. Check the ratio on your own provider's rates, since it decides which side to optimise first.
Everything the model reads for a request: the system prompt, instructions, examples, earlier conversation turns you resend, retrieved documents and any tool definitions billed as input. The user's own message is often a small part. Take the figure from your provider's usage data rather than counting only the visible prompt.
If your provider bills them as output tokens, yes. Models that produce internal reasoning can generate many more billed tokens than the visible answer contains. Use the output token count from usage data, which normally includes them, rather than measuring the length of the final reply.
Set Billing Days to the number of working days in the month and Requests per Day to a typical working-day volume. The two fields multiply to give monthly requests, so what matters is that their product matches the traffic you expect. Entering 30 days with a weekday volume would overstate the month.
Multiply the per-thousand price by 1,000 to get the per-million figure the fields expect. A mistake here shifts the result by a factor of a thousand, so if the monthly estimate looks absurdly small or large, the rate unit is the first thing to check.
No. It only changes the symbol shown on the results. Enter the rates already in the currency you selected. If your provider bills in a different currency, convert both rates yourself, and allow for card or bank conversion charges, which the calculator does not include.
Use your own logs. Count requests that were sent more than once, whether by your code after a timeout or by users regenerating an answer, and express them as a share of total requests. Add that share to the estimate, or include the retried requests in Requests per Day so the formula counts them directly.
It can. The formula bills every input token at the full input rate. If your requests share a long fixed prefix and your provider discounts cached input, the real input cost will be lower. Use the prompt caching savings calculator to estimate the reduction, then subtract it from the input line here.
The formula is linear: monthly cost is requests multiplied by a fixed cost per request. At the defaults that is 0.88 cents per request at 600, 1,000 or 1,500 requests a day. Volume discounts, committed spend agreements or tier changes would bend that line, and you would need to enter the rate that applies at your volume.
Divide the month's billed input and output tokens by the number of requests to get true averages, enter those along with actual volume and billing days, and compare. A small gap usually comes from tax or retries. A large one often means history, retrieved context or tool definitions were missing from the input estimate.
Not in a single run, since the calculator assumes one set of averages and one pair of rates. Run it once per feature or model, using each one's own request volume, token averages and rates, then add the monthly totals. That also shows which feature drives most of the spend.
Yes, if it is billed to the same account. Evaluation runs, prompt experiments and staging environments all consume tokens at the same rates. They are easy to forget because they do not appear in product analytics. Either add their request volume to Requests per Day or run a separate estimate for development use and add it to the production figure.
The default workload is 1,000 requests a day over a 30-day billing month, so 30,000 requests. Each request sends an average of 2,000 input tokens and gets back 600 output tokens. The rates are example figures, 2 per million input tokens and 8 per million output tokens, in whatever currency you select.
Over the month that is 60 million input tokens and 18 million output tokens, 78 million in all. Input costs $120.00 and output costs $144.00, for an estimated monthly cost of $264.00.
Look at the split. Output is less than a quarter of the tokens but more than half the bill, because each output token is priced at four times an input token in this example. That ratio between the two rates is the first thing to check on your own provider's rate card, since it decides which half of your usage deserves the most attention.
The example rates are placeholders, not anyone's current price. The page asks you to take rates from your provider's pricing page, and the estimate is only as current as the numbers you type in.
The two token fields ask for average billed tokens per request. Billed is the key word. Input tokens are not just what the user typed. They include the system prompt, any instructions or examples you prepend, conversation history you resend each turn, retrieved documents, and tool definitions if your provider counts them as input.
For a chat product, history is usually what drives the average up. A conversation that resends every earlier message grows its input with each turn, so the tenth message in a thread can cost several times the first. Averaging across all requests captures that, but only if you measure real conversations rather than single test prompts.
Output tokens are the generated text. If your model produces reasoning or thinking tokens that are billed as output, include them too, even if they are never shown to users. They can be a large share of output on some models.
The most reliable source is the usage data your provider returns with each response, or its billing dashboard. Take total input and output tokens over a recent period and divide by request count. Estimating from character counts works for a first guess, but it can be well off for code or languages other than English.
Requests per Day multiplies everything. At 600 requests a day the month covers 18,000 requests and the estimate falls to $158.40, made up of $72.00 input and $86.40 output. At 1,500 a day it covers 45,000 requests and rises to $396.00, with input at $180.00 and output at $216.00.
Because the relationship is linear, the cost per request never changes with volume here. At the defaults each request costs 0.88 cents, and that holds whether you send ten requests or ten million. Real bills can bend away from a straight line when providers apply volume tiers, committed-use discounts or rate limits that force you onto a different plan, none of which the formula includes.
Use an average day, not a peak day. If your traffic is uneven, with busy weekdays and quiet weekends, the daily figure should be total monthly requests divided by the billing days you enter, so that the two fields multiply back to the real monthly count.
For a launch or a growth forecast, run several volumes. The low and high cases give a range to budget against, which is more honest than a single figure for traffic you have not yet seen.
Because output is priced higher in the example, trimming it saves more per token than trimming input. Double the output per request from the default 600 tokens and the output line doubles from $144.00 to twice that, adding $144.00 to the month. Double the input per request from the default 2,000 tokens and the input line doubles, adding $120.00.
So in this example, a change to output length moves the bill more than a similar-sized change to input, even though input tokens are more than three times as numerous. With your own rates the balance may differ, so test both.
Output is often easier to control as well. A maximum token limit, an instruction to answer briefly, or a structured format with fixed fields can cut average output without touching the quality of the input. Input reductions usually mean shorter prompts, less history or fewer retrieved passages, which take more care to get right.
Check whether a lower output cap causes truncated answers that users then retry. A retried request costs the whole input again, which can cancel the saving.
Billing Days defaults to 30 and accepts 1 to 31. It simply multiplies daily requests to give the monthly total, so the right number is the count of days you expect traffic in the month you are budgeting.
For a product used every day, enter the actual length of the month. A 31-day month costs a thirtieth more than a 30-day one at the same daily volume, which is small but adds up across a year of forecasts.
For a tool used only on working days, enter the number of working days instead and set Requests per Day to the volume on a working day. Entering 30 days with a working-day volume overstates the month by a lot.
For a batch job that runs a few times a month, it can be easier to set Billing Days to the number of runs and Requests per Day to the requests in each run. The formula does not care what a day means, only that the two fields multiply to the right total.
Input Rate and Output Rate are both per million tokens, shown on the form as currency / 1M tokens. If a rate card quotes per thousand tokens, multiply by 1,000 before entering it. Getting this wrong makes the estimate a thousand times too small or too large, which is at least easy to notice.
The currency selector changes the symbol on the results but does no conversion. If your provider bills in US dollars and you want a budget in another currency, convert the two rates yourself at the rate you expect to pay, and select that currency. Card or bank conversion charges are not included.
Some providers price differently for long prompts, for batch jobs, for cached input or by region. Enter the rate that matches how your requests are actually billed. If a share of your traffic is billed at a different rate, run the calculator once for each part and add the results.
Taxes are excluded, as the page notes. If your provider adds sales tax or VAT to the invoice, increase the monthly estimate by that percentage.
The page lists rate tiers, cached tokens, tool fees, long-context rates, taxes and retries as exclusions. In practice two of these move most budgets.
Retries add cost. A request that times out, fails a format check or gets regenerated by the user is billed again. If 5% of requests are retried, the real bill is about 5% higher than the estimate. Count retries in your request volume or add a matching margin to the result.
Caching can take cost away. Many providers charge less for input tokens that repeat an earlier prompt prefix, such as a long system prompt sent with every request. This calculator bills every input token at the full rate, so for workloads with a large shared prefix it can overstate input cost. The prompt caching savings calculator linked from the page is built to estimate that discount.
Paid tools, such as web search or code execution billed per call, are a separate charge. Add them on top of the token estimate if your application uses them.
A budget built from averages will be wrong in one direction or the other, so plan for that. A simple approach is to run three cases: a low case from current traffic, the expected case, and a high case with more volume and longer conversations. Budget for the expected case and set a spending alert near the high one.
Recalculate after the first few weeks of real traffic. Divide actual monthly tokens by actual requests, enter those averages, and compare the estimate with the bill. If the two differ by more than the retry rate and tax, something in the token measurement is off, often uncounted history or tool definitions.
The Monthly tokens line, 78 million at the defaults, helps with this check, since most provider dashboards report usage in tokens as well as money. Compare it directly with the token total on your usage report for the same period.
If you are choosing between models, the AI model cost comparison calculator runs the same workload at two rate cards side by side.