Skip to content

LLM Cost Calculator

Work out what an LLM feature actually costs to run per request and per month — including prompt caching and batch discounts, which is where most estimates go wrong.

Runs entirely in your browser. Prices you edit are stored on your device only — nothing is uploaded.

Modelprice preset
Discounts that change the billprompt caching & batch
0%

A cached input token reads at about a tenth of the normal price. Move the slider to the share of your prompt that is a stable prefix — a system prompt, a tool list, a document you ask many questions about.

$0Per month
$0Per request
$0Per year
Per month (TRY)

    Same workload, every model — cheapest first

    Priced at the request shape and volume you set above.

    ModelIn $/1MOut $/1MPer monthvs cheapest

    How to calculate the running cost of an LLM feature

    1. Describe one request. Enter the input tokens you send and the output tokens you expect back. If you do not know, the token counter next door will tell you from a sample prompt.
    2. Set your monthly volume. Requests per month is the number that turns a per-call price into a budget. Everything else scales from it.
    3. Pick a model, or enter your own prices. Anthropic models arrive with dated prices. Any other provider is one "add a model" away — type the name and its two per-million rates.
    4. Turn on the discounts you will actually use. Prompt caching and the batch API are the two levers that move a bill most. Model them here rather than discovering them on the invoice.

    The three things that make a forecast wrong

    History is resent. The API is stateless, so a conversation's earlier turns are uploaded again on every new turn. A ten-turn chat does not cost ten times one turn — it costs closer to the sum of a growing prompt, which is why long chats get expensive faster than anyone expects. Cap history, summarise it, or cache it.

    Your system prompt is billed every single call. So are your tool definitions. A 4,000-token system prompt on a million monthly calls is four billion input tokens before a user has typed anything. This is the single best case for prompt caching, and the reason the slider above exists.

    Reasoning is output. On models that think before answering, the thinking is billed as output tokens whether or not you ever show it. A short visible answer can carry a long invisible one.

    Frequently asked questions

    How is LLM API cost calculated?

    Input and output tokens are billed separately, at a price quoted per million tokens. Cost for one request is (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price). Output is typically three to five times more expensive than input, so a chatty model costs more than a verbose prompt does.

    Why is my real bill higher than a calculator predicted?

    Three reasons, in order of how often they bite. Conversation history is resent on every turn, so a ten-turn chat sends the earlier turns ten times. System prompts and tool definitions are input tokens too, and they are sent every single request. And retries after a timeout or a rate limit are billed like any other call.

    What does prompt caching actually save?

    A cached input token is read at roughly a tenth of the normal input price. Writing the cache costs about a quarter more than plain input, so caching pays for itself from the second request that reuses the same prefix. On a workload with a large fixed system prompt it is the single biggest saving available.

    When is the batch API worth using?

    It halves both input and output prices, in exchange for asynchronous processing — results arrive within hours rather than seconds. If nobody is waiting on the response, take the discount. If a person is watching a spinner, do not.

    Do output tokens include reasoning or thinking tokens?

    Yes. On models that reason before answering, the reasoning is billed as output whether or not you display it, and it counts against the same output ceiling. A model that thinks hard on a short answer can cost several times what the visible reply suggests.

    Are the prices in this tool current?

    The Anthropic prices shipped with this page carry the date they were checked, shown next to the table. Model prices move, so treat any figure older than a few weeks as an estimate and confirm at the provider before committing a budget. Every price here is editable, and your edits are kept in your browser.

    Working out what a video costs, not a prompt?

    Leopati is an AI-native video production studio. The same principle applies on that side of the business: real numbers before you commit, not a range that moves once you have signed.