Home / Guides / Embedding cost calculator: estimate corpus spend
Embedding cost calculator: estimate corpus spend
Estimate how much it costs to embed a knowledge base and keep query embeddings running: tokens × $/1M, batch vs standard, one-time index plus amortized refresh.
What an embedding cost calculator actually estimates
An embedding cost calculator answers a planning question: for this corpus size, this embed model rate, this refresh policy, and this query volume, what do you pay to build and keep the vector index, and what do query embeds add each month?
Teams undercount when they guess from page counts, forget chunk overlap, or treat a one-time index job as free forever. Others overcount by re-embedding the whole store on every tiny edit. The useful output is three numbers: one-time (or per refresh) index cost, amortized monthly index cost, and monthly query-embedding cost.
TokenCalculator’s embedding cost calculator estimates index cost from corpus tokens × your embed $/1M (editable reference preset; verify on the provider pricing page), optional batch discount, amortized monthly index from re-embed cadence, monthly query embed cost, and side-by-side model compare when you paste two rates. Pair it with the RAG cost calculator, tokenizer, and tokenizer comparison. Do not treat presets as live catalog-verified prices. Rates change.
How embedding API pricing is calculated
Most embedding APIs bill input tokens only for the text you send to the embed endpoint. Cost ≈ (tokens embedded / 1,000,000) × price per million tokens. Corpus tokens are cleaned chunk text actually sent (after overlap). Query embeds are short question tokens per retrieval. Batch jobs use the same tokens, often at a lower $/1M if the provider offers Batch.
Dimensions are usually a quality and storage choice, not a separate API line item for the embed call itself. Always verify on that provider’s pricing page.
How to use the embedding cost calculator
Size the corpus in tokens (not PDF pages): enter total tokens, docs × average, or paste sample text and scale. Paste embed $/1M from your provider for the SKU you ship. Toggle batch when the index job is offline and paste the batch rate if different. Set re-embed cadence and monthly query volume if you embed questions.
Read once, amortized monthly, and query monthly. Then open the RAG cost calculator if generation will dwarf embeds once traffic grows. Prefer incremental updates over nightly full rebuilds of a large store.
Worked planning example (no invented unit prices)
Suppose you plan to embed about 10 million tokens of cleaned handbook chunks, fully re-embed about once per month, and expect tens of thousands of short query embeds.
Enter corpus tokens = 10,000,000. Paste your real embed $/1M from the provider pricing page. If the index job is offline, enable Batch and paste the batch rate if different. Set re-embeds per month = 1. Enter monthly queries and typical query tokens. Read index once, index amortized, query embeds monthly, and total monthly embed API. Then compare a smaller vs larger embed model by pasting both rates after retrieval evals.
Common mistakes
Avoid these embedding cost-estimation mistakes.
- Using page or word counts as if they were API tokens
- Inventing live $/1M instead of pasting from the provider pricing page
- Ignoring Batch for offline index jobs that qualify
- Full re-embed every night when only a slice changed
- Forgetting query embeds at extreme QPS
- Mixing generation and embedding into one unlabeled AI API number
- Assuming dimensions are billed like output tokens
- Skipping overlap when estimating corpus tokens
Frequently asked questions
- What is an embedding cost calculator?
- A tool that estimates spend to embed a corpus (and optional query strings) from token volume and your embed price per million tokens, including refresh cadence and optional batch rates. TokenCalculator’s version is at /tools/embedding-cost.
- How is embedding API pricing calculated?
- Usually (tokens sent to the embed endpoint / 1,000,000) × $/1M for that SKU. Confirm Batch, volume tiers, or regional rates on the provider pricing page.
- How much does text-embedding-3-small cost?
- Rates change. Copy the current figure from OpenAI’s pricing page into the calculator’s editable preset. Do not treat old blog numbers as live.
- Do embeddings charge for output tokens?
- Typically no. You pay for input tokens of the text being embedded. Verify the SKU docs for your provider.
- How do I estimate tokens to embed a document set?
- Clean and chunk as in production, count with a tokenizer, then sum. Or use docs × average tokens for a planning ballpark.
- Does the Batch API reduce embedding cost?
- Often yes for offline jobs when the provider offers a Batch discount on embeddings. Interactive query embeds usually stay standard.
- How often should I re-embed my corpus?
- When content or the embed model changes enough to hurt retrieval. Prefer incremental updates over nightly full rebuilds.
- Is embedding cost or generation cost higher in RAG?
- For busy query paths, generation usually dominates because retrieved packs re-bill as LLM input every time. Compare in /tools/rag-cost.
- Are embedding dimensions billed separately?
- Usually dimensions affect storage and quality, not a separate per-dimension API fee on the embed call. Confirm on your provider’s pricing page.
- Does overlap double my embed bill?
- It can nearly double indexed tokens if overlap is large vs chunk size. Measure tokens actually embedded.
Try it in TokenCalculator
Enter corpus tokens (or docs × average), paste your embed $/1M from the provider pricing page, toggle batch if you use it, set re-embed cadence and monthly query volume.
Open embedding cost calculator · Open cost calculator · Estimate API spend · All guides
Related tools
Related guides
OpenAI embedding pricing: text-embedding-3 planning · Estimate embedding tokens · Batch embedding cost savings · Embedding reindex cost: how often to re-embed · Embedding vs generation cost in RAG
Sources and references
Official documentation used for definitions, counting methods, or rate cards. Always confirm critical budgets on the provider page.