Free tool

AI API Cost Calculator: Estimate Your Monthly LLM Bill

Pick a model, enter your traffic and token counts, and see the cost per request, per day and per month, plus what a runaway loop would cost. The example below is a support chatbot; change any number.

$4.00 in / $20.00 out per 1M tokens, $0.20 cached.
Prompt, history and documents. About 4 characters per token.
The reply. Includes thinking tokens if the model uses them.
Input tokens read from the provider's prompt cache at the cheaper cached rate.
Runaway scenario

A retry loop or a leaked key sending requests at a steady rate.

Per request
$0.012
Per day
$12.00
Per month (30.4 days)
$364.80
Runaway scenario total
$1,036.80
Suggested hard cap
$547.20

The hard cap is 1.5 times your monthly estimate, a rule of thumb that leaves headroom for growth without leaving the door open. Set it in your provider's billing settings.

List prices checked on October 27, 2026; verify on the provider's page before budgeting. Standard tier, USD per 1M tokens.

How the estimate works

Cost per request is input tokens times the input price, plus output tokens times the output price, each divided by one million. When you set a cached share, that portion of the input is billed at the model's cached rate instead (or at the full input price if it has none). Per day multiplies by your requests per day, and per month multiplies by 30.4. The runaway figure is cost per request times requests per minute, times 60, times the hours.

Worked examples

Example: a support chatbot at 1,000 requests a day, 1,500 input and 300 output tokens per request, no caching. These are illustrative numbers, not a benchmark.

Example monthly cost for each model
ModelPer requestPer month
Claude Opus 5.5$0.012$364.80
Claude Haiku 5.5$0.0003$9.12
GPT-6 Astra$0.03$912.00
GPT-6 Luna$0.0003$9.12
Gemini 3.1 Pro (Preview)$0.0066$200.64
Gemini 3.5 Flash-Lite$0.0012$36.48

Why AI bills explode

  • No max_tokens limit

    A single runaway reply can be thousands of output tokens, and output is the expensive side of the bill.

  • Retry loops

    A failing call that retries instantly, or an agent that loops on its own tool errors, can send thousands of requests an hour.

  • Full history resent every turn

    Every message re-sends the whole conversation, so cost per turn grows with each turn.

  • A leaked or exposed key

    A key in front-end code or a public repo gets scraped and used by strangers, on your account.

  • No prompt caching

    Long, stable prompts billed at the full input price on every request instead of the cached rate.

Set a hard cap

Set a monthly spend limit and an alert in the billing settings of your Anthropic, OpenAI or Google account, and never ship a key in front-end code. The full walkthrough is in how to prevent AI API bill shock.

Prices used

List prices checked on October 27, 2026, USD per 1M tokens, standard tier.

List prices per 1M tokens by model
ModelInputCached inputOutputSource
Claude Opus 5.5Anthropic$4.00$0.20$20.00Anthropic pricingchecked 2026-10-27
Claude Haiku 5.5Anthropic. Rates above apply to prompts up to 100,000 tokens. Longer prompts cost $0.50 in / $2.50 out per 1M tokens, on the whole request.$0.10$0.01$0.50Anthropic pricingchecked 2026-10-27
GPT-6 AstraOpenAI. Rates above apply to prompts up to 272,000 tokens. Longer prompts cost $20.00 in / $75.00 out per 1M tokens, on the whole request. GPT-6.1 Sol ($2.00 in / $10.00 out) is a cheaper OpenAI option that is not preset here.$10.00$1.00$50.00OpenAI pricingchecked 2026-10-27
GPT-6 LunaOpenAI. Rates above apply to prompts up to 272,000 tokens. Longer prompts cost $0.20 in / $0.75 out per 1M tokens, on the whole request.$0.10$0.01$0.50OpenAI pricingchecked 2026-10-27
Gemini 3.1 Pro (Preview)Google. Rates above apply to prompts up to 200,000 tokens. Longer prompts cost $4.00 in / $18.00 out per 1M tokens, on the whole request. A preview model. Google's newest flagship, Gemini 4 Argon, is on introductory pricing until Nov 30, 2026 and is not included. Thinking tokens bill as output.$2.00$0.20$12.00Google pricingchecked 2026-10-27
Gemini 3.5 Flash-LiteGoogle Cache storage is billed separately. Thinking tokens bill as output.$0.30$0.03$2.50Google pricingchecked 2026-10-27

Questions about the calculator

How accurate is the estimate?

It is exact arithmetic on list prices, so it is only as good as your token counts. Measure a few real requests (the API response reports usage) and use averages. Real bills also vary with long-tail requests, retries and thinking tokens, which count as output.

How do I count tokens?

Use the usage field every provider returns on each response, or the provider's token-counting endpoint. As a rough guide one token is about four characters of English text.

Does caching change the price?

Yes. Cached input tokens are billed at a fraction of the normal input rate. The slider shows the share of your input that is cache reads. Some providers also charge for cache writes or storage, which this estimate leaves out.

What about the batch tier or priority tier?

This calculator uses standard on-demand prices. Batch jobs are usually discounted and priority tiers cost more, so check your provider's page if you use them.

What is the suggested hard cap?

A rule of thumb: 1.5 times your monthly estimate. It leaves room for growth and spikes but stops an unbounded bill. Pick your own number if you know your risk better.

Is anything I type sent anywhere?

No. The maths runs in your browser and nothing is stored or transmitted. The copy-link button only encodes your numbers into the page address.

Worried about more than the bill? See the AI app security and cost audit.

Want a real number for your app? We'll find it.

A free 30-minute review of your AI-built app: where the spend is, where the leaks are, and what to cap.