Retrieval augmented generation pricing

RAG Cost Calculator

Use this RAG cost calculator to estimate how retrieved knowledge-base context changes per-query and monthly LLM API spend.

Calculate RAG Cost Cost

Estimate RAG application costs from user questions, retrieved context, system prompts, output tokens and monthly query volume.

No API key required. Your transcript stays in your browser.

Characters: 0Words: 0Estimated input tokens: 0Estimated token count

Output tokens are estimated based on the selected summary type and input length.

Number of AI summarization requests expected each month.

Advanced Settings
i

Tokens used by the system prompt or recurring instructions in every interaction.

i

Percentage of input tokens expected to use provider prompt caching.

Compare the Same Workload Across Models

Compare model pricing, per-interaction cost, and monthly difference using the same current calculator values.

Paste sample content above to compare model costs.

What to include in a RAG cost estimate

A RAG request usually includes the user question, system instructions, retrieved document chunks and the generated answer. The retrieved chunks are often the biggest hidden cost because they are sent on every query.

For a practical first estimate, paste a typical user question plus representative retrieved context into the calculator, then scale it by expected monthly queries.

RAG componentTypical token rangeWhy it matters
User question20-150Usually small, but present on every request
System instructions200-800Can often be cached or shortened
Retrieved context1,000-8,000Main driver of input-token cost
Generated answer200-800Drives output-token cost

RAG Cost Calculator FAQ

How do I estimate RAG API cost?

Add the user question, system prompt and retrieved context as input tokens, estimate answer length, then multiply by monthly query volume.

Does this include vector database cost?

No. This page estimates LLM token cost only. Vector storage and search infrastructure should be estimated separately.

What reduces RAG cost the fastest?

Send fewer retrieved chunks, trim repeated instructions, cache stable prompt text and route simple questions to lower-cost models.