Total chunks
13,000items
13 per document · final chunk 400 tokensRAG · DOCUMENT PROCESSING COST
How much does chunk overlap add?
Calculate initial embedding and monthly re-embedding separately.
No document text or API keys. Tokens are not characters. Assumptions & exclusions ↓ · Length-distribution study ↓
An overlap of 200 tokens adds 24% to processed tokens. Initial embedding costs $0.2480.
13,000items
13 per document · final chunk 400 tokens12,400,000
+2,400,000 tokens over the original text$0.2480
$0.02 per million tokensMonthly re-embedding: 100 documents × 4 runs: $0.0992 · 4,960,000 tokens (initial cost separate)
Compare 0%, 10% and 20% overlap. This table does not recommend an overlap ratio or predict retrieval quality.
| Overlap | Total chunks | Processed tokens | Initial cost |
|---|---|---|---|
| 0 tokens | 10,000 items | 10,000,000 | $0.2000 |
| 100 tokens | 11,000 items | 11,000,000 | $0.2200 |
| 200 tokens | 13,000 items | 12,400,000 | $0.2480 |
NANOBOOK ANALYSIS · CALCULATED
It can be low or high. In the long-tail example below, using the exact mean puts the initial embedding estimate 18.0% below the document-by-document calculation. The difference comes from rounding chunk counts separately for each document.
Illustrative token-length distributions, independent of the calculator inputs above. 1,000 documents · 1,000-token chunks · 200-token overlap · OpenAI text-embedding-3-small. Initial cost only, before tax; no real corpus or paid API test.
The example contains 900 short documents of 100 tokens and 100 long documents of 9,100 tokens. Both methods start from the same 1,000,000 original tokens.
The average method creates 1,000 chunks. Splitting every document separately creates 2,100, adding 220,000 overlapping tokens that the average misses.
Load the uniform-average estimateThis link loads only the mean into the calculator. The document-by-document result stays in this study.
| Document lengths | Using the mean | Per-document cost | Error |
|---|---|---|---|
| Equal lengths1,000 × 1,000 tokensMean: 1,000 tokens | $0.020000 | $0.020000 | Matches |
| Short majority, long tail900 × 100 + 100 × 9,100 tokensMean: 1,000 tokens | $0.020000 | $0.024400 | 18.0% low |
| Mean just above the boundary500 × 1,000 + 500 × 1,002 tokensMean: 1,001 tokens | $0.024020 | $0.022020 | 9.1% high |
Group notation: document count × tokens per document. “Low” and “high” describe the mean-based estimate relative to the per-document calculation. These examples do not establish a typical error or a worst-case limit.
For the same long-tail corpus with no overlap, both methods process 1,000,000 tokens and cost $0.020000. Chunk counts still differ: 1,000 versus 1,900. A matching embedding cost does not establish matching vector counts.
OpenAI text-embedding-3-small; six-decimal USD costs. Every pair lists the mean estimate first, then the per-document result.
| Corpus | Overlap | Chunks: mean / per doc | Costs: mean / per doc | Error |
|---|---|---|---|---|
| Equal lengths1,000 × 1,000 tokens | 0 tokens | Mean: 1,000Per doc: 1,000 | Mean: $0.020000Per doc: $0.020000 | Matches |
| Equal lengths1,000 × 1,000 tokens | 100 tokens | Mean: 1,000Per doc: 1,000 | Mean: $0.020000Per doc: $0.020000 | Matches |
| Equal lengths1,000 × 1,000 tokens | 200 tokens | Mean: 1,000Per doc: 1,000 | Mean: $0.020000Per doc: $0.020000 | Matches |
| Balanced mix500 × 900 + 500 × 1,100 tokens | 0 tokens | Mean: 1,000Per doc: 1,500 | Mean: $0.020000Per doc: $0.020000 | Matches |
| Balanced mix500 × 900 + 500 × 1,100 tokens | 100 tokens | Mean: 1,000Per doc: 1,500 | Mean: $0.020000Per doc: $0.021000 | 4.8% low |
| Balanced mix500 × 900 + 500 × 1,100 tokens | 200 tokens | Mean: 1,000Per doc: 1,500 | Mean: $0.020000Per doc: $0.022000 | 9.1% low |
| Short majority, long tail900 × 100 + 100 × 9,100 tokens | 0 tokens | Mean: 1,000Per doc: 1,900 | Mean: $0.020000Per doc: $0.020000 | Matches |
| Short majority, long tail900 × 100 + 100 × 9,100 tokens | 100 tokens | Mean: 1,000Per doc: 1,900 | Mean: $0.020000Per doc: $0.021800 | 8.3% low |
| Short majority, long tail900 × 100 + 100 × 9,100 tokens | 200 tokens | Mean: 1,000Per doc: 2,100 | Mean: $0.020000Per doc: $0.024400 | 18.0% low |
| Across the first boundary500 × 999 + 500 × 1,001 tokens | 0 tokens | Mean: 1,000Per doc: 1,500 | Mean: $0.020000Per doc: $0.020000 | Matches |
| Across the first boundary500 × 999 + 500 × 1,001 tokens | 100 tokens | Mean: 1,000Per doc: 1,500 | Mean: $0.020000Per doc: $0.021000 | 4.8% low |
| Across the first boundary500 × 999 + 500 × 1,001 tokens | 200 tokens | Mean: 1,000Per doc: 1,500 | Mean: $0.020000Per doc: $0.022000 | 9.1% low |
| Mean just above the boundary500 × 1,000 + 500 × 1,002 tokens | 0 tokens | Mean: 2,000Per doc: 1,500 | Mean: $0.020020Per doc: $0.020020 | Matches |
| Mean just above the boundary500 × 1,000 + 500 × 1,002 tokens | 100 tokens | Mean: 2,000Per doc: 1,500 | Mean: $0.022020Per doc: $0.021020 | 4.8% high |
| Mean just above the boundary500 × 1,000 + 500 × 1,002 tokens | 200 tokens | Mean: 2,000Per doc: 1,500 | Mean: $0.024020Per doc: $0.022020 | 9.1% high |
Let tᵢ be each document’s token length, D the document count, μ the exact mean, C the chunk size and O the overlap. A document has n(t) = max(1, ceil((t−C)/(C−O)) + 1) chunks. Stop when the last chunk reaches its document’s end; do not pad or join documents.
Per-document processed tokens = Σ [tᵢ + (n(tᵢ)−1) × O]
Mean estimate = D × [μ + (n(μ)−1) × O]
Difference = O × [D × n(μ) − Σ n(tᵢ)]
Signed error (%) = (mean estimate − per-document total) ÷ per-document total × 100
The raw token sums cancel because D × μ = Σ tᵢ. With positive linear per-token pricing, the relative token error is also the relative initial-cost error. That is why the percentages match across the three supported standard rates, while dollar costs differ.
Cost is proportional to processed tokens at the published standard rate. The calculator displays four USD decimals; this study shows six and the CSV retains twelve. Error percentages use unrounded token totals.
Analysis checked . Prices and limits were checked against OpenAI small, OpenAI large, OpenAI input limits and Voyage pricing. Distribution comparisons are NanoBook calculations.
Checked · Standard embedding rates · before tax · free credits and Batch discounts excluded. USD per million input tokens.
| Model | Standard rate | Input limit |
|---|---|---|
| OpenAI text-embedding-3-small ↗ | $0.02 | 8,192 tokens |
| OpenAI text-embedding-3-large ↗ | $0.13 | 8,192 tokens |
| Voyage voyage-4 ↗ | $0.06 | 32,000 tokens |
Voyage offers account-specific free token allowances, which are not applied here. OpenAI and Voyage Batch discounts are also excluded, so actual charges may differ. Verify your custom rate and provider limits separately.
For document length T, chunk size C and overlap O, chunks per document = max(1, ceil((T−C)/(C−O)) + 1). Stop when the final chunk reaches the document end. Do not pad it or join documents. Processed tokens per document = T + (chunks−1) × O.
Every document is assumed to have the entered length. Unequal lengths change rounding, chunk counts and costs. Use tokens counted by the model's tokenizer. Sentence, paragraph, recursive and semantic splitting, or the exact behavior of a library such as LangChain, are not reproduced.
Documents per run = ceil(total documents × reprocessing percentage ÷ 100). Multiply by runs per month and processed tokens per document. Each selected document is embedded in full, with no incremental processing or deduplication. Initial embedding cost is not included in monthly re-embedding cost.
Query embeddings, provider-added prompts or special tokens, retries, automatic truncation, vector storage/search, LLM generation, tax and currency conversion are excluded. Inputs above the limit produce an error rather than being truncated. Rates are public standard API prices, not subscription fees.
Calculator bounds: 1 million documents, 1 million tokens per document, 32,000 tokens per chunk and 1 trillion initially processed tokens. These are not provider request or batch limits. Costs are accumulated in integer units and displayed to four USD decimal places. A displayed $0.0000 can still be positive before rounding.
Official model documentation, prices and input limits were checked on 2026-11-05. The chunk formula is derived from this tool's fixed-window assumptions. No paid API requests, billing verification or retrieval-quality tests were performed. Rates are normally rechecked monthly.
Operator: kim hyun · NanoBook · Report an error
Revision history · First published 2026-11-05. Includes standard official rates for three models, custom pricing, overlap comparison and monthly re-embedding estimates.
2026-11-05 · Added synthetic document-length comparisons, a per-document calculation method and reproducible CSV files. Standard prices and model input limits were rechecked; no paid API requests were made.