RAG chunk size calculator

Document length and chunk settings, as chunk count and embedding cost.

FreeRuns in your browserNo signupUpdated 2026-10-29

Rates last checked October 2026. Words are converted at 1.33 tokens per word, typical for English prose.

Total chunks

960

8 per document of about 3,325 tokens

One-time indexing cost

$0.01

452,760 tokens embedded, 13% overhead from overlap

MeasureValue
Tokens in the corpus399,000
Tokens sent to the embedding API452,760
Query embedding cost per month$0
Vectors stored960 × 1,536 dimensions
Vector storage (float32, before index overhead)5.63 MB
Re-index cost if everything changes$0.01

Embedding is usually the cheap part of RAG. The answer generation call, which reads the retrieved chunks, is where most of the monthly cost goes.

About this tool

How it works and how to read the result.

Need this done for you?

AI agents & chatbots

AI assistants that answer, act and hand over when needed.

See the service

What it does

Choosing a RAG chunk size is a trade between retrieval precision, context and cost, and this calculator shows the cost side instantly. Enter how many documents you have and how long they are, set the chunk size and overlap, and pick an embedding model. The page returns the number of chunks, the tokens that will be embedded including overlap, the one-time indexing cost, the monthly query cost and the storage the vectors need. It runs in your browser.

How to use it

  1. Enter the number of documents and their average length in words. Tokens are estimated at 1.33 per word.
  2. Set the chunk size and overlap in tokens to match your splitter's settings.
  3. Choose an embedding model, or enter a custom price and dimension count.
  4. Enter expected queries per month to see the cost of embedding questions.
  5. Compare settings by changing the chunk size and watching the totals.

How to read the result

Take 120 documents of 2,500 words each, about 3,325 tokens per document. With 512-token chunks and 64 tokens of overlap, each document splits into 8 chunks, 960 in total. Overlap adds about 13% to the tokens embedded, so around 452,000 tokens go to the API. On text-embedding-3-small at $0.02 per million, indexing costs about one cent. At 1,536 dimensions in float32, the 960 vectors take about 5.6 MB before index overhead.

Cut the chunk size to 256 and the count roughly doubles to around 2,000 chunks; storage doubles with it and the indexing cost is still negligible. Double the overlap to 128 and the embedded tokens rise by about 15% for a small gain in boundary handling.

The warning badge appears when overlap is half the chunk or more, or when chunks are very small or very large. Those settings usually signal a mismatch between the splitter and the content.

We tune chunking and retrieval when building AI agents over company documents. Budget the generation side with the AI API cost calculator.

Questions

Frequently asked.

What chunk size should I use?

Between 256 and 1,024 tokens works for most document sets. Smaller chunks match specific questions more precisely but lose surrounding context; larger chunks keep context but blur several topics into one vector. Start around 512, test retrieval quality on real questions, and adjust from there.

What is overlap for?

Overlap repeats the last part of one chunk at the start of the next so that a sentence split across a boundary still appears whole in at least one chunk. Ten to twenty percent of the chunk size is typical. More than that mostly inflates cost without improving answers.

Is embedding the main cost of RAG?

Rarely. Indexing a corpus once costs cents to a few dollars at current prices. The ongoing cost is the generation call that reads the retrieved chunks on every question, plus the vector database. Use the AI API cost calculator for that side.

Your next move

Like what you see? Tell us about it.

A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.

India · Working with clients worldwide

We reply within a working day. No spam, ever.