API Cost Calculator
Usage-Based Pricing Adds Up Fast
Most third-party APIs — payment processors, LLM providers, geocoding services, SMS gateways — bill per request past a free allowance, and that per-request rate looks trivial until multiplied across production traffic. Before committing to a vendor or scaling a feature, it's worth running the actual monthly volume through the pricing formula rather than eyeballing the per-1,000-request rate.
The Formula
Billable Requests = max(0, Requests − Free Tier)
Cost = (Billable Requests ÷ 1,000) × Price per 1,000 Requests
Cost = (Billable Requests ÷ 1,000) × Price per 1,000 Requests
Worked Example
| Input | Value |
|---|---|
| Total requests | 150,000 |
| Free tier | 10,000 |
| Billable requests | 140,000 |
| Total cost | $70.00 |
| Effective cost per request | $0.000467 |
The effective cost per request (spread across every request, including free ones) is always lower than the raw per-1,000 rate once a meaningful free tier is involved.
Where This Matters
- Comparing vendors — two APIs with similar headline rates can differ substantially once free tier size and your actual traffic volume are factored in.
- Forecasting a growing feature's cost — projecting request volume forward against pricing shows at what traffic level a "cheap" API starts becoming a meaningful line item.
- Budgeting before launch — estimating monthly API spend at expected usage avoids an unpleasant billing surprise after a feature goes live.
How to Use This Calculator
- Enter the Number of Requests expected over the billing period.
- Enter the Price per 1,000 Requests in dollars.
- Enter the Free Tier Requests included before billing starts (optional).
- Select Calculate to see total cost and the effective cost per request.
Related Calculations
Check payload sizes before they hit your API with the JSON Size Calculator, or estimate how request volume affects page performance with the Page Load Time Calculator.