Investing
Scaling to a volume
The per-request cost multiplies linearly by the number of requests, and the annual figure is twelve times the monthly one. Nothing compounds in an API bill.
Last updated
The Formula
monthly cost = cost per request x requests per month
The per-request cost multiplies linearly by the number of requests, and the annual figure is twelve times the monthly one. Nothing compounds in an API bill.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| c | Cost per request | currency | The full cost of one call. |
| n_m | Requests per month | requests | How many calls are made in a month. |
| C_m | Monthly cost | currency | The bill for the month. |
What Each Symbol Means
ccurrency
Cost per request
The full cost of one call.
n_mrequests
Requests per month
How many calls are made in a month.
C_mcurrency
Monthly cost
The bill for the month.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate ai api costs page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate AI API Costs, filed under Finance. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Scaling to a volume?
The formula for Scaling to a volume is monthly cost = cost per request x requests per month. The per-request cost multiplies linearly by the number of requests, and the annual figure is twelve times the monthly one. Nothing compounds in an API bill.
What does each symbol in Scaling to a volume stand for?
c is cost per request; n_m is requests per month; C_m is monthly cost.
What units should I use with Scaling to a volume?
Substitute c in money (any currency, as long as every money input uses the same one), n_m in requests, C_m in money (any currency, as long as every money input uses the same one). Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Scaling to a volume?
Forgetting the system prompt in the count. A system prompt is charged on every single request. A 600-token instruction on 10,000 requests is six million tokens of overhead that never changes.