Home / Articles / Business and technology

Article · 2026-11-18

How much AI costs: tokens, API and when it pays off

Using artificial intelligence (AI) through an API (the interface a system uses to call the model) is generally billed per token, and the bill looks small until the volume grows, the context gets long or the model gets more expensive. This article shows how to turn tokens, price per million, cache and volume into a monthly cost and, above all, how to compare it with the value of hours saved to know when it pays off.

We follow a made-up case, Alfa Stationery, which puts an AI assistant in its support chat. Each chart comes explained in three steps (what it shows, how to read it, what decision to make), and the calculation box redoes the math with the chosen scenario. The model prices are invented and editable: none represents a real vendor. At the end, an honest comparison of a spreadsheet, general usage dashboards and SimulaCalc.

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

The case: an AI assistant in Alfa Stationery’s chat

Alfa Stationery is a small online shop. Two people answer the site chat all day, almost always the same questions: order status, delivery time, exchanges. The owner wants to test an artificial intelligence (AI) assistant that answers the repetitive questions and hands the hard ones to a person. Her question is simple: how much does it cost per month, what does the cost depend on and how long until it pays for itself?

The case numbers are made up and simple, so you can redo the math. Each conversation has 6 turns, and each turn is a request (one call to the model). Each request sends 1,800 tokens on average and receives 250 back. There are 5% retries because of failures or discarded answers. The monthly fixed cost (platform, integration and monitoring) is US$ 300 and the one-off cost of setup and training is US$ 4,000. An agent’s hour costs US$ 30.00 (US$ 3,520 salary, 50% payroll taxes and 176 hours a month). Each conversation the assistant resolves saves 0.1 hour (6 minutes), with 80% adoption, 85% quality and 20% of the saved time returned as human review.

The model prices are invented, just for the example: Model A (compact), US$ 0.80 per million input tokens and US$ 4.00 output; Model B (mid-size), US$ 3.00 and US$ 15.00; Model C (premium), US$ 15.00 and US$ 75.00. They match no vendor: always use those on your provider’s current pricing page. Pick a scenario below and follow how the conclusion changes.

Tokens, input, output and price per million

A token is the piece of text the model reads and writes: a word usually becomes one to three tokens, depending on the language and the model. Providers generally charge per token, and the price is usually quoted per million tokens, with different values for input (what you send: instructions, history, documents, the question) and output (what the model generates). Output often costs several times more per token than input, but the ratio varies: type both prices as they appear on your pricing page.

The cost of a request is the sum of the two parts: (input tokens × input price + output tokens × output price) ÷ 1 million, multiplied by 1 + retry rate. In the base case (Model B) that is US$ 0.00961 per request, US$ 0.0576 per 6-turn conversation and US$ 172.94 a month at 100 conversations a day. It looks small, and it is: what changes the game is the size of the context, the model and the volume.

The cache comes in when part of the input repeats from one request to the next (fixed instructions, the catalog, the history). Some providers charge less for the repeated part; the rules (discount, expiry, minimum size) differ, so check yours. In the math, the cache becomes two numbers: the share of input served from cache and the discount. The effective input price is price × (1 − share × discount).

Chart 1: API cost × volume

Monthly API cost × volume, by model

Each line is a model; the slope is the cost per conversation. The dashed line marks the scenario volume.

Tap the chart to see the values.

Chart generated with SimulaCalc. Make your own in the calculator: AI usage cost (tokens/API).

What it shows. The monthly API cost as a function of conversations per day, for the three models, with the context sizes of the chosen scenario. The dashed line marks the scenario volume. Since API cost is variable, each model is a straight line from zero; what sets them apart is the slope, which is the cost per conversation.

How to read it. In the base scenario, at 100 conversations a day, the API costs US$ 46.12 with Model A, US$ 172.94 with B and US$ 864.67 with C a month: C is 18.8 times more expensive than A for the same usage. Doubling the volume doubles every value. Compare with the fixed cost of US$ 300: in the pilot at 15 conversations a day, the fixed cost is 92% of the monthly cost (API of US$ 25.94); with long context and the premium model, the API (US$ 4,252.50) becomes the largest part.

