Home / Dev & AI / LLM Cost Calculator

AI & LLM Cost

LLM Cost Calculator

Estimate the running cost of any large language model. Set your monthly volume and token sizes, choose a model, and this LLM cost calculator returns the monthly bill with a full 2026 price comparison across providers.

Estimated monthly cost

$0

Cost per request—
Cost per 1,000 requests—
Input token cost—
Output token cost—
Tokens processed / month—
Annual estimate—

Input vs output token spend

Output tokens usually cost several times more than input, so answer length is what really drives your bill.

The same workload priced across AI models

Your monthly token volume run through popular 2026 models, cheapest first.

What the LLM Cost Calculator does

A large language model is billed by usage, not by seat, so two teams running the same model can pay wildly different amounts. What matters is how many requests you make and how many tokens each one moves. This LLM cost calculator captures both and turns them into a monthly and annual figure.

Because model choice can swing the total by ten times or more, the tool prices your exact workload against the most used 2026 models at once. That makes it easy to spot when a smaller or open model would carry the same load for a fraction of the price.

Heads up on pricing. The rates built into this tool are public list estimates for July 2026 and can change without notice. Providers also offer batch discounts, prompt caching and volume tiers that lower real costs, so treat the output as a planning estimate, not a quote.

The formula

tokens per month = requests × (input tokens + output tokens)
cost = (monthly input ÷ 1M × input rate) + (monthly output ÷ 1M × output rate)

Worked example

A support assistant handles 250,000 requests a month at 1,500 input and 350 output tokens each. On Gemini 2.5 Flash that is 375M input × $0.30 + 87.5M output × $2.50 per million = $112.50 + $218.75 = about $331 a month. The same traffic on GPT-5 would be closer to $1,344.

Price per token and cost per inference

Providers quote every model as two prices per million tokens: one for input (your prompt, system message, tool definitions and any attached context) and one for output (what the model writes). To price a single token, divide the quoted rate by 1,000,000. A single API call, which is also what people mean by one inference, costs its input tokens times the input rate plus its output tokens times the output rate. The Cost per request line above is that cost per inference.

Two things make token bills bigger than expected. First, output tokens are priced several times higher than input tokens on almost every model, so long answers cost more than long prompts. Second, everything you resend on each call counts again: a 2,000-token system prompt on a million calls is two billion input tokens a month.

cost per token = price per 1M tokens ÷ 1,000,000
cost per inference = input tokens × input rate + output tokens × output rate
cost per 1,000 inferences = cost per inference × 1,000

Worked example: one GPT-5 call

GPT-5 is listed here at $1.25 per million input tokens and $10 per million output tokens. A call with 1,000 input and 500 output tokens costs 0.001M × $1.25 + 0.0005M × $10 = $0.00125 + $0.005 = $0.00625 per inference. At 2 million calls a month that is $12,500. The same call on GPT-5 mini ($0.25 in, $2 out) costs $0.00125, so 1 million inferences a month would be about $1,250.

AI model pricing used in this calculator (July 2026 estimates)

ModelProviderInput / 1M tokensOutput / 1M tokens
GPT-5OpenAI$1.25$10.00
GPT-5 miniOpenAI$0.25$2.00
Claude Fable 5.1Anthropic$10.00$50.00
Claude Opus 5.5Anthropic$4.00$20.00
Claude Sonnet 5.5Anthropic$2.00$10.00
Claude Haiku 5.5Anthropic$0.10$0.50
Gemini 2.5 ProGoogle$1.25$10.00
Gemini 2.5 FlashGoogle$0.30$2.50
DeepSeek V3DeepSeek$0.27$1.10
Grok 4xAI$3.00$15.00
Llama 4 MaverickMeta$0.20$0.60

Prices are public list estimates for planning as of July 2026 and change often. Providers bill per token, where roughly 1,000 tokens equals about 750 words. Always confirm live rates on the provider pricing page before you set a budget.

Ways to lower your AI costs

Frequently asked questions

What drives LLM cost the most?

Three things: the model you pick, how many tokens each request uses, and how many requests you send. Output length and attached context are the usual culprits behind a surprise bill.

Is a cheaper model always worse?

Not for every task. Smaller models like GPT-5 mini, Gemini Flash or DeepSeek V3 handle classification, extraction and routine chat well, so reserve premium models for the hard requests.

How do I estimate tokens if I do not know them?

Start with 1,000 input and 500 output tokens as a rough default for a chat turn, then refine using your provider tokenizer once you have real prompts.

Does context length pricing apply?

Some models charge a higher rate above a context threshold, such as very long inputs. For most everyday workloads the standard rate in this tool is what applies.

Are these figures a quote?

No, they are July 2026 planning estimates. Batch discounts and caching can lower real costs, so confirm with the provider.

How many tokens are in 1,000 words?

About 1,300 tokens of English text, since a token averages roughly three quarters of a word. Code, numbers and non-English languages usually use more tokens per word.

Do system prompts and tool definitions count as tokens?

Yes. The system message, tool or function definitions and any examples are sent as input tokens on every call, so a long system prompt is paid for again on each request unless the provider caches it.

What is the difference between training and inference cost?

Training is a one-off cost to build or fine-tune a model. Inference is the recurring cost of running it for every user request, and for most products it becomes the larger cost over time because it grows with traffic.

Is self-hosting an open model cheaper for inference?

It can be at high, steady volume, where rented GPUs stay busy around the clock. At low or spiky traffic, per-token API pricing is usually cheaper because you do not pay for idle GPUs.

Related calculators