Cost Per Request Calculator
Convert a price-per-million into unit cost and total spend for your volume β compare API providers and draft monthly budgets without guessing fractions of a cent.
Results
Enter data and click Calculate.
Unit economics of API requests
API providers (cloud, LLM, SMS, maps) often quote a price per million units (requests, tokens, messages) because a single request costs a tiny fraction of a cent β too small a number to communicate conveniently. This calculator turns that price into three practical figures: the total cost for your volume, the cost of a single request, and the cost per 1,000 requests (a common comparison unit, similar to "cost per mille").
The formula
Total cost = (price per 1M) Γ (request count / 1,000,000). The cost of a single request is total cost / request count, and the cost per 1,000 is that result times 1,000. For very small numbers, the calculator shows the result in exponential notation to avoid losing precision.
Tiered pricing
Many providers use tiered pricing β e.g. the first million requests free, subsequent millions at a lower per-unit price for scale. This calculator computes at a single, fixed price per 1M; for tiered pricing, compute each tier separately or use a blended rate across your total volume.
Estimating a monthly budget
To estimate monthly cost, multiply your average daily traffic by about 30 days and enter that as the request count. It is worth adding margin for traffic spikes (e.g. +20-30%), especially if the service has seasonality or planned marketing campaigns that increase traffic.
Caching and batching vs cost
Caching and batching can reduce cost per request by lowering the number of paid calls or the size of payloads billed separately.
- Cache frequent reads (CDN, Redis, ETag) β same result without another billable call.
- Batch writes / queries (bulk APIs) instead of N single requests.
- Avoid redundant polling and repeated identical calls in UI loops.
Examples
- $0.40 per 1M requests, 2,500,000 requests β total cost $1.00, cost per request $0.0000004, cost per 1,000 requests $0.0004.
- $2.00 per 1M requests (e.g. an LLM API), 50,000 requests β total cost $0.10, cost per request $0.000002.
- $1.00 per 1M requests, 1,000,000 requests β total cost $1.00, cost per 1,000 requests $0.001.
FAQ β cost per request
- How do caching and batching affect cost per request?
- They cut the number of paid calls (or tokens/payload), so total spend falls even at the same price per 1M. Enter the volume after optimization to see the new unit and monthly cost.
- What exactly counts as a "request" for an LLM API?
- It depends on the provider β some count a single API call, while most LLM providers bill by the number of input/output tokens, not the number of requests. Check whether the price per 1M applies to requests or tokens.
- How do I compute cost with tiered pricing?
- Compute each tier separately (e.g. the first million at price A, the next at price B) and sum them, or work out a volume-weighted blended price and enter that as a single value.
- Does this calculator include data transfer (egress) cost?
- No β it only computes the providerβs quoted per-request price. Data transfer, storage, and compute on your side need to be added separately.
- How do I estimate monthly cost from daily traffic?
- Multiply your average daily volume by the number of days in the month (about 30) and enter that as the request count β add margin for traffic spikes.
- Is cost per request useful for comparing providers?
- Yes, as long as you compare the same billing unit (request vs token vs message) and the same type of operation β otherwise the comparison is not fair.
- Why does the result show up in exponential notation?
- Because the cost of a single request is often on the order of 10β»β· dollars or less β exponential notation is more readable than many decimal zeros in that case.
- Can I change the currency?
- The calculator shows the currency symbol from the site settings β it computes proportionally regardless of currency, as long as you enter the price in that same currency.
- Does the price include taxes or extra fees?
- No β enter the net price from the providerβs pricing page; taxes, transaction fees, or minimum monthly charges need to be added outside this calculator.