LLM API Cost Calculator

Estimate per-request, daily and monthly LLM API cost for GPT, Claude, Gemini and open models, with prompt caching and batch discounts and editable prices.

The interactive tool loads here when JavaScript runs.

About this tool

What is the LLM API Cost Calculator?

Enter how many requests you make a day and how many input and output tokens each uses, and the LLM API Cost Calculator shows the per-request, daily, monthly and yearly cost on the model you pick, plus a table of current OpenAI, Anthropic, Google and hosted open models sorted from cheapest to most expensive for that same workload.

Two levers that often matter more than the model choice are built in: the share of input served from the prompt cache, and the share of requests sent through a batch API at a discount. Every price in the table is editable, there is a custom model row, and the date the prices were checked against the official pricing pages is shown under the table.

  • Current OpenAI, Anthropic, Google and hosted open-model prices
  • Input, cached input and output rates, all editable
  • Prompt cache share and batch share with each vendor's discount
  • Automatic long-context rates above vendor thresholds
  • Per-request, daily, monthly and yearly cost with a cost split
  • Comparison table sorted by monthly cost, custom model row
Read the guide: How to Reduce LLM Token Usage and API Cost

Updated

How to use the LLM API Cost Calculator

  1. Pick an example workload or enter requests per day, input tokens and output tokens per request.
  2. Set the share of input tokens that are cache hits and the share of requests you can send as batch jobs.
  3. Choose a model to see its per-request, daily, monthly and yearly cost and the split between input, cached input and output.
  4. Scan the comparison table, sorted by monthly cost; filter by vendor if you like.
  5. Edit any price, or add a custom model with your negotiated or self-hosted rates.
  6. Copy the table as text for a budget or design document.

Worked examples

Support chatbot on Claude Sonnet 5.5

Input

5,000 requests a day, 2,500 input tokens (60% cached), 350 output tokens

Output

$0.00565 per request, $28.25 a day, about $859 a month

(1,000 uncached x $2 + 1,500 cached x $0.10 + 350 output x $10) per million tokens is $0.00565; times 5,000 requests and 30.42 days.

Nightly classification on a batch API

Input

100,000 requests, 400 input (50% cached) and 20 output tokens, 100% batch, GPT-5.4 mini

Output

$0.0001275 per request, $12.75 a day, about $388 a month

(200 x $0.75 + 200 x $0.075 + 20 x $4.50) per million tokens is $0.000255, then 50% off for batch.

Background and insight

LLM APIs bill per million tokens, with separate rates for input, cached input and output. Output is usually 4 to 8 times the input price, which is why a chatty model can cost more than a bigger one with terse answers. Prompt caching bills the repeated prefix of a prompt at a fraction of the input rate when it is reused: on Anthropic's current list, cache hits cost 10 percent of the input price on most models and 5 percent on Claude Opus 5.5 and Sonnet 5.5, while OpenAI lists cached rates from 5 to 50 percent of input depending on the model and Google lists 10 percent for Gemini. Batch APIs from OpenAI, Anthropic and Google take requests asynchronously, with results within 24 hours, for 50 percent off.

Some models charge more for very long prompts. OpenAI's GPT-5.5 and GPT-6 models switch to higher rates above 272,000 input tokens, Gemini 2.5 Pro and 3.1 Pro above 200,000, and Claude Haiku 5.5 above 100,000; the calculator applies these automatically. It does not model cache write surcharges (Anthropic bills writing a 5-minute cache entry at 1.25 times the input price), Gemini's per-hour cache storage fee, regional or priority tiers, or taxes. Reasoning models bill their hidden thinking as output tokens, so include it in the output figure.

Common use cases

  • Budgeting a new AI feature

    Turn expected traffic and prompt sizes into a monthly figure before launch.

  • Choosing a model

    See what moving from a frontier model to a mini or open model saves for your actual token mix.

  • Justifying caching or batching work

    Show how much a higher cache hit rate or moving jobs to batch would cut the bill.

  • Checking an invoice

    Compare a month's usage report with what the list prices predict.

Tips and limitations

  • Measure real token counts with the LLM Token Counter rather than guessing from word counts; Claude's newer tokenizer uses about 30 percent more tokens for the same text.
  • Cache hits require an identical prefix. Put the system prompt, tools and shared documents first and anything that varies last.
  • Batch only suits work that can wait: evaluations, back-fills, nightly classification and report generation.
  • Prices change often and new models arrive monthly. Check the vendor page before committing a budget.
  • Cheapest is not best. Test quality on your own data before switching model to save money.
  • Months are 365 / 12 = 30.42 days.

Frequently asked questions

How do I estimate my monthly LLM API cost?

Multiply input tokens by the input price and output tokens by the output price (both per million), add them for the cost per request, then multiply by requests per day and 30.42 days. The calculator does this for every model at once.

How much does prompt caching save?

Cached input is billed at a fraction of the normal rate, 10 percent on most Claude and Gemini models and between 5 and 50 percent on OpenAI models. With 80 percent of input cached at 10 percent, input cost falls by 72 percent.

What is the batch API discount?

OpenAI, Anthropic and Google all list batch processing at 50 percent off input and output, in exchange for asynchronous results, usually within 24 hours.

When were the LLM prices in this calculator last checked?

The date is shown under the table. Prices were taken from the official OpenAI, Anthropic and Google pricing pages and from Groq and Together AI for open models, and every value can be edited.

Why is output so much more expensive than input?

Output tokens are generated one at a time, which uses far more compute per token than reading the prompt in parallel. List prices reflect that, typically at 4 to 8 times the input rate.

Does the calculator include reasoning or thinking tokens?

Only if you include them in the output tokens figure. Reasoning models bill their internal thinking as output, which can be several times the visible answer.

Is there an in-depth guide to the LLM API Cost Calculator?

Yes. “How to Reduce LLM Token Usage and API Cost” covers the background, how it works, common pitfalls and worked examples. Read the full guide.