RAG System Cost Calculator
Estimate vector DB storage, embedding, and query costs for a Retrieval-Augmented Generation system.
Inputs
Results
Total chunks
50,000
Total monthly cost ($)
$347.04
≈ 6 tanks of gas
One-time embedding cost ($)$2.56
Vector storage (GB)0.29
Vector DB monthly cost ($)$3.50
Daily query cost ($)$11.45
Monthly query cost ($)$343.54
Embedding tokens (millions)25.6
How to Use This Calculator
- Enter Document Count and average Tokens per Document for your knowledge base (a page is ~500 tokens).
- Set Chunk Size (512 tokens is common) and Chunk Overlap to control how documents are split for retrieval.
- Enter Embedding Dimensions (1536 for OpenAI ada-002) and expected Queries per Day.
- Set Top-K Retrieved Chunks to control how many context chunks are injected per LLM call.
- Review Total Chunks, One-time Embedding Cost, Vector Storage (GB), Monthly Query Cost, and Total Monthly Cost to design your RAG system budget.
How the result changes with Number of documents
| Number of documents | Total chunks | Total monthly cost ($) |
|---|---|---|
| 10,000,000 | 50,000,000 | $3,843.54 |
| 35,000,000 | 175,000,000 | $12,593.54 |
| 65,000,000 | 325,000,000 | $23,093.54 |
| 90,000,000 | 450,000,000 | $31,843.54 |
What each input means
- Number of documents
- Total documents in your knowledge base corpus.
- Avg tokens per document
- Average token length per document. A typical page of text is ~500 tokens.
- Chunk size (tokens)
- Size of each text chunk for embedding. Common sizes: 256, 512, 1024.
- Chunk overlap (tokens)
- Token overlap between consecutive chunks to preserve context across boundaries.
- Embedding dimensions
- Vector dimensions. OpenAI ada-002: 1536, text-embedding-3-large: 3072, Cohere: 1024.
- Queries per day
- Expected number of RAG queries per day from your application.
- Top-K retrieved chunks
- Number of most-similar chunks retrieved per query for LLM context.
What each result means
- Total chunks
- Total text chunks generated from your document corpus.
- One-time embedding cost ($)
- Cost to embed all chunks using OpenAI ada-002 at $0.10/1M tokens.
- Vector storage (GB)
- Estimated vector database storage in gigabytes (float32 + metadata).
- Vector DB monthly cost ($)
- Estimated Pinecone-equivalent hosting cost (~$0.07/month per 1K vectors).
- Daily query cost ($)
- Daily cost for query embeddings + LLM synthesis (GPT-4o pricing).
- Monthly query cost ($)
- Projected 30-day query cost.
- Total monthly cost ($)
- Vector DB hosting + query costs combined.
- Embedding tokens (millions)
- Total tokens sent to the embedding API during indexing.
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersNumber of documents = 10000, Avg tokens per document = 2000, Chunk size (tokens) = 512, Chunk overlap (tokens) = 50 = 7 input(s) provided
- Calculate Total chunksTotal chunks = documentCount * chunksPerDoc50000 = 50000
- Calculate Total monthly costTotal monthly cost = vectorDbMonthlyCost + monthlyQueryCost347.04 = $347.04
- Calculate One-time embedding costOne-time embedding cost = (totalEmbeddingTokens * 0.10) / 1_000_0002.56 = $2.56
- Calculate Vector storageVector storage = totalStorageBytes / (1024 ^ 3)0.288 = 0.288
Engine last updated .
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
Ai Tools
Embedding Cost Calculator
Calculate embedding API costs and storage requirements across OpenAI, Cohere, and self-hosted models.
Ai ToolsLLM Token Calculator
Estimate token count and API cost from text length across different tokenizers (GPT-4, Claude, Llama).
Ai ToolsAI Model Cost Comparison Calculator
Compare per-token and per-request costs across AI providers including GPT-4o, Claude, Gemini, and self-hosted Llama.
More in Technology & Computing.