LLM API Cost Calculator

Enter current contract prices and usage assumptions. Cached tokens count as part of the input total; this projection is not a provider billing quote.

Runs locally in your browser
Prices are entered by you so the calculator never relies on stale provider rates. All arithmetic stays in this browser.
Usage per request
Request volume
Cost projection
Estimated monthly cost—

Use current contract prices

Providers change model names, discounts, cache rules and regional pricing. Copy the current rates from your own billing source and model both average and peak request volume.

How to estimate LLM API costs

Enter the tokens one request uses — total input, how many of those are cached, and output — then set the request volume and the three per-million prices from your own contract. The page projects the spend per request, per day and per month.

The arithmetic runs in this browser and the figures you type are not uploaded. Because the prices come from you, the projection can follow any provider's current rate card, and it stays a planning estimate rather than a billing quote.

  1. Fill in the tokens for a single request: the full input count, the cached part of that input, and the output tokens. Cached tokens must not exceed the input total — the page warns instead of returning a figure if they do.
  2. Set the request volume: how many requests run per day, and how many days the month is billed for.
  3. Enter the input, cached-input and output prices per 1 million tokens as your contract states them, and change the currency symbol if you need another one — up to 4 characters are shown.
  4. Read the projection: per request, per day and per month, plus monthly tokens and cache savings. Every field recalculates as you type; Load sample values fills the defaults and Clear resets the form.

How the projection is calculated

The formula behind each figure

Cost per request = ((input − cached) × input price + cached × cached price + output × output price) ÷ 1,000,000. The daily figure multiplies that by requests per day, and the monthly figure by the billing days you set.

Cache savings translate the cached tokens into money: what they would have cost at the full input price minus what they cost at the cached price, across the billing month. Monthly tokens add input and output for every request in that month. Amounts below 0.01 are shown with up to six decimal places, larger ones with two.

What the projection does not include

Only the three prices you enter are used. Items billed separately — minimum charges, batch or committed-use discounts, cache-write fees, image or audio tokens — are not part of the formula and have to be added by hand. Token counts from a provider's tokenizer can also differ from your own numbers.

Prices, model line-ups and cache rules change on the provider's schedule, so treat the result as a planning figure and check one real invoice against it before the number goes into a budget.

Private by design

The calculation is browser JavaScript. With the page loaded, editing fields and pressing Calculate produce no network request, and the token counts, volumes and prices you enter are not stored anywhere.

The workbench therefore stays usable offline and on figures you would not paste into a third-party service. Because the same formula is applied to your inputs, a spreadsheet with identical numbers should agree with the result.

Recent tools: