RAG Chunk Size Calculator

Estimate fixed-window RAG chunks, repeated overlap tokens and embedding cost. Compare your own chunk size and model rate before indexing documents.

Token windows

Embedding price

Illustrative starting value. Replace with your provider/model rate.

Your estimate

Chunks
23
Tokens to embed
11,408
Repeated tokens
1,408
Embedding estimate
$0.0002

First 5 chunk windows

  1. Chunk 1: tokens 1 to 512
  2. Chunk 2: tokens 449 to 960
  3. Chunk 3: tokens 897 to 1408
  4. Chunk 4: tokens 1345 to 1856
  5. Chunk 5: tokens 1793 to 2304

Rate is an editable example in USD, not a live model price. Use your embedding provider's current price. No documents are uploaded.

How it works

For documents larger than one chunk, chunk count is 1 + ceil((document tokens - chunk size) / (chunk size - overlap)). Embedding tokens equal document tokens plus overlap for each extra chunk. The diagram shows the first five windows, not the whole document.

Know the limits

This assumes one continuous document split into fixed token windows. Separate document boundaries, metadata, headings, tokenizer differences and vector storage are excluded. It does not choose an optimal chunk size or measure retrieval quality. Test retrieval with your own documents and queries.

Runs in your browser. Inputs are not uploaded or saved. Explore all free tools or read the technical notes.