AI Calculator Pro

RAG Cost Calculator

Estimate ingestion, storage and query costs for a RAG system.

Quick answer

For the “Small KB” scenario, $67.51/month — + $0.00410 one-time ingestion · $0.0113 per query. Enter your own numbers below to recompute instantly; the full step-by-step math is shown under the worked example.

Results update automatically as you type.

Result
$337.53/month
+ $0.0205 one-time ingestion · $0.0113 per query
Total chunks
2,000
Ingestion (one-time)
$0.0205
Vector storage
0.01 GB
Storage / month
$0.00343
Per query
$0.0113
Queries / month(1,000/day)
$337.52
Total / month
$337.53

Estimate the full cost of a Retrieval-Augmented Generation system: one-time embedding ingestion, monthly vector storage, and per-query generation cost. Enter your corpus size, chunking, and query volume to see where the money goes.

How this is calculated

We add three costs: one-time embedding ingestion (total chunk tokens ÷ 1M × embedding price), monthly vector storage (vectors × dimensions × bytes × overhead, priced per GB), and per-query generation (system + query + top-k retrieved chunks as input, plus the answer as output, × queries × 30). Chunk size and overlap set how many chunks — and thus vectors and retrieved tokens — you get.

Is this a good result? What to do next

For most RAG systems per-query generation dominates, because every query resends retrieved context to a chat model; embedding and storage are usually small by comparison. If your bill is high, look at top-k × chunk size and the generation model first.

Typical planning ranges

Biggest cost
usually per-query generation
Embedding ingestion
one-time, often small
Storage
minor unless corpus is huge

Ranges are typical planning figures to sanity-check your result, not authoritative benchmarks. Your numbers will vary with use case, volume, and vendor.

How to improve this number

  • Retrieve fewer, tighter chunks (lower top-k × chunk size).
  • Use a cheaper generation model or cache the system prompt.
  • Use a smaller embedding model / quantize vectors for storage.

Common mistakes

  • Optimizing embedding cost while generation dominates.
  • Over-retrieving (high top-k) and inflating every query.

When to use a different approach

For a single query, use the RAG query cost calculator. For storage alone, use the vector database storage calculator.

Worked examples

Real scenarios you can reproduce by loading these presets in the calculator above:

Small KB

Result
$67.51/month
+ $0.00410 one-time ingestion · $0.0113 per query
Total chunks
400
Ingestion (one-time)
$0.00410
Vector storage
0.00 GB
Storage / month
$0.000687
Per query
$0.0113
Queries / month(200/day)
$67.50
Total / month
$67.51
  • chunks/doc = ceil(800 / (512-64)) = 2
  • ingestion = 204,800 tokens x $0.02/M
  • per query = embed(query) + (system + 5xchunk + query) generation

Docs site

Result
$675.07/month
+ $0.1024 one-time ingestion · $0.0113 per query
Total chunks
10,000
Ingestion (one-time)
$0.1024
Vector storage
0.07 GB
Storage / month
$0.0172
Per query
$0.0113
Queries / month(2,000/day)
$675.05
Total / month
$675.07
  • chunks/doc = ceil(800 / (512-64)) = 2
  • ingestion = 5,120,000 tokens x $0.02/M
  • per query = embed(query) + (system + 5xchunk + query) generation

Enterprise corpus

Result
$6,750.82/month
+ $2.05 one-time ingestion · $0.0113 per query
Total chunks
200,000
Ingestion (one-time)
$2.05
Vector storage
1.37 GB
Storage / month
$0.3433
Per query
$0.0113
Queries / month(20,000/day)
$6,750.48
Total / month
$6,750.82
  • chunks/doc = ceil(800 / (512-64)) = 2
  • ingestion = 102,400,000 tokens x $0.02/M
  • per query = embed(query) + (system + 5xchunk + query) generation

Sources & references

Frequently asked questions

What drives RAG cost the most?+

Usually per-query generation, because every query resends retrieved context to a chat model. Embedding and storage are often small by comparison.

How do chunk size and overlap affect cost?+

Smaller chunks and larger overlap create more chunks, increasing embedding and storage cost, and can increase retrieved tokens per query.

Related calculators

Answering a real question?

This calculator powers these problem-solving guides: