Skip to content

LLM API Cost Calculator

Estimate what an LLM API costs per request, per day and per month from input and output tokens, your prices per million tokens and caching.

Calculator Details

Monthly cost:US$270.00See results ↓

Prompt size: system prompt, history, documents and the question, in tokens (roughly 3/4 of a word each in English).

Tokens the model writes back per request (reasoning or "thinking" tokens count as output).

API calls a day across all users.

Share of input tokens served from the prompt cache (a repeated system prompt or document). 0 if you do not use caching.

US dollars per 1M input tokens from your provider's price page. Example: Claude Sonnet 5.5 list price on 2026-11-12.

US dollars per 1M output tokens. Output usually costs 4–5 times input. Example: Claude Sonnet 5.5, 2026-11-12.

Example prices: Claude Sonnet 5.5 list prices on 2026-11-12. Prices change: enter your provider's current ones.

Your Results

Monthly cost: US$270.00

Monthly cost

US$270.00

30,000 requests in 30 days

Per request

US$0.00900

US$9.00 per 1,000 requests

Per day

US$9.00

Per year

US$3,285.00

365 days of requests

Tokens per month

75,000,000

Output is 55.6% of the cost

At US$0.0090 a request and 1,000 requests a day, the API costs about US$270.00 a month (US$3,285.00 a year); output tokens are 55.6% of the bill.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Where the monthly bill goes

Where the monthly bill goes

Detailed Breakdown

Monthly cost by token type
TokensPer monthPrice / 1MCost
Input tokens60,000,000US$2.000US$120.00
Cached input tokens0US$0.100US$0.00
Output tokens15,000,000US$10.000US$150.00
Total75,000,000US$270.00
Monthly cost at other volumes
Requests per dayMonthly cost
100US$27.00
500US$135.00
1,000 (you)US$270.00
2,000US$540.00
5,000US$1,350.00
10,000US$2,700.00

How This Calculator Works

How the cost is calculated

per request = (uncached input × input price + cached input × cache price + output × output price) ÷ 1,000,000

monthly = per request × (1 − batch discount) × requests per day × days per month

(2,000 × US$2.000 + 0 × US$0.100 + 500 × US$10.000) ÷ 1,000,000 = US$0.009000

US$0.009000 × 1,000 × 30 = US$270.00

Providers bill per token, quoted per million. Output tokens usually cost several times more than input tokens, so long answers and reasoning (thinking) tokens drive most bills; a prompt cache cuts the cost of a repeated system prompt or document.

Frequently Asked Questions

How do I calculate the cost of an LLM API call?

Multiply the input tokens by the input price and the output tokens by the output price, both per million tokens, and add them. At the example prices (US$2 in, US$10 out per million), 2,000 input and 500 output tokens cost 0.004 + 0.005 = US$0.009 a request, or US$270 a month at 1,000 requests a day.

Why do output tokens cost more than input tokens?

The model reads all input tokens in one parallel pass, but writes output tokens one at a time, each needing its own pass through the model. That makes output slower and more expensive to serve, so providers usually charge four to five times more for it.

What is a token?

A piece of text the model reads or writes: a common word, part of a longer word, a number or punctuation. In English a token averages about three quarters of a word, so 1,000 tokens is roughly 750 words, but each model’s tokenizer differs and other languages and code often use more tokens per word. Your provider’s usage report gives the exact counts.

How much does prompt caching save?

Cached input tokens are billed at a fraction of the normal input price (US$0.1 instead of US$2 per million in the example). With 60% of a 2,000-token prompt cached, the example request drops from US$0.009 to US$0.00672. Writing to the cache can cost a little more than normal input, which this calculator leaves out.

What is the batch discount?

Several providers process requests asynchronously, usually within 24 hours, at a discount (50% at Anthropic as of 2026-11-12). It suits work nobody waits for: evaluations, classification, embeddings of a backlog. Enter it under advanced options; it applies to every token.

Are the example prices current?

They are Claude Sonnet 5.5 list prices read on 2026-11-12 from the provider’s pricing page, and they are only a starting point. Prices change several times a year and differ by model, region and contract, so replace them with the prices on your provider’s page.

Why is my real bill higher than the estimate?

Common reasons: retries and failed calls, conversation history re-sent with every turn (input grows each turn), reasoning tokens counted as output, tool definitions and system prompts you forgot to count, long-context surcharges, and taxes. Compare the estimate with a day of real usage from your provider’s dashboard.

