Tools / LLM API Cost Calculator

LLM API Cost Calculator.

Work out per-request, daily and monthly LLM API costs from your token counts and per-million-token prices.

Runs in your browser

Prompt-cache hits are part of the input tokens and are billed at the cached price.

Copy the current price from your provider's pricing page.

Leave empty to bill cached tokens at the normal input price.

For example a batch-processing or committed-use discount.

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Costs
Breakdown per request

About LLM API Cost Calculator

The LLM API Cost Calculator turns token counts into money. Enter how many input and output tokens a typical request uses, the prices per million tokens from your provider's pricing page, and how many requests you expect per day; the calculator shows the cost per request, per thousand requests, per day, per month and per year, plus a breakdown of what the input, cached input and output parts cost. The tool deliberately ships without a built-in price list. Model prices change often and differ by region, tier and contract, and a stale table is worse than no table, so you type the prices you actually pay. Prompt caching is modelled the way providers bill it: cached tokens are part of the input tokens and are charged at the lower cached rate, so a 2,000-token prompt with a 1,500-token cached prefix pays the full input price for only 500 tokens. A discount field covers batch processing or negotiated rates. Example: 2,000 input tokens with 1,500 cached, 500 output tokens, prices of 1.25, 0.125 and 10 per million, and 10,000 requests a day come to about 1,744 per month, and the breakdown shows that output tokens are most of it. A common mistake is forgetting that output usually costs several times more than input, so trimming verbose answers saves more than shortening prompts. Prices are entered in whatever currency you use; all calculations run in your browser.

How to Use

  1. Enter the input, cached input and output tokens of a typical request; the token counter helps if you only have text.
  2. Copy the per-million-token prices for your model from the provider's pricing page.
  3. Set requests per day and days per month to see daily, monthly and yearly cost.

Frequently Asked Questions

Why are there no model prices built in?

Prices change frequently and depend on region, tier and agreements. Entering the price you pay keeps the result correct; a built-in table would silently go out of date.

How are cached tokens counted?

Cached tokens are a subset of input tokens. They are billed at the cached price, and the remaining input tokens at the normal input price. Cache-write surcharges are not included; add them to the input price if your provider charges them.

Does it include reasoning or thinking tokens?

Count them as output tokens. Most providers bill reasoning tokens at the output rate even though they are not shown in the reply.

Is anything sent to a server?

No. The calculation runs in your browser.

Related Tools