AI token cost calculator
What an LLM feature costs to run — per answer, per month and per year — with the retrieved context on its own line, because that is where most of a RAG bill hides. Enter your model’s prices and the shape of one request. Nothing you type leaves the page.
Estimate your running cost
The two prices are example values, not a price list — replace them with your model’s current price per million tokens. Everything is USD.
How the cost is worked out
Four lines of arithmetic, all on the page, so you can check them rather than trust them.
Input tokens per call are the prompt and question plus the retrieved passages: prompt + passages × tokens per passage. They are priced at the model’s input rate, and the context share is shown apart from the prompt.
Output tokens per call are the answer, priced at the output rate.
Per request, both are multiplied by the model calls the request makes — one for a RAG answer, one per step for an agent — and the retrieval cost is added once.
Per month is the per-request cost times requests a month; per year is twelve months of that. Rounding happens only for display.
What one of ours costs to run
A measured system, so you have a real number to set yours against.
The production platform behind our enterprise AI case study averages about $0.011 per answer across roughly 40,000 queries a month: about $0.002 of retrieval and $0.009 of generation. Multiplied out, that is about $440 a month — arithmetic on the two measured figures, not a third measurement. Answers take 1.9 seconds on average and 4.2 at p95, to the last token.
The split is the part worth carrying to your own case. The retrieval infrastructure is the cheap fifth. What retrieval really costs sits inside the generation line, as the input tokens every retrieved passage adds to every call. Context length is the cost lever; a cheaper vector database is not.
How that RAG system was added to a product · What an agent costs per task
Three ways to cut the bill
In the order they usually pay off.
Shorten the context
Fewer, better-ranked passages cut cost on every call. Try halving the passages above and watch the context line — it is usually the biggest one you control.
Make fewer calls
If an agent’s steps are always the same, it is a pipeline with one model call in it: cheaper, faster and testable line by line.
Route the easy work
Classification and routing steps rarely need the largest model, and repeated lookups can be cached instead of asked again.
Common questions
About the running cost of an LLM feature.
Want this number for your product?
Tell us what the feature does and how many people will use it. We come back with the build price and the running cost, in writing, within 48 hours of the call.
Message received
We’ll review your enquiry and respond within one business day.