RAG chunk size calculator

← All tools· Embeddings cost estimator· Context window fit checker

Size your RAG pipeline before you embed: chunk count, embedding bills, vector storage, and whether top-k chunks fit inside the model context window alongside your system prompt and question.

~~~

Corpus

Corpus tokens: ( words)

Chunking

Context budget

~~~

Chunks & embedding cost

Total chunks

Chunks per document
ProviderModelEmbed costStorage

pricing. Tokens ≈ 0.75 × words. Storage = chunks × dims × 4 bytes + ~512 B metadata/chunk. See embeddings cost estimator for re-embed schedules.

Retrieval vs context window

Reserved: Retrieval: Free:

Top-k chunks exceed available context after system prompt and question. Lower k, shrink chunks, or pick a larger window — try thecontext window fit checker with real text.

Retrieval fits with headroom for model output. Leave space for the answer — this bar only covers retrieved context + fixed prompt budget.

Smaller chunks improve precision but multiply embedding cost and index size. Larger chunks preserve local context but retrieve irrelevant text. Overlap reduces boundary splits but increases chunk count — 10–20% is a common starting point. Re-ranking (cross-encoder or LLM) after vector search often beats tweaking chunk size alone.

~~~

About this tool

Chunk sizing is the first RAG architecture decision. This calculator connects corpus size to chunk count, embedding bills, and whether your retrieval budget actually fits the model you plan to call.

~~~

Read more