AI API Cost Calculator: Estimate Your Monthly Model Fees

This free AI API cost calculator estimates what a feature or automation will cost in model fees each month. Enter how many requests you expect, how many input and output tokens each request uses, and the price per million tokens from your provider’s pricing page. The calculator adds an overhead percentage for retries and tool calls, then shows the cost per request, per 1,000 requests, per month and per year. It runs in your browser and nothing you type is sent anywhere.

Each model call counts as one.
A cushion. Measure it once you have logs.
Prompt, instructions and any pasted context.
The length of the answer.
Example price. Use your model’s current price list.
Example price. Output usually costs more than input.

Result

Cost per request (before overhead)
Cost per 1,000 requests (with overhead)
Monthly cost before overhead
Monthly cost with overhead
Per year

How to read this result

Cost per request is input tokens times the input price plus output tokens times the output price, divided by one million. The prices in the boxes are placeholders, not a quote for any model, so copy the current numbers from your provider’s pricing page. Real bills also include retries, long conversations that resend earlier messages, and tool calls, which is what the overhead box is for.

The link puts your inputs in the web address, so anyone you send it to will see those numbers.

How the AI API cost calculator works

Model fees are usually billed per million tokens, with one price for input tokens (your prompt, instructions and any pasted context) and a separate price for output tokens (the answer). The calculator uses three steps:

  1. Cost per request = (input tokens × input price + output tokens × output price) ÷ 1,000,000.
  2. Monthly cost before overhead = cost per request × requests per month.
  3. Monthly cost with overhead = monthly cost before overhead × (1 + overhead percentage).

The yearly figure is the monthly figure multiplied by twelve.

Worked example

With the starting values in the calculator (5,000 requests a month, 1,500 input tokens and 400 output tokens per request, $1 per million input tokens, $4 per million output tokens and 15% overhead), one request costs (1,500 × 1 + 400 × 4) ÷ 1,000,000 = $0.0031. Across 5,000 requests that is $15.50 a month before overhead, about $17.80 with overhead, and roughly $214 a year. Those prices are placeholders to show the arithmetic, not a quote for any model. Replace them with the current prices from your provider.

How to get realistic token counts

A token is roughly three quarters of an English word, but the exact count depends on the model, so use real numbers where you can. Most providers return the input and output token counts with every response. Log ten to twenty real requests, average them, and type those averages into the calculator. Remember that a long conversation resends earlier messages as input on every turn, which raises input tokens quickly.

What this calculator does not include

  • Hosting, databases, vector search, monitoring and other infrastructure.
  • Discounts for caching or batch processing, and free tiers, which differ by provider.
  • Images, audio and other non-text inputs or outputs, which are often priced differently.
  • Your own time to build and maintain the feature.

Frequently asked questions

What overhead percentage should I use?

Start with 10 to 20 percent as a cushion for retries, failed calls and tool calls, then replace it with a measured figure once you have a few weeks of logs.

Why does the calculator ask for input and output prices separately?

Providers generally price them separately, and output tokens usually cost more than input tokens. Check your provider’s pricing page for the current figures.

Does it work for any model?

Yes, for any model billed per token. Enter that model’s input and output prices per million tokens.

Is my data stored?

No. The calculation happens in your browser. If you use Copy shareable link, your inputs are placed in the web address you copy, so only share it with people who may see those numbers.

Related calculators and guides