RAG Embedding Cost Estimator
Enter document size, chunking parameters, an embedding model, and expected query volume to estimate a RAG system's indexing embedding cost, vector storage size, and ongoing query cost, comparing the annual total across popular embedding models.
FreeOnline Tool
Loading…
How to Use
- Under "Document Configuration", enter the total word count, choose the language (Chinese converts at ~1.5 tokens per character, English at ~1.3 tokens per word), and set the chunk size and chunk overlap (in tokens).
- Under "Embedding Model Selection", choose a model: OpenAI text-embedding-3-small/large, BGE-large (local), GTE-large (local), or "Custom" to manually enter a price ($/1M tokens) and vector dimension.
- Under "Query Estimation", enter the average daily query count, input tokens per query, and chunks retrieved per query, used to estimate ongoing query costs.
- The page automatically calculates and displays the "Indexing Phase" (total tokens, total chunks, one-time embedding cost, vector storage size) and "Query Phase" (average daily/monthly query cost, and annual total cost = one-time indexing cost + 365 days of query cost).
- The "Model Comparison" table below automatically lists indexing cost, average daily query cost, and annual total cost for OpenAI small/large, BGE-large, and GTE-large under the same document and query configuration — local models (BGE/GTE) are tagged "Local" to indicate no per-token API billing. Click "Load Sample Data" to fill in a sample: a 100,000-character Chinese document + OpenAI small model + 100 average daily queries.
Features
- Estimates total document token count using either a Chinese (~1.5 tokens per character) or English (~1.3 tokens per word) conversion rule, then computes total chunk count from a customizable chunk size and overlap.
- Includes two pay-per-use cloud models (OpenAI text-embedding-3-small/large) and two locally-deployed models (BGE-large, GTE-large, priced at zero API cost), plus a "Custom" option for any model with manually entered price and dimension.
- Indexing-phase estimate: total tokens, total chunks, one-time embedding cost in USD, and vector storage footprint (estimated from dimension and chunk count, auto-converted to MB/GB).
- Query-phase estimate: derives average daily/monthly query cost from daily query count, input tokens per query, and chunks retrieved per query, then rolls it up into an "annual total cost" (one-time indexing cost plus 365 days of query cost).
- Model comparison table: compares indexing cost, average daily query cost, and annual total cost side by side for OpenAI small/large, BGE-large, and GTE-large under the same document size and query volume, with local models specially tagged.
Use Cases
Budgeting embedding cost when kicking off a RAG project
Before building an enterprise knowledge-base RAG system, a team enters expected document size and query volume to quickly estimate the annual cost across embedding models and feed it into the project budget.
Weighing cloud models against local models on cost
A tech lead compares OpenAI's cloud embedding pricing against BGE/GTE local open-source models, weighing "pay-per-use but no ops overhead" against "self-hosted GPU but near-zero marginal cost".
Evaluating how chunking parameters affect indexing cost
An engineer adjusts chunk size and overlap ratio and watches how total chunk count and indexing cost respond, finding a balance between retrieval quality and embedding spend.
Projecting cost growth as query volume increases
A product manager evaluating expected user growth after launching a RAG feature adjusts the daily query count to see how query cost scales linearly, informing budget planning ahead of scaling.
FAQ
How is the Chinese/English token conversion ratio determined?
The tool uses empirical approximations: roughly 1.5 tokens per Chinese character, and roughly 1.3 tokens per English word — common rule-of-thumb ratios for how mainstream tokenizers (e.g. tiktoken) handle Chinese and English text. Actual token counts vary by tokenizer and content, so treat this as an order-of-magnitude reference.
Why does the cost for local models (BGE-large/GTE-large) show as zero or very low?
Locally-deployed models aren't billed per token to an API vendor, so the tool counts their embedding call cost as zero (not including your own GPU/server hardware and electricity costs). This is why local models' indexing and query costs are much lower than cloud pay-per-use models in the comparison table — the "Local" tag is a reminder that this isn't truly free, just free of per-token API charges.
How is vector storage size estimated?
It's total chunk count multiplied by the selected model's vector dimension, then estimated assuming 4 bytes per dimension (float32). Real storage engines (quantization, index overhead, etc.) will vary — this figure is a reference estimate of the raw vector data only.
What exactly does "annual total cost" include?
It equals the one-time indexing-phase embedding cost plus (average daily query cost × 365 days) — i.e. the total yearly spend assuming the document is indexed once and then queries continue at the average daily rate for a year. If your documents are re-indexed frequently, actual costs will be higher.
What's the price unit for a custom model?
The custom price field is in USD per million tokens ($/1M tokens) — convert your embedding service's official pricing unit into that format. You'll also need to enter the model's vector dimension so storage size can be estimated.