AI Calculator Pro

Chunk Size & Overlap Calculator

See how chunk size and overlap change chunk count.

Quick answer

With the default inputs, 2,000 chunks — 2 chunks/doc · 1,024,000 tokens to embed. Enter your own numbers below to recompute instantly; the full step-by-step math is shown under the worked example.

Results update automatically as you type.

Result
2,000 chunks
2 chunks/doc · 1,024,000 tokens to embed
Effective tokens/chunk
448 tokens
Chunks per document
2
Total chunks
2,000
Overlap
12.5%
Total tokens to embed
1,024,000 tokens

Chunking decisions drive how many vectors you store and how much context each query retrieves. Set your corpus, chunk size and overlap to see the resulting chunk count and tokens to embed.

How this is calculated

Chunks per document ≈ (tokens per doc − overlap) ÷ (chunk size − overlap); total chunks = that × document count, and tokens to embed = total chunks × chunk size (overlap is embedded repeatedly). Smaller chunks and larger overlap both create more chunks.

Is this a good result? What to do next

Chunking is a quality/cost trade-off, not just a cost lever: smaller chunks retrieve more precisely but create more vectors and can fragment meaning; larger chunks keep context but retrieve coarser. 256–512 tokens with 10–20% overlap works for most RAG.

Typical planning ranges

Common chunk size
256–512 tokens
Common overlap
10–20% of chunk size
More chunks
more embedding, storage, retrieved tokens

Ranges are typical planning figures to sanity-check your result, not authoritative benchmarks. Your numbers will vary with use case, volume, and vendor.

How to improve this number

  • Increase chunk size to reduce chunk count (and storage).
  • Keep overlap modest — it's embedded and stored repeatedly.
  • Tune to retrieval quality on your own queries.

Common mistakes

  • Very small chunks with high overlap exploding vector count.
  • Choosing chunking for cost without testing retrieval quality.

When to use a different approach

For the full pipeline cost, use the RAG cost calculator. For storage of the resulting vectors, use the vector database storage calculator.

Worked example (defaults)

With the default inputs above, here is the result:

Result
2,000 chunks
2 chunks/doc · 1,024,000 tokens to embed
Effective tokens/chunk
448 tokens
Chunks per document
2
Total chunks
2,000
Overlap
12.5%
Total tokens to embed
1,024,000 tokens
  • chunks/doc = ceil(800 / (512 - 64))

Frequently asked questions

What chunk size should I use?+

256-512 tokens works well for most RAG. Larger chunks keep more context per chunk but retrieve less precisely; overlap of 10-20% preserves meaning across boundaries.

Related calculators