Skip to main content

AI/LLM API cost calculator: what will your AI feature cost to run?

Enter your users and usage in plain business terms to estimate monthly cost, cost per active user, annual cost, and the tokens you'll burn across model tiers.

Free planning toolHow it works

What will your AI feature cost to run?

Enter your usage in business terms — we estimate the tokens and show your monthly cost and cost per user.

People using the AI feature each month

Average API calls per user each month

system prompt + retrieved context + history

Tokens the model generates in reply

Model tier

Pricing verified June 2026 — directional, re-verify against provider pages.

Fill in all fields and pick a model to estimate your cost.

Quick answer: how AI feature costs add up

LLM APIs bill per token (about 0.75 words each), and output tokens usually cost several times more than input. Monthly cost is roughly tokens per request × requests per month × the model's per-token rate.

As of mid-2026, prices span roughly 150× between the cheapest and flagship models - so the biggest lever is picking the smallest model that meets your quality bar. Enter your users and usage above to estimate monthly cost and cost per user.

Key takeaways

  • You pay per token, and output is pricier than input.
  • Estimate all tokens - system prompts, retrieved context, chat history, and retries - not just the visible message.
  • Model choice is the dominant cost lever (up to ~150× difference between tiers).
  • Prompt caching and batch APIs can cut bills significantly.
  • Track cost per successful task, not just cost per call.

How to estimate your AI feature's cost

  1. Estimate usage: monthly active users × messages per user × average input and output tokens.
  2. Pick a model that matches the quality you actually need.
  3. Compare a few models side by side to find the cheapest one that still works.

These are exactly the calculator inputs above, expressed in business terms instead of raw token counts.

How LLM API pricing works

Tokens are roughly 0.75 words each, and providers charge separately for input and output. Output is several times more expensive because each generated token requires fresh computation, while input is processed in a single efficient pass.

Context windows, prompt caching, and retries all add tokens you should account for in your estimate.

Model pricing reference (verified June 2026)

Model (example tiers)Input / Output per 1M tokens
Budget (e.g. mini / nano / flash-lite)~$0.10–$0.20 / ~$0.40–$1.25
Mid-tier (e.g. GPT / Claude Sonnet class)~$2.50–$3.00 / ~$10–$15
Flagship (e.g. Opus / Pro class)~$5.00 / ~$25–$30

Directional and verified June 2026 - re-verify against provider pricing pages before committing a budget.

How to cut your AI costs

  • Use a smaller model for simple tasks - often 10–16× cheaper at similar quality.
  • Shorten system prompts and trim retrieved context and history.
  • Enable prompt caching so repeated context isn't re-billed at full price.
  • Route non-realtime jobs through the batch API for a discount.
  • Cap maximum output length to control the most expensive tokens.

Glossary

Token
The unit LLMs bill on - about 0.75 words of English.
Input / output tokens
Tokens you send (prompt, context, history) versus tokens the model generates; priced separately, with output higher.
Context window
The maximum tokens a model can consider at once, including everything you send plus its reply.
Prompt caching
Reusing already-processed prompt context at a reduced rate instead of paying full input price each call.
Batch API
A discounted, asynchronous mode for non-realtime workloads.
MAU
Monthly active users - the people using your AI feature each month.
Cost per task
Total cost divided by successful outcomes - a truer metric than cost per call.
tiktoken
A common tokenizer library used to count tokens before sending a request.

Why model choice is the cost decision that matters most

The price gap between the cheapest and most capable models can be roughly 150×. That means the single biggest cost decision for an AI feature isn't infrastructure or caching - it's which model handles each request.

Many products default to a flagship model for everything, then discover that a budget tier handles 80% of requests just as well at a fraction of the cost.

Route simple tasks to small models and reserve flagships for the cases that genuinely need them.

Three levers that bring an AI bill down

LeverHow to pull it
Smaller modelMatch each task to the cheapest model that meets the quality bar
Fewer tokensTrim system prompts, cap output length, and limit retained history
Caching & batchingCache repeated context and route non-realtime work through the batch API

The highest-leverage savings usually come from architecture, not from haggling over per-token rates. A well-designed retrieval step that sends only the most relevant context - rather than dumping everything into the prompt - can cut input tokens dramatically.

If your estimated cost looks alarming, the fix is often in how the feature is built, not in the model price list.

Last updated June 2026.

FAQ

Your questions, answered

Have a question about your project? Ask us on a free call, and we'll give you a straight answer.

How do I calculate LLM API costs?
Multiply tokens per request by requests per month by the model's per-token rate, keeping input and output separate because they're priced differently. Then add overhead for caching, retries, and system prompts.
Why are output tokens more expensive than input?
Generating each output token requires fresh model computation, while input tokens are processed more efficiently in a single pass. That's why output is usually priced several times higher than input.
What is a token?
A token is a chunk of text - roughly 0.75 words of English on average. LLM APIs bill per token rather than per word or character, counting both what you send and what the model generates.
What does 'monthly tokens' mean for a chatbot?
It's the total tokens processed in a month. A bot with around 1,000 active users sending roughly 10 messages a day can use about 10-30M tokens per month, depending on prompt and context size.
Which model is cheapest?
Budget tiers (mini, nano, flash-lite class models) are the cheapest. The right move is to pick the smallest model that still meets your quality bar, then upgrade only where needed.
How can I reduce AI costs?
Use a smaller model for simple tasks, shorten system prompts, enable prompt caching, route non-realtime work through the batch API, and cap the context and history you send.
How accurate is this estimate?
It's planning-grade. Real costs depend on prompt design, retries, caching, and exact provider pricing, so always verify against current provider pricing pages before committing a budget.
Should I self-host instead?
Usually only at high, steady volume. For most products - even under heavy usage - hosted APIs come out cheaper than the amortized cost of running and maintaining your own GPUs.

Tell us about your project

Tell us what you're building, when you need it, and what's in the way. A senior engineer will reply within one business day with honest next steps, even if that means we're not the right fit.

  • Your project is led by a senior engineer, not a junior and not AI on its own
  • AI speeds up the build. Every change is reviewed and tested before it ships
  • Best for MVPs, SaaS products, automation, and fixing apps that keep breaking
Browse all planning tools