How this calculator works
The RAG Chatbot Cost Calculator estimates what a retrieval-augmented chatbot costs to run, both per query and per month. You enter your queries per month, the retrieved context tokens each query pulls in, the answer tokens the model generates, and your LLM's input and output prices per million tokens. It multiplies context tokens by the input rate and answer tokens by the output rate to get a per-query cost, then scales that by monthly volume. The largest driver is usually the retrieved context: every chunk you attach is billed as input on each call, so retrieval size and query volume dominate the bill more than answer length.
The key trade-off is how much context you retrieve. More retrieved chunks can improve answer quality, but since that context is re-sent and re-billed on every query, doubling it roughly doubles your input cost at scale. Try trimming the number or size of retrieved passages and watch how the per-month figure moves — often you can cut context substantially with little quality loss. Because output tokens are usually priced higher per token but far fewer in number, controlling verbose answers helps less than controlling context. Use the calculator to find the point where retrieval is large enough to answer well but not so large that cost grows faster than the value each query delivers.
Frequently asked questions
What does a RAG chatbot cost per query?
Each RAG query pays for an embedding of the question, a vector-database lookup, and the LLM call that includes the retrieved chunks as context. The LLM input (your retrieved context can be thousands of tokens) usually dominates; embeddings and the vector query are cents or less.
How do I cut RAG costs?
Retrieve fewer and smaller chunks, cache the system prompt, use a cheaper model for routine answers, and cache embeddings for repeated queries. Retrieved context size is the biggest cost lever.