AI Architecture

RAG Cost & Sizing Calculator

Cost a RAG system end to end across embeddings, storage, retrieval, reranking, and generation.

By Mudassir Khan. Last updated May 3, 2026. Audience: Engineer / Architect.

RAG Cost & Sizing Calculator diagramA responsive abstract diagram showing inputs, modelled assumptions, and a result surface.

Inputs

Result

One-time index cost

$5.00

Monthly storage

$25.00

Monthly query cost

$311.50

All-in monthly

$336.50

What this calculator covers

RAG cost has three layers: indexing, storage, and query-time generation. Many teams only model the final LLM call and miss the cost of chunking, embeddings, vector storage, reranking, and repeated retrieval.

How RAG cost breaks down

Index cost is mostly corpus size, chunk size, overlap, and embedding model price. Storage cost depends on the vector database pricing model. Query cost combines query embeddings, retrieval, reranking, prompt assembly, and generation. The expensive part changes as the system scales.

Optimisations that move the needle

Smaller chunks can improve retrieval but increase vector count. Larger chunks reduce index size but may inflate prompt tokens. Caching helps repeated queries. Reranking can improve quality but adds latency and cost. The right optimization depends on whether storage, retrieval, or generation dominates.

Assumptions and methodology

RAG cost combines one-time embedding cost, monthly vector storage, query embeddings, optional reranking, and generation cost.

The page keeps the interaction fast, accessible, and dependency-light while preserving the important planning behaviour from the implementation plan: editable inputs, visible outputs, no signup gate, structured data, internal links, citations, and clear caveats. Heavy runtime features such as Monaco, solc, exact tokenizers, or PDF export should remain code-split when added so the public page stays fast.

Sources and review cadence

Assumptions should be reviewed quarterly, and pricing-sensitive assumptions should be reviewed monthly. The public data files in the repo include last-reviewed or last-verified dates where the plan calls for them.

Need the architecture behind the number?

Use this tool to narrow the conversation, then bring the scenario into an architecture review if the decision affects budget, security, compliance, or production reliability.

Book a strategy call

Frequently asked questions

How is RAG cost different from one LLM call?

RAG includes corpus ingestion, embeddings, vector storage, retrieval, optional reranking, and final generation. A single-call calculator only prices the final model call, so it misses costs that become material as the corpus or query volume grows.

What's a sensible chunk size?

A practical starting range is 400-800 tokens with 10-20 percent overlap. Smaller chunks can improve precision but increase vector count. Larger chunks reduce storage but can dilute retrieval quality and add prompt tokens.

When is pgvector cheaper than Pinecone?

pgvector is often cheaper when you already operate Postgres and the workload is moderate. Pinecone or managed vector services can be worth the premium when scale, filtering, latency, managed operations, or team capacity matter more than raw storage cost.

How much does reranking add?

Reranking adds an extra model or service call per query, usually multiplied by the number of retrieved candidates. It can be worth the cost when answer quality, citation accuracy, or regulated retrieval precision matters.

Is caching realistic for RAG?

Caching is realistic for repeated questions, internal knowledge bases, and stable policy lookups. It is less useful for highly personalized, time-sensitive, or constantly changing queries. Cache hit rate should be measured from logs rather than guessed.

How do I forecast 10x scale?

Separate fixed storage from query-variable costs. Embedding the corpus may not grow with traffic, while query embeddings, reranking, and generation usually scale almost linearly with monthly queries unless caching or batching changes the curve.

Related pages

ai systems architecturellm pipeline cost calculatoragentic ai mvp cost estimator