All tools
Interactive calculator · free · no signup

LLM API cost calculator

Enter your model's price per million input and output tokens, your average tokens per request, and your daily request volume; get cost per request, per day, and per month — with an optional prompt-caching discount.

From your provider's pricing page.
Share of input served from cache.
Discount multiplier on cached tokens.

1,800.00 per month at 5,000 requests/day.

Cost / request
0.01
Cost / day
60.00
Cost / month
1,800.00

Output tokens usually cost several times more than input. Prices change often — always paste current provider prices.

How it works

You supply the prices yourself: cost per one million input tokens and per one million output tokens, taken from your provider's current pricing page. The calculator deliberately hardcodes nothing — model prices change too often for baked-in numbers to stay honest, and a calculator quoting stale prices is worse than no calculator.

From your average input and output tokens per request, it computes cost per request as (input tokens times input price plus output tokens times output price) divided by 1,000,000. Multiplying by requests per day and roughly thirty days gives daily and monthly figures. Output tokens usually cost several times more per token than input, so the input/output split matters more than the total.

The optional caching section models prompt caching: you set what percentage of input tokens are served from cache and the price multiplier your provider applies to cached tokens. Cached input is billed at the discounted rate, the remainder at full price — a realistic model for workloads with a large shared system prompt or repeated context.

Assumptions and limitations

Frequently asked questions

How do I calculate the cost of an LLM API call?

Multiply input tokens by the input price per million, multiply output tokens by the output price per million, divide each by one million, and add them. The two rates are almost always different — output tokens typically cost several times more — so estimating the split matters as much as estimating the total.

Why doesn't this calculator include current model prices?

Because they change frequently enough that any hardcoded list would mislead someone within months. You paste prices straight from your provider's pricing page, which keeps the calculation trustworthy regardless of when you use the tool or which model you are evaluating.

How much does prompt caching reduce LLM API costs?

It depends on two numbers you control in this calculator: the share of input tokens served from cache and the cached-token price multiplier your provider charges. Workloads with a long, stable system prompt and short user turns see the biggest reduction; workloads where every request is unique see almost none.

How do I find out how many tokens my requests use?

The most reliable source is the usage metadata your provider returns with each API response, which reports exact input and output token counts. Log those for a representative sample of real traffic and use the averages here. For rough planning before you have traffic, a heuristic like four characters per token gets you in the ballpark.

Are the prices and volumes I enter here sent anywhere?

No. All arithmetic runs client-side in your browser. Your pricing, token counts, and request volumes are never transmitted, logged, or stored.