Home›Costs, break-even & mix

AI usage cost (tokens/API)

API cost of AI use is the amount charged by the provider for the input and output tokens of each request, multiplied by usage volume. It shows whether the sale price or subscription covers the consumption.

Find out how much it costs to use an AI model through an API and whether the cost fits your selling price or subscription. You type the price per million input and output tokens, the average size of each request, daily requests, cache and retries; the calculator shows cost per request, day, month and year, per user and per customer served, the break-even point, and compares up to three models. No vendor price comes preloaded: it is an educational estimate from the values you type.

Educational simulation. Not investment advice. Results are estimates based on the data you enter and do not replace advice from a qualified professional.

Updated on Nov 18, 2026

Made-up, generic example: an assistant with 2,000 requests a day, 1,500 input tokens and 400 output tokens per request. The prices per million tokens are invented, not any vendor’s: replace them with those in your provider’s current price list. To compare, fill in Model B and C; leave the prices at zero to ignore them.

Main model (A): price per million tokens
Average size of each request
Volume and cost adjustments
Business: users, customers and selling price
Comparison (optional): models B and C

Your inputs stay only on this browser and are not sent anywhere. Untick to delete them.

——
—

Before you rely on this result

Prices and sizes are the ones you typed. The calculator carries no vendor’s price list: check the prices per million tokens on your provider’s current page, because they change, and measure the real tokens of a sample of requests.

Real cost is often higher than the simple math. Long conversations resend the history on every turn, and tools, images and model reasoning can generate extra input or output tokens. If that applies to you, raise the average tokens.

Monthly cost × request volume

How AI cost grows with requests per day, for each model typed in. The dashed line is revenue (users and selling price growing in proportion to volume) and the dotted line is model A’s total cost plus fixed costs: where they cross is the break-even volume.

Tap the chart to see the values.

Input × output: where the monthly cost goes

Each model’s monthly cost split into uncached input, cached input and output, retries included. Because output costs more per token, a long answer can weigh more than a large context.

Tap the chart to see the values.

Comparison of the models typed in

Model A worksheet

What is left out of the math

  • Size variation: it uses the average per request; truly long or short requests change the total. If dispersion is high, test larger averages.
  • Other charges: images, audio, search tools, cache storage, fine-tuning, minimum fees, taxes and exchange-rate swings are not included unless you build them into the prices and tokens you typed.
  • Volume or batch discounts: if your contract gives a discount, type the price already discounted.
  • Usage growth: volume is constant within the month; the volume chart assumes users and revenue grow together with requests.

Next step

Take this page’s results to another calculator with the fields already filled in.

The summary lists your inputs, results, formulas, assumptions and sources. The full report also includes the charts and interpretations, in color. In the print dialog, choose Save as PDF.

Method, assumptions and sources

Formulas

Effective input price = input price × (1 − cache share × cache discount); cost per request = (input tokens × effective input price + output tokens × output price) ÷ 1,000,000 × (1 + retry rate)
Cost per day = cost per request × requests per day; cost per month = cost per day × days of use; cost per year = cost per month × 12; cost per user = cost per month ÷ active users; cost per customer = cost per month ÷ customers served
Margin per user = selling price − cost per user; break-even users = fixed costs ÷ margin per user (rounded up); requests per user at break-even = selling price ÷ cost per request; cache savings = cost without cache − cost with cache

Assumptions and limits

  • Constant average size per request, constant volume on every day of use in the month, each retry costs a whole request, the cache discount applies only to the share of input indicated and the year has 12 equal months. In the volume chart, users and revenue grow in the same proportion as requests.
  • No vendor price, price list or contract rule is used: all prices, sizes and rates are the ones the user types. It does not include images, audio, tools, cache storage, fine-tuning, taxes, exchange rates or contract discounts. The example values are made up. Educational estimate, with no recommendation of any model or vendor.

Official sources and references

  • Your AI model provider’s current pricing page (check the price per million input, output and cached tokens for the model you chose).
  • Your provider’s token counter documentation (to measure real tokens from a sample).

Frequently asked questions

How do I calculate AI usage cost by tokens?

Multiply input tokens by the price per million input tokens, add output tokens times the output price, divide by 1,000,000 and apply the retry rate. The result is the cost per request; multiply by requests per day, days in the month and by 12 for the month and the year.

Why does output cost more than input?

Providers generally charge more per generated token than per token read, so a long answer weighs heavily on the bill. Prices are in your provider’s list and change over time: that is why this calculator carries no values and you type your own.

How do I convert words to tokens?

Multiply words by the tokens-per-word factor. The factor depends on the language and the model, and Portuguese and Spanish text usually uses more tokens per word than English. The safest way is to measure a real sample in your provider’s counter and type the factor.

What is the cache discount?

Some providers charge less for the part of the input that repeats across requests, such as fixed instructions and context documents. Type the share of input you expect to be served from cache and your provider’s discount; with no caching, leave 0%.

How do I know if AI fits my subscription price?

Enter the active users and the price per user. The calculator divides monthly AI cost by users, shows the margin per user, how many requests per user the price supports and how many users cover fixed costs.

Does the calculator recommend any model or vendor?

No. It carries nobody’s prices and does not judge answer quality. The example values are made up and generic; compare the costs of the models you type in, but also test each one’s results on your task.

AI usage cost: how to calculate tokens and API spend

Almost every AI service sold through an API charges per token: one price per million input tokens (what you send) and another, usually higher, per million output tokens (what the model answers). To forecast the bill you need three numbers: the average size of each request, how many requests a day, and the price per million tokens of the model you chose.

The math

Input cost = input tokens ÷ 1,000,000 × input price, with the cache discount applied only to the share of input served from cache. Output cost = output tokens ÷ 1,000,000 × output price. Cost per request = (input + output) × (1 + retry rate). Then × requests per day = cost per day; × days of use = cost per month; × 12 = cost per year. Dividing monthly cost by active users gives AI cost per user, which should sit below the subscription price.

Example

Made-up, generic values, not any vendor’s: a model at $1.00 per million input tokens and $5.00 per million output tokens; 1,500 input and 400 output tokens per request; 40% of input served from cache at a 90% discount; 5% retries; 2,000 requests a day, 30 days a month. Effective input price: $1.00 × (1 − 40% × 90%) = $0.64. Input: 1,500 ÷ 1,000,000 × 0.64 = $0.00096; output: 400 ÷ 1,000,000 × 5.00 = $0.00200. With retries: $0.00296 × 1.05 = $0.00311 per request, $6.22 a day, $186.48 a month and $2,237.76 a year. With 500 users that is $0.37 per user; with a $9 subscription and $400 of fixed costs, $8.63 is left per user and 47 users cover the fixed costs.

Using it with care

Check prices on your provider’s current page: they change and vary by model. Measure the real tokens of a sample of requests instead of guessing. Long conversations resend the history on every turn, and tools, images and model reasoning can add tokens. If you only know size in words, use words mode with a factor measured in your language.

What the math leaves out

Size variation between requests, charges for images, audio, cache storage and tools, contract discounts, taxes and exchange rates. Cost is also not quality: compare the models’ answers on your task. Educational estimate, with no recommendation of any model or vendor.