LLM API cost calculator

Enter how much text goes in and comes out of each request, how many requests you expect and the per-token prices for your model, and see the monthly bill before you build.

No accountInstant resultsWords or tokens

Enter your usage and prices

The prices below are only examples. Use the current prices for your model.

USAGE AND PRICES

LIVE RESULT

INSTANT

Estimated API cost

Word and character conversions are rough averages for English; code and other languages use more tokens. A month is 365 ÷ 12 days. Taxes and minimum fees are not included.

How LLM API pricing works

Most AI model APIs charge separately for the tokens you send (input) and the tokens the model generates (output), quoted per million tokens. Output usually costs several times more than input. A request's cost is therefore the sum of two parts, and the monthly bill is that cost multiplied by your traffic.

Cost per request = Input tokens × Input price ÷ 1,000,000 + Output tokens × Output price ÷ 1,000,000
Monthly cost = Cost per request × Requests per day × 30.4

Worked example

A support assistant handles 1,000 requests a day, each with 2,000 input tokens and a 500-token reply, at example prices of $3 and $15 per million tokens. Input costs $0.0060 and output $0.0075, so each request costs $0.0135, or $13.50 per thousand. That is about $410.63 a month. Even though the reply is only a fifth of the tokens, it is 56% of the cost.

Monthly cost by traffic

2,000 input and 500 output tokens per request, $3 / $15 per million
Requests per dayTokens per monthCost per month
1007.6M$41.06
1,00076M$410.63
10,000760.4M$4,106.25
100,0007,604.2M$41,062.50

Words, characters and tokens

A token is a piece of a word. For English text, one token averages about four characters, or three-quarters of a word, so 1,000 words is roughly 1,330 tokens. Code, numbers, and languages such as Chinese or Japanese usually need more tokens for the same content, and every model family splits text slightly differently. For exact counts, use your provider's tokenizer or the token counts returned with each API response.

TextWordsApprox. tokens
A short chat message3040
An email200267
A two-page document1,0001,333
A 20-page report10,00013,333

Ways to lower the bill

  • Prompt caching. If most of each request is the same long system prompt or document, caching it can cut the input cost sharply. In the example, serving 75% of input from cache at $0.30 per million lowers the monthly cost from $410.63 to $287.44.
  • Shorter outputs. Because output is the expensive part, asking for concise answers or setting a maximum output length often saves the most.
  • A smaller model for simple steps. Classification, routing and extraction rarely need the largest model.
  • Batch processing. Work that does not need an instant answer can often run through a discounted batch API.

Fitting it into your pricing

Divide the monthly API cost by your active customers to get an AI cost per customer, then treat it as part of the cost of serving them. A product that charges $20 a month and spends $6 of API cost per customer has already used 30% of its gross margin before hosting and support. The margin calculator and CAC payback calculator show how that cost affects pricing and payback.