All tools
Developer

AI API Cost Calculator

Estimate LLM API spend from token counts and current published per-model pricing.

πŸ”’ Runs entirely in your browser β€” nothing here is ever uploaded

About the AI API Cost Calculator

Estimates the dollar cost of an LLM API call from input/output token counts and each provider's current published per-token pricing.

100% Free Runs in Your Browser No Sign-Up Required
How to use it
  1. Select a model.
  2. Enter expected input and output tokens per call.
  3. Enter number of calls for a batch/volume total.
Formula
Cost = (input tokens Γ· 1,000,000 Γ— input price) + (output tokens Γ· 1,000,000 Γ— output price), Γ— number of calls
Worked example

Claude Sonnet 5 ($2/$10 per million input/output tokens), 1,000,000 input + 500,000 output tokens, 1 call = $2.00 + $5.00 = $7.00.

Interpreting your result

Prices as of 2026-09-05 β€” LLM API pricing changes frequently (new models, promotional rates, volume discounts not modeled here). Verify current rates at the provider's own pricing page before budgeting.

Recommendations
  • β€’ Batch API and prompt-caching discounts (where offered) aren't modeled β€” check the provider's docs if you use those.
  • β€’ Compare providers side-by-side using the bar chart below the results.
Frequently asked questions
No β€” it's pure arithmetic on published list prices. It never makes an API call.
Sources