Chunk size calculator
How it adds up
| Item | Chunks | Tokens to embed | Retrieved per question |
|---|---|---|---|
| 200 tokens | 667 | 133,300 | 1,000 |
| 300 tokens | 400 | 119,950 | 1,500 |
| 500 tokens | 223 | 111,100 | 2,500 |
| 800 tokens | 134 | 106,650 | 4,000 |
| 1,000 tokens | 106 | 105,250 | 5,000 |
| 2,000 tokens | 52 | 102,550 | 10,000 |
Smaller chunks find more precise passages but carry less context each; larger ones keep more context but dilute the match and fill the prompt faster. There is no universal best size: test a few on real questions and compare the answers. Embedding prices change often, so use your provider’s current price.
Worked out from the numbers you enter. Calculated in this browser; nothing you enter is sent anywhere or stored.
How to use it · free, no signup
How to use the Chunk Size Calculator
Enter the size of your text, the chunk size and overlap, the chunks retrieved per question and the embedding price to see the chunks, tokens, cost and prompt size. Calculated in your browser.
01
Enter the text size
The total tokens in the documents you will search.
02
Set chunk and overlap
The size of each chunk and how much neighbouring chunks share.
03
Add retrieval and price
Chunks retrieved per question, and the embedding price.
How chunks are counted
Retrieval systems split documents into chunks, store each one with an embedding, and at question time return the chunks closest to the question. With a chunk size of S tokens and an overlap of O, each new chunk starts S − O tokens after the one before. A document of T tokens therefore makes one chunk plus one for every S − O tokens after the first.
| Figure | Example |
|---|---|
| Text to split | 100,000 tokens |
| Chunk size and overlap | 500 and 50 tokens |
| Chunks | 223 |
| Tokens to embed | 111,100 |
| Extra from overlap | 11.1% |
| Retrieved per question, 5 chunks | 2,500 tokens |
What overlap costs
Overlap repeats the end of each chunk at the start of the next, so an idea that falls across a boundary is whole in at least one of them. Every boundary embeds the overlap twice. At 50 tokens on chunks of 500 that adds 11.1% to the tokens embedded; at 200 on chunks of 1,000 it adds about a quarter. Embedding is usually cheap, but storage and search scale with the number of chunks.
Choosing a chunk size
- Smaller chunks match a question more precisely, but each carries less surrounding context.
- Larger chunks carry more context, but the part that answers the question is diluted, and each fills more of the prompt.
- Natural boundaries such as paragraphs and headings often matter more than the exact number.
- Testing beats rules. Try two or three sizes on a set of real questions and compare the answers.
Retrieved text and the prompt
Every question pulls the top few chunks into the prompt, so chunk size times the number retrieved is added to each request: 2,500 tokens in the example. That has to fit in the model’s window alongside the instructions and the answer, which the context window calculator checks, and it is paid for on every request, which the AI API cost calculator prices.
Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.
Questions
What people ask about the Chunk Size Calculator
What is chunking?
How many chunks will my document make?
Why overlap chunks?
What chunk size should I use?
Does chunk size affect the prompt?
Related tools
Token Counter
An estimate of the tokens in any text
Open itContext Window Calculator
How many words and pages fit in a context window
Open itAI API Cost Calculator
What an AI workload costs per request and per month
Open itVector Database Size Calculator
Storage for embeddings, metadata and the index
Open itPassword Generator
Generate strong passwords in your browser and see what they are actually worth
Open itAI Prompt Generator
One clear prompt from its parts
Open it