Free online calculator
AI API Token Cost Calculator
Estimate AI API token costs from request volume, average input and output tokens and user-supplied prices per million tokens.
Formula: Monthly cost = requests × (1 + extra request allowance) × (input tokens × input price + output tokens × output price) / 1,000,000.
How to use the AI API Token Cost Calculator
Estimate AI API token costs from request volume, average input and output tokens and user-supplied prices per million tokens. All monetary inputs must use the same currency; the $ symbol is a display convention. Change one assumption at a time to compare scenarios.
Inputs and definitions
- Requests per month
- Average input tokens per request
- Average output tokens per request
- Input price per million tokens
- Output price per million tokens
- Additional billed request allowance (%)
Use values from the same batch, period or customer cohort. The prefilled numbers are illustrative and can be replaced with your own records.
Formula explained
Monthly cost = requests × (1 + extra request allowance) × (input tokens × input price + output tokens × output price) / 1,000,000.
Worked example
10,000 requests with 1,000 input and 500 output tokens, priced at $2 and $8 per million respectively, cost $20 input plus $40 output. A 10% extra-request allowance raises the estimate to $66, or $0.0066 per original request.
Interpretation, assumptions and limitations
Prices are illustrative user inputs, not a live provider price list. Use billable token counts, including any billable reasoning tokens under your provider’s rules. This simple model assumes retries have the same average token usage. Cached input tiers, batch discounts, tools, storage, images, audio and taxes are excluded.
Frequently asked questions
Are provider prices updated automatically?
No. Enter the current rates for the model and billing mode you plan to use.
What does the extra-request allowance represent?
Additional billed calls such as retries; it scales both average input and output usage in this estimate.
Continue your analysis
Landed Cost Calculator · Ecommerce Profit Calculator · Contribution Margin Calculator