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.
Formula
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.