Skip to content

Search

Articles, tools, solutions and knowledge base guides

Start typing to search across articles, tools and apps.

RAG Infrastructure Calculator

NEW

Plan a retrieval-augmented generation pipeline from documents to answers: chunks, embedding tokens, raw vector and metadata storage, retrieval and context per query, with every assumption stated.

Free to use No registration Privacy protection

Pipeline

Eight stages, one chain of numbers

Indexing once per corpus change

Serving every query

Chunking

Fixed-size windows with overlap

tokens
tokens
Stride, size − overlap
Share of each chunk repeated
Chunks per document, first group
Final partial chunk

Fixed-size sliding windows; the final partial chunk is kept and not padded.

chunkoverlap, embedded twice

Overlap against workload

Retrieval quality is not estimated: it depends on the documents and the questions, and is measured on representative queries.

Vector storage

Raw vectors
Metadata
One logical copy

Indexing run

Embedding input
Embedding cost
Write time

Per query

Retrieved, then kept
Model input, at most
Model output

Per billing period

Model input, at most
Model output
Reranker pairs
Assumptions and limits Exact arithmetic on stated averages; index structures, model prices and quality are not estimated.

Exact

  • Chunks, embedding tokens and raw bytes follow from the entered values.
  • MB, GB are powers of 1,000; MiB, GiB are powers of 1,024.

Planning assumption

  • Every document of a group has the group's average length.
  • Metadata is a flat size per chunk.
  • Prompt and output lengths per query.
  • One vector search per query, no cache.

Entered values

  • The embedding price, when set.
  • The write rate, when measured.

Not estimated

  • Index structures and engine overhead.
  • Stored chunk text and backups.
  • Model prices, latency and retrieval quality.

Found a bug or missing something? Write to us

Scope and limits

Exact counts, stated assumptions

Every figure can be checked by hand

The calculation is tested against reference cases: 10,000 documents of 2,500 tokens in 512-token chunks with 64 tokens of overlap give exactly 60,000 chunks and 28,200,000 embedding tokens, and 1,536 FP32 dimensions take 368,640,000 bytes. Everything the estimate leaves out is listed under the assumptions.

Help

FAQ

How are the chunks counted?

With windows of S tokens and an overlap of O tokens, each window starts S − O tokens after the previous one. A document of T tokens gives 1 + ⌈(T − S) / (S − O)⌉ chunks when it is longer than S, and one chunk otherwise; the final partial chunk is kept. A group gives that count times its documents.

Why does overlap increase the embedding workload?

Every overlapping token is embedded twice, once in each chunk that holds it. With 512-token chunks, 64 tokens of overlap turn a corpus of 25,000,000 tokens into 28,200,000 embedding tokens (+12.8%), and 128 tokens into 32,680,000. Whether more overlap improves retrieval is not estimated: it is measured on representative questions.

How is vector storage calculated?

Raw vectors take chunks × dimensions × bytes per value: 4 for FP32, 2 for FP16 and BF16, 1 for INT8. 60,000 vectors of 1,536 FP32 dimensions take 368,640,000 bytes, 368.64 MB or 351.56 MiB. Metadata adds a flat size per chunk, and every copy repeats both. Index structures such as an HNSW graph depend on the engine and are not included.

Why does the embedding cost say "rate not set"?

The calculator ships no price lists for embedding models, so it never shows a price it cannot verify. Once a price per million tokens is entered, the cost is that price times the embedding input tokens. The write time works the same way, from a measured rate of vectors per second.

How large is the context of one query?

At most, the chunks kept times the longest chunk: 8 chunks of 512 tokens give 4,096 tokens, plus the prompt around them. When the model's context window is entered, the calculator checks that the largest input and the answer fit in it.

Are the entered values sent to a server?

No. Every figure is calculated in the browser. The settings are kept in the page address as numbers and choices only, so a link can be shared; no document text is involved, and nothing else is stored or sent.