What decision to make. Before debating which model, check whether the API is the relevant part. If it is small, choose by answer quality. If it is large, cut input tokens, use cache or give the easy questions to a smaller model. Before switching to a smaller model, test its quality on a real batch of conversations.

Chart 2: where the cost comes from (input, cache and output)

Where the API cost comes from: input, cache and output

Monthly API cost of the scenario, split into uncached input, input served from cache and output, for each model.

Tap the chart to see the values.

Chart generated with SimulaCalc. Make your own in the calculator: AI usage cost (tokens/API).

What it shows. The monthly API cost of each model, split into three parts: uncached input, input served from cache and output. The sum of each column is the scenario’s API cost for that model.

How to read it. In the base scenario output is 41% of Model B’s cost per request, even though it has only 250 tokens against 1,800 of input: the price per output token is higher. In the long-context scenario (12,000 input tokens) output weighs less (20%) and input takes over. That is where the cache helps: with 80% of the input coming from cache and a 90% discount, Model C’s API falls from US$ 4,252.50 to US$ 1,803.06 a month, a 58% reduction, or US$ 2,449.44 a month.

What decision to make. Measure the share of input that really repeats (instructions, catalog) and confirm your provider’s cache rules before counting on the discount. For long answers, the way out is shortening the output (instruct the format and length). Do not count on a cache your provider does not offer or that does not apply to your usage.

Chart 3: value of hours saved × monthly cost

Value of hours saved × monthly cost, by model

The gain is the same for all three (same quality assumed); the cost adds the model’s API and the monthly fixed cost.

Tap the chart to see the values.

Chart generated with SimulaCalc. Make your own in the calculator: ROI of automation and AI tools.

What it shows. For each model, the monthly value of the hours saved (green) and the total monthly cost, which adds the model’s API to the fixed cost. The gain is the same for all three, because the same answer quality is assumed; it is the chart’s strongest assumption.

How to read it. In the base scenario the gain is US$ 4,896.00 a month (163.2 net hours at US$ 30.00 an hour), against US$ 172.94 of API plus US$ 300 fixed. The API is only 3.5% of the gain; the net result is US$ 4,423.07 a month. With long context and Model C the API cost (US$ 4,252.50) eats 87% of the gain and the net result falls to US$ 343.50; with Model A it would be US$ 4,369.20.

What decision to make. Choosing the model is comparing quality with cost, not just price. If Model A resolves almost as much as C, the cost difference is profit. If it resolves much less, the gain drops and the math changes: that is why the chart assumes the same quality and the ROI calculator lets you test different qualities. A saved hour only becomes money if the free time goes into other work or cuts paid hours; otherwise it is a capacity gain.

Chart 4: cumulative cash and payback

Cumulative cash and payback

It starts at minus the one-off cost and rises by the net monthly result. The dot marks the payback of the scenario’s model.

Tap the chart to see the values.

Chart generated with SimulaCalc. Make your own in the calculator: ROI of automation and AI tools.

What it shows. The cumulative cash over 18 months, for the three models, starting from the one-off cost of US$ 4,000. Each month adds the net monthly result (gain − API − fixed cost). The dot marks the payback, the first month in which cumulative cash reaches zero, for the scenario’s model. ROI (return on investment) measures the same thing as a percentage of the cost.

How to read it. In the pilot, the net result is US$ 408.46 a month and payback takes 10 months. In the base scenario payback is 1 month. With long context and Model C, the net result of US$ 343.50 a month takes 12 months to recover the investment; a price rise or more usage already stretches that period a lot. With cache, payback returns to 2 months.

What decision to make. Set the acceptable payback in advance (for example, 6 or 12 months) and check whether the pessimistic scenario still passes. If the pilot has a long payback, the cause is the fixed cost and low volume, not the API: raise the volume served, cut the fixed cost or wait for volume to grow before investing.

The calculation step by step

The box below redoes the math with the numbers of the chosen scenario, following the same script as the AI cost and automation ROI calculators. Change the scenario and check each line.

The calculation step by step, with the numbers of the chosen scenario

It is the script a spreadsheet requires and the SimulaCalc calculators do on their own.

Two readings are worth it. First, the gain per conversation (US$ 1.63) is far larger than the API cost per conversation in the base scenario (US$ 0.0576), so almost the whole decision lies in the fixed cost and the gain. Second, the minimum volume only says how much is needed to cover the monthly fixed cost; the one-off cost is recovered by the payback.

The four scenarios

Pilot (15 conversations a day). The API costs US$ 25.94 a month and the fixed cost dominates. The net result is US$ 408.46 a month and payback is 10 months. The conclusion: it works, but slowly; the pilot serves to measure adoption, quality and review, not to pay for the setup.

Normal operation (100 conversations a day). With Model B, the API costs US$ 172.94 a month, the gain is US$ 4,896.00 and payback is 1 month. The conclusion: the AI cost is small next to the gain, and what weighs most is the fixed cost and the assumption about hours saved.

Long context with a premium model. If each request carries 12,000 input tokens and the model is C, the API rises to US$ 4,252.50 a month and nearly ties with the gain: net result of US$ 343.50 and payback of 12 months. The conclusion: the same idea stops paying off when context and model grow together.

Long context with cache. With 80% of the input coming from cache and a 90% discount, the API falls to US$ 1,803.06, the net result rises to US$ 2,792.94 and payback is 2 months. The conclusion: when the repeated part is large, the cache changes the result. It only holds if your provider offers that discount under the assumed conditions.

Spreadsheet, general app or SimulaCalc: comparison table

The same math can be done in three ways. None is right for everyone: it depends on whether you already have real data, need to forecast and how much you want to build by hand.

Three ways to do the same math

Compares a spreadsheet, the category of apps and usage dashboards from AI providers and monitoring tools (no products named) and SimulaCalc. About third parties, only general statements: check what your tool offers.

CriterionSpreadsheet (Excel, Google Sheets)General app or usage dashboardSimulaCalc
Starting dataYou build the cells, formulas and layout.Usually show actual consumption that already happened (tokens and cost), when the tool offers such a dashboard.You type prices, tokens and volume; the math and the chart come ready.
Before you use it (forecast)Possible, but each new question becomes a new formula.Usually look backwards; forecasting a volume that does not exist yet tends to need another calculation.Built to forecast: change the volume, the cache or the model and the result redraws.
Cache and retriesYou include them in the cost-per-request formula.Depend on the tool separating these items; check the documentation.Dedicated fields for cached share, discount and retry rate.
Comparing modelsOne column per model, copying the formulas.Show the models you actually used, not the ones you are considering.Up to three models side by side, with prices you type.
Gain, ROI and paybackAnother sheet with more formulas and care with rounding.Usually out of scope; they tend to show cost, not gain.A separate ROI calculator, with the same logic as this article.
Third-party prices and dataYou type and update by hand.May bring prices or consumption from the provider itself; check the date and the source.It brings no vendor price: everything is typed, and you check the current pricing page.

In practice, usage dashboards (when they exist) are great for measuring what already happened, and a spreadsheet or calculator serves to forecast what has not happened yet. The ideal is to use both: measure with real data and forecast with SimulaCalc or your own spreadsheet.

Step by step in each tool

See how to do the same analysis in a spreadsheet, with your provider’s usage data and in SimulaCalc.

Step by step in each approach

The same analysis (API cost, gain and payback) in each approach. The first block opens by default.

Spreadsheet (Excel, Google Sheets)
  1. In one column, type the case data in B1 to B10 and the cost-per-request formula in B11, as below.
  2. Multiply by the monthly volume in B12 and then build the hours gain (B13 to B18), the net result and the payback.
