Price per 1M logo

How to estimate your monthly AI bill before you write the code

Token prices are per million tokens; budgets are per month. Here is the arithmetic that connects them — and the three assumptions that decide the answer.

By Mohammad Ghonchegi, editor and maintainer·Published ·Updated ·3 min read

Every price on this site is a rate per one million tokens. Nobody has a bill measured in millions of tokens — bills arrive monthly, in dollars, with a line for input and a line for output. The gap between the two is four multiplications and a judgement call about cache, and it is where most AI cost estimates go wrong by an order of magnitude.

The formula

Cost per month = requests per day × 30 × [ (input tokens × input rate) + (output tokens × output rate) ] ÷ 1,000,000, after subtracting whatever share of input tokens your cache actually serves.

  1. Count the tokens per request. Not characters, not words. A support reply that reads like 60 words is often 120 tokens of input once the system prompt is included — the system prompt is usually the largest single line item in a chat product.
  2. Count the requests. Daily active users × messages per session × sessions per day. Use the number you expect in month six, not week one: token bills scale with usage, and nothing else on your infrastructure does.
  3. Decide the cache hit rate. If you resend the same system prompt or the same retrieved context on every call, a cache read covers it, and this is the single largest lever available (see the dedicated article below).
  4. Multiply by the model you will actually ship, then by your expected model mix if you route cheap work to a small model.
  5. Add the tail. Output tokens are billed at a higher rate than input on almost every model here — the median output rate is ${usd(medianOutput)} against a median input rate of ${usd(medianInput)} — so a feature that answers at length looks cheap per request and expensive per month.

The three assumptions that decide the answer

  • Tokens per request. The most common error is counting the user's message and forgetting the system prompt, tool schemas and retrieved context that travel with it.
  • Requests per month. Volumes in production are rarely linear in the way a spreadsheet assumes; support volume has a weekly shape and an incident tail.
  • Cache hit rate. A cache read is billed at a lower rate than fresh input on every model in this index that publishes one, and the size of the discount varies by provider — compare the cached column before assuming a number.

What the estimate should exclude

Committed-use agreements, batch pricing, regional rate cards and free tiers all sit outside the rates this index normalises. They can move a real bill substantially in either direction, so record them as a separate line rather than folding them into the estimate. Every model page states its exclusions explicitly; the methodology page lists them once.

Sanity-check it against a monthly table

Model pages on this site publish four monthly workloads for the model in front of you — 1k, 10k and 100k requests a day at a fixed token profile, plus a document-summarisation profile. If your spreadsheet disagrees with those rows, one of the two has the wrong token count.

Put your own numbers against 1557 priced chat models.

Open the cost calculator

Frequently asked

› Is a per-token price enough to budget with?

No. A per-token price is an input to your bill, not the bill. You need three multipliers: tokens per request, requests per month, and the share of input tokens that can be served from cache. Any estimate that skips one of them is scenery, not a forecast.

› Should I budget with the cheapest model in the index?

Budget with the model you intend to ship, then price the fallback separately. The cheapest model in the index changes weekly and is not always capable enough for the task; a plan built on the floor of the market breaks the first time you switch models.

› How much error should I expect in the estimate?

Treat anything within a factor of two as a success for a new feature. Request length, cache hit rate and output length are all guesses in week one, and all three multiply the result.

Where the numbers come from

The data pages this article draws on — check any figure against them, they are recomputed on every refresh.