Skip to content
Free · runs in your browser

AI Cost Calculator

Put in your request volume, the average length of your prompts and responses, and the prices you actually pay. The calculator shows this month's run rate and how much of it model routing, prompt caching, and batching would take off.

An AI cost calculator estimates what an LLM feature costs per month: request volume × tokens per request × your provider's per-million-token price, counted separately for input and output. Three levers cut that bill before anyone opens a contract negotiation: route cheap requests to a smaller model, serve the repeated part of a prompt from cache, and send asynchronous work through a batch endpoint. Oleg Sotnikov runs AppMaster, a platform that processes 11B+ tokens a month, and applies the same three levers in production. This tool runs entirely in your browser and takes your own prices, because published price lists change too often to hardcode.

Estimate Your Monthly LLM Bill

Everything here is computed in the browser. Move the numbers until they match your workload.

Step 1 · Your usage

20,000
2,000
500

Requests per month

600K

Input tokens per month

1.2B

Output tokens per month

300M

Step 2 · Your prices

$
$

The defaults show example frontier-class pricing so the panel has something to compute. Check your provider's price list and enter what you actually pay.

Step 3 · The levers

Each lever has two settings: the share of traffic it covers, and the discount that applies to that share. Set both to what your workload and your provider's terms allow.

Model routing

Classification, field extraction, short rewrites, and retries rarely need a frontier model. Send them to a smaller one and keep the large model where the difference shows.

40%
%

20% is an example ratio. Compare the small and frontier tiers on your provider's price list.

Prompt caching

System prompts, tool definitions, and retrieved documents repeat on every call. On a cache hit, that repeated prefix is billed at a fraction of the normal input price.

50%
%

90% reflects typical published cache discounts. Check your provider.

Batch processing

Anything nobody is waiting on can go through an asynchronous batch endpoint instead: data enrichment, evaluation runs, backfills, nightly summaries.

20%
%

Major providers have published batch discounts around 50%. Verify current terms.

Estimated result

Current

$8,100

per month

Optimized

$3,966

per month

Saved

$4,134

51% · per month

Saved

$49,611

per year

Nothing you type here leaves your browser. The page sends no requests and stores nothing.

Every figure here is an estimate. The three levers are applied multiplicatively and assumed to overlap in proportion to their shares, so a real bill will differ. Your provider's terms decide the final number: which discounts stack, which endpoints support caching.

Frequently Asked Questions

How do I reduce OpenAI API costs?

The same playbook covers OpenAI API cost and the equivalent bill from Anthropic or any other provider. Start with the three levers that need no contract change: route cheap requests to a smaller model, cache the repeated part of your prompts, and move asynchronous work to a batch endpoint. Then trim dead context. Most production prompts carry instructions and examples that no longer earn their tokens. Volume discounts and committed-use deals are worth asking about, but they come last, because otherwise you negotiate a discount on spend you could have removed.

What is prompt caching?

Prompt caching stores the unchanging prefix of a request (system prompt, tool definitions, a long document) on the provider's side, so repeat calls are billed at a reduced rate for those tokens instead of the full input price. It pays off when many requests share a long prefix and that prefix is byte-identical, so put the stable part first and the variable part last. Discount size, minimum prefix length, and cache lifetime differ by provider; check the current terms before assuming a number.

What is batch processing and when does it fit?

A batch endpoint takes a file of requests and returns the results within a stated window, commonly up to 24 hours, in exchange for a lower price per token. It fits work with no user waiting on it: data enrichment, evaluation runs, backfills, classifying a queue, nightly summaries. It does not fit interactive chat or anything in a checkout path, and batch requests usually cannot be combined with every other discount, so read the terms.

When should requests go to a smaller model?

When the task is narrow and the output is short or structured: classification, routing, extraction into a schema, tagging, short rewrites, first-pass drafts. Decide it by measurement: collect a few hundred real requests, score both models against them, and route on the result rather than on intuition. Keep the frontier model for reasoning, long context, and anything a customer reads word for word.

Find the Rest of the Bill

The same three levers applied to your real traffic, plus the cloud and infrastructure spend sitting next to it. Five business days, every finding quantified in dollars per year.

At least $50,000/year in identified savings — payroll, cloud, and LLM bills — or the audit is free.