B1  conversations per day        100
B2  turns per conversation        6
B3  days per month                30
B4  input tokens                  1800
B5  output tokens                 250
B6  input price per million       3
B7  output price per million      15
B8  share of input from cache     0        (0.8 = 80%)
B9  cache discount                0        (0.9 = 90%)
B10 retries                       0.05
B11 cost per request              =(B4*B6*(1-B8*B9)+B5*B7)/1000000*(1+B10)
B12 API cost per month            =B11*B1*B2*B3
B13 hours saved per conversation 0.1
B14 adoption                      0.8
B15 quality                       0.85
B16 human review                  0.2
B17 cost of an hour               =3520*(1+0.5)/176
B18 monthly gain                  =B1*B3*B13*B14*B15*(1-B16)*B17
B19 monthly fixed cost            300
B20 net result                    =B18-B12-B19
B21 one-off cost                  4000
B22 payback (months)              =IF(B20>0,ROUNDUP(B21/B20,0),"not recovered")

Function names and the argument separator (comma or semicolon) depend on the language and regional settings of the spreadsheet; check those of your version. To compare three models, repeat B6, B7 and the formulas in three columns (B, C, D) and use the same volume cells.

App or AI provider usage dashboard

The steps vary with the tool; those below hold for the category in general. Check your provider’s documentation.

  1. Open the usage or cost dashboard, if your account has one, and note the input and output tokens of a real period and the amount billed.
  2. Divide the tokens and the cost by the number of requests or conversations of the same period to get real averages.
  3. Use those averages in place of the assumed values in a spreadsheet or in SimulaCalc to forecast a larger volume.
SimulaCalc
  1. Open the AI usage cost calculator and type the prices per million tokens (input and output) of up to three models, tokens per request, requests per day, days per month, retries, cached share and discount.
  2. Read the cost per request, per day, per month and per conversation, and the cost × volume chart.
  3. Open the automation ROI calculator, type the hours saved, adoption, quality, human review, the cost of an hour and, in other monthly costs, the API from the previous step plus the fixed cost.
  4. Read the payback, ROI and the break-even hours; test a pessimistic scenario.

When to use each approach and common mistakes

Use the spreadsheet if you already have a financial model and want the math inside it. Use your provider’s usage dashboard (if there is one) after the assistant is running, to replace assumptions with real averages. Use SimulaCalc before buying, to test volumes, cache and models and see the payback, and afterwards to redo the forecast with real data.

Formulas and assumptions

These are the same formulas as the AI usage cost and automation ROI calculators (here with a 1-month adoption ramp).

What if you sell the assistant as part of your product?

In Alfa’s case the AI is an internal cost that saves hours. If, instead, you offered the assistant to customers inside a product or subscription, the reasoning changes: the API cost becomes a variable cost per customer, and you need a price that covers it and the fixed cost. The AI cost calculator gives the cost per user and the number of users needed to cover the fixed cost; the SaaS (software sold by subscription) pricing one helps compare plans. Both are in the next steps.

Frequently asked questions

What is a token and how do I know how many I use?

It is the piece of text the model reads and writes; a word usually becomes one to three tokens, depending on the language and the model. The exact count comes from your provider’s token counter or API response; when planning, use an average per request measured on real samples.

Why does output cost more than input?

Providers generally charge more per output token than per input token, but the ratio varies between them and changes over time. That is why the calculator asks for both prices: type those from your provider’s current pricing page.

Does the cache always lower the cost?

Only when part of the input repeats and your provider offers a discount for it, under its conditions (expiry, minimum size, discount). Measure the share that really repeats and test with little data before counting on the saving.

Is the API cost the total cost of the assistant?

No. There is the fixed cost (platform, integration, monitoring), the one-off cost of setup and training and the human review time. In Alfa’s case, the API is only a fraction of the cost in the base scenario and the largest part in the long-context scenario.

Is a saved hour money in the bank?

Only if the free time goes into other work, more sales or fewer paid hours. If the team keeps paying the same hours, the gain is capacity, and a cash payback is optimistic.

Are the article’s prices from any vendor?

No. The prices of Models A, B and C, the salary, the payroll taxes and the costs are made up for the example. Always use your provider’s current prices and your own costs.

Can I use this math to price a product with AI?

It helps you know the variable cost per customer, but the price depends on the market, margin and fixed costs. Use the AI cost calculator (cost per user) and the SaaS pricing one, and test scenarios.

References

Continue in the calculators

When you have your own numbers, use the calculators below with your provider’s current prices.

Next step

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