Token Cost Calculator
Estimate AI API costs using token counts and your provider's prices.
Processing stays in your browser. Enter current prices yourself. Caching, reasoning tokens, images, tool fees, taxes, and provider billing rules are not included.
How to use the token cost calculator
Estimate AI API costs using token counts and your provider's prices. Complete the input tokens, output tokens, input price per million tokens, output price per million tokens, number of requests fields above. Choose Run tool, review the output, then copy or download the result.
Example
10,000 input tokens at 1 per million cost 0.01 per request.
Good to know
Enter current prices yourself. Caching, reasoning tokens, images, tool fees, taxes, and provider billing rules are not included.
Make the assumptions behind a money estimate explicit
Write down the amount, currency, time period and rate convention before calculating. Annual and monthly rates are not interchangeable, and a percentage must refer to a clear base. Use the same currency for all amounts unless the tool explicitly performs conversion. For a projection, distinguish money paid at the beginning of a period from money paid at its end, and use the timing convention stated above.
Inputs and settings explained
- Input tokens
- Enter a numeric value for input tokens, using the units and bounds indicated by the label and method notes. The demonstration uses 10000. Check signs and scale before calculating; a percentage, fraction and whole-number count have different meanings.
See the demonstration value
10000
- Output tokens
- Enter a numeric value for output tokens, using the units and bounds indicated by the label and method notes. The demonstration uses 2000. Check signs and scale before calculating; a percentage, fraction and whole-number count have different meanings.
See the demonstration value
2000
- Input price per million tokens
- Enter a numeric value for input price per million tokens, using the units and bounds indicated by the label and method notes. The demonstration uses 1. Check signs and scale before calculating; a percentage, fraction and whole-number count have different meanings.
See the demonstration value
1
- Output price per million tokens
- Enter a numeric value for output price per million tokens, using the units and bounds indicated by the label and method notes. The demonstration uses 4. Check signs and scale before calculating; a percentage, fraction and whole-number count have different meanings.
See the demonstration value
4
- Number of requests
- Enter a numeric value for number of requests, using the units and bounds indicated by the label and method notes. The demonstration uses 100. Check signs and scale before calculating; a percentage, fraction and whole-number count have different meanings.
See the demonstration value
100
How to review the result
Check the result against a simple case, such as a zero rate or a single period, where that case is supported. Compare totals and intermediate values rather than relying on one displayed figure. Fees, taxes, inflation, changing rates and provider-specific terms can materially affect a real transaction. Unless expressly included in the method, treat those factors separately. Keep your assumptions with the estimate so another person can reproduce it and understand why it differs from a quote or account statement.
- Confirm whether each rate is a percentage, decimal, annual figure or periodic figure.
- Check payment timing, compounding and rounding against the stated method.
- Compare any important decision with the actual provider's terms and a suitable independent calculation.
Common questions about this workflow
Is the displayed result a quote or a guaranteed return?
No. It follows the supplied inputs and the assumptions described here. Actual fees, rates and terms can change or differ between providers. Verify the conditions that apply to the transaction or product you are considering.
Why does a lender or spreadsheet show a different amount?
Common causes include payment timing, day-count rules, compounding, fees and rounding. Compare these assumptions one at a time and use the governing agreement for the actual amount due.
Built by DevBricks Technologies. Found an unexpected result in Token Cost Calculator? Report a reproducible example with the tool URL, settings and a small sample that contains no private information.