RAG Chunk Calculator

See how a document would be split into chunks for a RAG pipeline.

What is the RAG Chunk Calculator?

Retrieval-augmented generation (RAG) pipelines split source documents into overlapping chunks before embedding and indexing them, since embedding models and retrieval work better on smaller, focused pieces of text than on whole documents. This tool previews exactly how a document would be split, given a target chunk size and overlap.

How to use it

  1. Paste the document text you'd chunk in your pipeline.
  2. Set a target chunk size and overlap, in estimated tokens.
  3. Click Calculate Chunks to see how many chunks result and preview each one.

Overlap between consecutive chunks helps preserve context that would otherwise be cut across a chunk boundary — a sentence split exactly at the boundary loses meaning in the chunk that only has half of it, so a modest overlap window reduces that risk. Token counts here are estimates, using the same character-based approximation as our AI Token Counter. Everything runs locally in your browser.