Home Work & Income AI Inference Cost Calculator

AI Inference Cost Calculator

The real monthly cost of an AI workload: tokens per request, cached input discounts, requests per day, and the cost per request, day, month and year.

Advertisement

How it works

AI APIs bill by the token (Token), and input and output tokens are priced differently, with output usually several times dearer. Most providers also discount input tokens they have seen before through caching (Cache), which matters when you send the same long prompt or document repeatedly. Enter the input and output tokens an average request uses, the share of input served from cache, the three prices from your provider's current pricing page, and your requests per day. The calculator shows the blended cost per request and the daily, monthly and yearly totals, plus what caching saves you each month. Prices change often, so this page never hard-codes them: copy the three numbers from your provider each time you budget.

Advertisement

Formula

Cost per request = input x (1 - cached share) x input price + input x cached share x cached price + output x output price, all over one million.
Monthly = per request x requests per day x 30.
Cache savings = cached tokens x (input price - cached price) x requests x 30.

Example

Example in plain words. 2000 input and 800 output tokens per request, 30% of input cached, prices 2.5, 1.25 and 10 per million, 2000 requests a day.

Fresh input costs 1400 x 2.5 = 0.0035, cached input 600 x 1.25 = 0.00075, output 800 x 10 = 0.008, per million.

Per request = 0.01225. Per day = 24.50, per month = 735, per year = 8942.50.

Caching saves 45 a month.

Frequently asked questions

Where do I find the token counts?

Most provider dashboards and API responses report usage per request. Run a typical day, then divide total tokens by request count for a honest average.

How accurate is the monthly figure?

It assumes every day looks like your average. Spiky workloads, retries and failed generations still bill tokens, so budget a margin above the number shown.

Advertisement

Related calculators

Salary Calculator

Convert a salary between hourly, weekly, every two weeks, monthly and yearly pay.

Time Card Calculator

Add up your clock-in and clock-out times for the week, take off breaks, and get total hours and pay.

Prorated Salary Calculator

Pay for part of a month, for example when you start or leave in the middle of it.

IP Subnet Calculator

Network address, broadcast address, subnet mask and usable host range for any IPv4 address and prefix length.