Cost = tokens × your price per million tokens, in US dollars as API prices are quoted. Default prices are dated examples (Claude Sonnet 5.5 list prices, 2026-11-12); enter your provider's current prices. A year is 365 days of requests. Not included: cache-write surcharges, long-context price tiers, images, audio and tool fees, free tiers and committed-use discounts, taxes and currency conversion.

LLM Cost Calculator: Estimate API Costs per Request and per Month

By FindMySum · Last reviewed

An LLM cost calculator turns token counts into money. Large language model APIs bill by the token, at one price for the text you send (input) and a higher one for the text the model writes (output), quoted per million tokens. Multiply, add, and scale by your traffic, and you have a budget. This page does that with Decimal arithmetic, adds prompt caching and batch discounts, and shows where the bill goes. The worked example uses the defaults: 2,000 input and 500 output tokens per request, 1,000 requests a day, at example prices of US$2 and US$10 per million tokens.

The formula

cost per request = uncached input × input price + cached input × cache price + output × output price, all divided by 1,000,000 because prices are per million tokens.

monthly cost = cost per request × (1 − batch discount) × requests per day × days per month

A year is 365 days of requests. Prices are inputs: they change several times a year and differ between providers, models and contracts, so the defaults are dated examples (a mid-size model's list price, read from the provider's pricing page on 12 November 2026), not a quote.

Worked example

  1. Input: 2,000 × US$2 ÷ 1,000,000 = US$0.004.
  2. Output: 500 × US$10 ÷ 1,000,000 = US$0.005.
  3. Per request: US$0.009, or US$9 per 1,000 requests.
  4. Per month: US$0.009 × 1,000 × 30 = US$270.
  5. Per year: US$0.009 × 1,000 × 365 = US$3,285.

Output is only 20% of the tokens but 56% of the bill, because each output token costs five times an input token here. That pattern is typical, and it means long answers and "thinking" tokens move the total more than long prompts do.

Prompt caching

Many requests repeat the same opening: a long system prompt, tool definitions, a reference document. Providers can cache that prefix and bill repeated reads at a fraction of the input price. In the example, if 60% of the input comes from the cache at US$0.10 per million:

  • uncached input: 800 × US$2 ÷ 1,000,000 = US$0.0016
  • cached input: 1,200 × US$0.10 ÷ 1,000,000 = US$0.00012
  • output: US$0.005

The request drops to US$0.00672 and the month to US$201.60, a 25% saving. Writing to the cache usually costs a little more than normal input, and caches expire after minutes of disuse, so the saving depends on traffic that re-uses the prefix often. The calculator leaves the write surcharge out.

Batch processing

Work that nobody waits for, such as nightly classification, evaluations or summarising a backlog, can often go through a batch interface at a discount, 50% at several providers. Set it under advanced options; it applies to every token. At 50% the example falls to US$135 a month.

What the estimate leaves out

  • Retries and failures: timeouts and malformed outputs that are re-sent cost tokens too.
  • Growing context: in chat, each turn re-sends the history, so later turns cost more than the first. Use an average over whole conversations.
  • Other charges: images, audio, web search and tool calls are often priced separately; some models charge more above a long-context threshold.
  • Taxes and currency: prices are in US dollars before tax.

Keeping the bill down

The levers follow from the formula. Shorter outputs (a tighter format, a lower maximum) cut the expensive side. Caching cuts repeated input. Batch processing halves work that can wait. A smaller model cuts every price, if its answers are good enough. And retrieval that sends five relevant passages instead of fifty shortens the prompt. The context window calculator helps size that prompt, and the tokens per second calculator shows how long the answers take.

More questions

How do I find my average tokens per request?

Every API response reports the input and output tokens it used. Log them for a day of real traffic and divide the totals by the number of requests. Averages from real usage beat estimates from word counts, especially for chat, where the history grows each turn.

Is it cheaper to use a smaller model?

Per token, almost always: smaller models can cost a tenth of the largest ones. Whether the total is cheaper depends on quality; if a smaller model needs retries or longer prompts to get the same result, the savings shrink. Run both on a sample of real requests and compare cost per successful result.

How does a growing chat history affect cost?

Each turn re-sends the earlier turns as input, so input tokens grow with every message. A 20-turn chat can bill several times the tokens of its final question. Prompt caching, trimming old turns or summarising them keeps the cost in check.

Should I budget in US dollars?

API prices are quoted and usually billed in US dollars. If you pay in another currency, convert the monthly total at your card's or bank's exchange rate and add any foreign transaction fee and sales tax that applies to digital services where you live.

How do I estimate cost before I have any traffic?

Write five to ten realistic requests, run them once, and read the token counts from the responses. Multiply by the requests per day you expect, then by 1.5 to 2 for growth, retries and longer-than-expected answers.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy