LLM cost calculator

Estimate what an AI feature will cost to run. Enter the tokens per request and how many requests you expect, then compare every major model side by side.

Per request
–
Per day
–
Per month (30 days)
–

All models, cheapest first

List prices for the standard tier and short prompts, checked . Batch processing is usually about half price, and long prompts or priority tiers cost more. Cache write charges are not included.

How to use the LLM cost calculator

  1. Choose a Model from the list, grouped by Anthropic, OpenAI and Google.
  2. Enter Input tokens per request and Output tokens per request. Use Count your prompt if you don't know the input size.
  3. Enter your expected Requests per day.
  4. If requests share a long, repeated prefix such as a system prompt, set Cached input (%) to the share of input read from the prompt cache.
  5. Read the cost Per request, Per day and Per month (30 days), then check All models, cheapest first to compare every model at the same usage. The page URL updates with your inputs, so you can bookmark or share the scenario.

How LLM API pricing works

Providers charge per million tokens, with separate prices for input (your prompt) and output (the model's reply). Output usually costs about 4 to 8 times more than input, so long answers drive the bill.

Cost per request = input tokens × input price + output tokens × output price, with both prices divided by 1,000,000.

For example, 2,000 input tokens and 500 output tokens on a model priced at $2 input and $10 output costs (2,000 × $2 + 500 × $10) ÷ 1,000,000 = $0.009 per request, or $270 a month at 1,000 requests a day.

The calculator multiplies the per-request cost by your requests per day, and the daily cost by 30 for the monthly figure. Input tokens include everything you send each time: the system prompt, instructions, earlier turns of a conversation, tool definitions and any documents. In a chat app, history is resent with every message, so input per request grows as a conversation gets longer.

Comparing models at the same usage

With the default usage of 2,000 input and 500 output tokens, 1,000 times a day, the table (prices checked 2026-11-16) ranges from $12.00 a month for Gemini 2.5 Flash-Lite and $13.50 for Claude Haiku 5.5 and GPT-6 Luna, through $270 for Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 4 Carbon, to $1,350 for GPT-6 Astra. That is more than a hundredfold spread for the same workload, which is why it pays to test whether a cheaper model is good enough for each task.

How prompt caching changes the cost

If many requests start with the same long prefix, such as a system prompt, few-shot examples or a reference document, providers can cache it and charge a reduced rate when it is read again. The Cached input (%) field splits your input tokens: that share is priced at the model's cached input rate and the rest at the normal input rate. Output is never discounted by caching.

Worked example on Claude Sonnet 5.5 ($2 input, $0.10 cached input, $10 output per million tokens), with 10,000 input and 500 output tokens per request and 1,000 requests a day:

Cached inputCalculationPer requestPer month
0%(10,000 × $2 + 500 × $10) ÷ 1M$0.025$750
80%(2,000 × $2 + 8,000 × $0.10 + 500 × $10) ÷ 1M$0.0098$294

Cached-read discounts vary by model. In this table they range from half the input price (GPT-4o mini) to a fortieth (Claude Fable 5.2); a tenth or a twentieth is common. The Gemini models listed charge about a tenth of the input price for cached reads. Some Gemini models also charge an hourly storage fee for explicitly cached content, which the calculator does not include.

What the calculator does not include

Scheduled price changes

Where a provider has announced a new price, the calculator switches to it automatically on that date and mentions it under the cost figures until then. Gemini 4 Carbon and Gemini 4 Argon change from $2 / $10 to $4 / $20 per million input / output tokens on 2026-12-01, and Gemini 3.8 Flash changes from $0.75 / $3.75 to $1.50 / $7.50 on 2027-01-01. At the default usage, Gemini 4 Carbon goes from $270 to $540 a month.

Ways to cut the cost

Common mistakes

Key terms

Token
The unit of text a language model reads and writes. A token is a chunk of characters from the model's fixed vocabulary: often a whole common word with its leading space, part of a longer word, a punctuation mark or a single byte. API usage and context limits are measured in tokens.
Input tokens
The tokens you send to a model in a request: system prompt, instructions, earlier conversation turns, tool definitions and any documents. API providers bill them at the input price, which is usually lower than the output price.
Output tokens
The tokens a model generates in its reply, including any hidden reasoning tokens on models that bill for them. They are usually priced several times higher than input tokens, and a max tokens setting caps how many can be produced.
Price per million tokens
The standard unit for LLM API pricing, written as $ per 1M tokens. To get the cost of a request, multiply its token count by the price and divide by 1,000,000. Input, cached input and output each have their own price.
Prompt caching
An API feature that stores a repeated prompt prefix, such as a system prompt or reference document, so later requests that start with the same prefix read it from the cache at a reduced price and often with lower latency.
Cached input
Input tokens served from the prompt cache instead of being processed from scratch. They are billed at the model's cached input rate, typically a tenth or less of the normal input price, though the discount differs by provider and model.
Batch API
A way to submit many requests to be processed asynchronously, usually completed within 24 hours. Providers typically charge about half the standard price in exchange for the delay, which suits evaluations, bulk classification and other work that does not need an instant answer.
Context window
The maximum number of tokens a model can handle in one request, counting the system prompt, conversation history, attached documents and the generated reply together. Input that does not fit must be shortened, summarized or split across requests.

Frequently asked questions

Which LLM API is cheapest?
For simple tasks, small models such as Claude Haiku 5.5, GPT-6 Luna, GPT-5.4 nano and Gemini 2.5 Flash-Lite cost $0.10 to $0.20 per million input tokens. Enter your own usage: the table sorts every model from cheapest to most expensive.
How many tokens is my prompt?
Paste it into the token counter. As a rule of thumb, 1,000 tokens is about 750 English words. Its Estimate API cost button opens this calculator with your count filled in as input tokens per request. Remember to include the system prompt and any conversation history.
Are these prices up to date?
They are list prices checked on the date shown, including announced price changes. Always confirm on the provider's pricing page before committing to a budget.
Does this include prompt cache writes?
No. Some providers charge more than the normal input price to write a prefix to the cache, once per cached prefix, while others do not charge extra. Over many requests that reuse the prefix, reads dominate.
Why is output more expensive than input?
Input tokens are processed in parallel in a single pass, while output tokens are generated one at a time, each needing its own pass through the model. That makes generation slower and more compute-intensive per token, so providers price output several times higher. Asking for shorter answers is often the quickest saving.
How do I estimate tokens per request for a chatbot?
Add the system prompt, the average conversation history sent with each message, any retrieved documents and the user's message, then count a realistic sample in the token counter. History grows with every turn, so estimate a typical conversation length rather than the first message alone.
Why does the monthly cost use 30 days?
It keeps the figure simple and comparable: monthly cost is the daily cost times 30. For a 31-day month add about 3%. If your traffic is concentrated on weekdays, enter an average daily figure across the whole week.
Does the calculator include batch pricing?
No. All prices are standard-tier list prices for short prompts. Batch processing is usually about half price, so for work that can wait you can roughly halve the figures shown. Check the provider's pricing page for the exact batch rate.

Sources: Anthropic, OpenAI and Google API pricing pages. Last checked 2026-11-16.