Embedding Cost Calculator
Calculate embedding API costs for RAG applications.
Embedding Configuration
Total Yearly Cost
$0.15
Using text-embedding-3-small
Cost Breakdown
Token Statistics
Storage Estimates
Model Comparison (Indexing)
What the Embedding Cost Calculator Does
The embedding cost calculator estimates the full lifetime cost of turning your documents and search queries into vector embeddings for a retrieval-augmented generation (RAG) pipeline or semantic search system. Embedding APIs charge by the token, so the bill depends on how much text you push through the model rather than how many API calls you make. This tool turns raw inputs - document count, average document length, daily query volume, query length, the embedding model you pick, and how often you re-index - into concrete dollar figures for indexing, querying, re-indexing, and vector database storage.
Three cost buckets dominate any embedding budget. The first is initial indexing, a one-time expense to embed every document in your corpus. The second is query embedding, an ongoing cost because every user search must be embedded before it can be compared against the index. The third is re-indexing, which repeats the indexing cost on a schedule whenever your model or content changes. On top of those API charges sits vector storage, billed by your database provider based on how many floating-point dimensions each vector holds.
The calculator assumes a common tokenization heuristic of roughly four characters per token, which is accurate enough for English prose to produce reliable estimates. It also bakes in published per-million-token prices for popular providers, so you can compare OpenAI text-embedding-3-small, text-embedding-3-large, and ada-002 against Cohere and Voyage models side by side. Because embedding prices vary by more than 6x across these models, the difference between picking text-embedding-3-small at $0.02 per million tokens and text-embedding-3-large at $0.13 per million tokens can dominate your entire AI budget at scale. Use this embedding API pricing estimator before you commit to a vendor, so you can right-size your model choice and avoid surprises when your corpus grows from a thousand documents to a million.
How Embedding Costs Are Calculated
The calculator follows the exact sequence your embedding bill would. First it converts characters to tokens using the four-characters-per-token rule, rounding up because providers never bill fractional tokens. Tokens per document equal the ceiling of average document length divided by four, and tokens per query follow the same formula. Multiplying tokens per document by your document count gives total document tokens, the figure that drives indexing cost.
Indexing cost is total document tokens divided by one million, multiplied by the model's price per million tokens. Query cost is computed daily - queries per day times tokens per query, divided by one million, times the price - and then scaled to monthly (times 30) and yearly (times 365) figures. Re-indexing cost takes the one-time indexing cost and multiplies it by a frequency factor: 0 for never, 1 for yearly, 4 for quarterly, 12 for monthly, and 52 for weekly. The total yearly cost sums indexing, yearly query cost, and yearly re-indexing cost.
Storage is estimated separately. Each embedding is stored as 32-bit floats, so bytes per document equal the model's dimension count times four. Total storage is documents times that per-document size, converted to gigabytes by dividing by 1024 cubed, then multiplied by an assumed managed vector database rate of about $70 per gigabyte per month. The model comparison panel re-runs the indexing and monthly query math for every supported model so you can see the price spread at a glance.
Total Yearly Embedding Cost
Where:
- D= Number of documents to index
- L= Average document length in characters
- Lq= Average query length in characters
- Q= Queries per day
- P= Model price per 1,000,000 tokens (USD)
- R= Re-index frequency factor (0, 1, 4, 12, or 52)
Embedding Model Pricing and Dimensions
The cost of an embedding API is driven by two numbers: the price per million tokens and the vector dimension count. Price controls your indexing and query bills, while dimensions control your storage footprint and, indirectly, your similarity search latency. The table below shows the published rates and dimensions this calculator uses for each supported model.
| Model | Price / 1M tokens | Dimensions |
|---|---|---|
| OpenAI text-embedding-3-small | $0.02 | 1536 |
| OpenAI text-embedding-3-large | $0.13 | 3072 |
| OpenAI text-embedding-ada-002 | $0.10 | 1536 |
| Cohere embed-english-v3 | $0.10 | 1024 |
| Cohere embed-multilingual-v3 | $0.10 | 1024 |
| Voyage-2 | $0.10 | 1024 |
| Voyage-large-2 | $0.12 | 1536 |
The standout value is OpenAI text-embedding-3-small at just $0.02 per million tokens, which is five times cheaper than ada-002 while producing equally usable 1536-dimension vectors. The premium text-embedding-3-large doubles dimensions to 3072 and charges $0.13 per million tokens; it earns the higher retrieval accuracy on hard benchmarks but doubles your storage cost too. Cohere and Voyage models cluster around $0.10 to $0.12 with compact 1024-dimension vectors, which keeps storage lean and is attractive for multilingual corpora or specialized retrieval where their accuracy shines. When the embedding cost calculator shows two models with the same price, the one with fewer dimensions wins on storage, so a 1024-dimension model can be the better total-cost choice even at an identical per-token rate.
Vector Storage and Scaling Behavior
Embedding APIs are usually the small line item; the recurring vector database bill is what surprises teams as they scale. Each vector occupies its dimension count times four bytes in full fp32 precision. A 1536-dimension embedding is therefore 6,144 bytes, while a 3072-dimension embedding from text-embedding-3-large is 12,288 bytes - exactly double. Multiply by your document count and you have your raw index size before any database overhead, replicas, or metadata.
The calculator applies a managed-pricing assumption of roughly $70 per gigabyte per month, in line with pod-based vector database tiers. At a thousand 1536-dimension vectors the storage is trivial, but the relationship is linear in both document count and dimensions, so a corpus of ten million documents in 3072 dimensions consumes about 120 gigabytes and would cost thousands of dollars per month to host. This is why dimension reduction techniques matter. OpenAI's v3 models support shortening output dimensions, and quantizing vectors from fp32 to int8 cuts storage roughly fourfold with minimal recall loss.
Indexing cost is one-time, but re-indexing turns it into a recurring expense whenever you change models, update chunking, or refresh stale content. Choosing weekly re-indexing multiplies your indexing bill by 52 across a year, which can quietly dwarf both query and storage costs for a large static corpus. The smart pattern is to re-index only the documents that actually changed rather than the whole corpus, and to schedule full re-indexing only when you migrate to a new embedding model. Run the scenarios in this vector database cost estimator before locking in a re-index cadence so the schedule reflects how often your content genuinely changes.
Strategies to Reduce Embedding and RAG Costs
The cheapest token is the one you never embed. Deduplicating near-identical documents, trimming boilerplate headers and footers, and excluding low-value pages from your index shrinks total document tokens directly, and indexing cost falls one-to-one with it. Smart chunking helps too: oversized chunks waste tokens on context the retriever never needs, while overly tiny chunks balloon the vector count and inflate storage.
On the query side, caching is the highest-leverage optimization. If a meaningful fraction of user searches repeat, caching the query embedding eliminates that token cost entirely. Because query cost scales with daily volume times 365, even a 30 percent cache hit rate trims a third off your yearly query bill. Batching multiple texts into a single API request reduces overhead and can improve throughput, though it does not change the per-token price.
Model selection remains the biggest lever. Defaulting to text-embedding-3-small at $0.02 per million tokens instead of ada-002 at $0.10 cuts both indexing and query costs by 80 percent for the same dimension count. If your retrieval quality holds, that is free money. Reserve text-embedding-3-large for the subset of high-stakes queries where its accuracy justifies the 6.5x price premium, or use it only at index time while embedding cheaper queries with a smaller model. Finally, watch storage: quantization and dimension truncation can deliver the steepest savings once your corpus grows past a few million vectors, because storage is billed every month forever while indexing is paid once. Combining a frugal model, query caching, incremental re-indexing, and quantized storage typically reduces total RAG cost by more than half versus a naive setup.
Worked Examples
Small RAG knowledge base on text-embedding-3-small
Problem:
Index 1,000 documents averaging 2,000 characters each, serve 100 queries per day at 100 characters each, re-index monthly, using OpenAI text-embedding-3-small at $0.02 per 1M tokens.
Solution Steps:
- 1Tokens per document = ceil(2000 / 4) = 500; total document tokens = 1000 x 500 = 500,000.
- 2Indexing cost = (500,000 / 1,000,000) x $0.02 = 0.5 x $0.02 = $0.01.
- 3Tokens per query = ceil(100 / 4) = 25; daily query tokens = 100 x 25 = 2,500; daily query cost = (2,500 / 1,000,000) x $0.02 = $0.00005; yearly query cost = $0.00005 x 365 = $0.018.
- 4Yearly re-index cost = $0.01 x 12 = $0.12; total yearly = $0.01 + $0.018 + $0.12 = $0.148.
Result:
Total yearly cost is about $0.15 - embedding a small knowledge base is almost free at text-embedding-3-small prices.
Same workload on the premium text-embedding-3-large
Problem:
Keep the same 1,000 documents and 100 daily queries but switch to OpenAI text-embedding-3-large at $0.13 per 1M tokens with monthly re-indexing.
Solution Steps:
- 1Total document tokens are unchanged at 500,000, so indexing cost = (500,000 / 1,000,000) x $0.13 = 0.5 x $0.13 = $0.065.
- 2Daily query tokens stay at 2,500; yearly query cost = (2,500 / 1,000,000) x $0.13 x 365 = $0.000325 x 365 = $0.1186.
- 3Yearly re-index cost = $0.065 x 12 = $0.78; total yearly = $0.065 + $0.1186 + $0.78 = $0.9636.
- 4Storage uses 3072 dimensions: 3072 x 4 = 12,288 bytes per doc x 1000 = 12,288,000 bytes = 0.01144 GB; monthly storage = 0.01144 x $70 = $0.80.
Result:
Total yearly API cost rises to about $0.96, roughly 6.5x the small model, plus about $0.80 per month in storage from the doubled 3072-dimension vectors.
Scaling to 1 million documents
Problem:
Index 1,000,000 documents averaging 2,000 characters on text-embedding-3-small, with 10,000 queries per day at 100 characters and yearly re-indexing.
Solution Steps:
- 1Total document tokens = 1,000,000 x ceil(2000/4) = 1,000,000 x 500 = 500,000,000; indexing cost = (500,000,000 / 1,000,000) x $0.02 = 500 x $0.02 = $10.00.
- 2Daily query tokens = 10,000 x 25 = 250,000; daily query cost = (250,000 / 1,000,000) x $0.02 = $0.005; yearly query cost = $0.005 x 365 = $1.825.
- 3Yearly re-index cost (yearly factor = 1) = $10.00 x 1 = $10.00; total yearly API = $10.00 + $1.825 + $10.00 = $21.825.
- 4Storage = 1,000,000 x 1536 x 4 = 6,144,000,000 bytes = 5.722 GB; monthly storage = 5.722 x $70 = $400.55.
Result:
API cost is only about $21.83 per year, but vector storage dominates at roughly $400 per month - proving storage, not embedding, is the real cost at scale.
Tips & Best Practices
- ✓Default to text-embedding-3-small at $0.02 per million tokens unless retrieval accuracy demands the large model.
- ✓Cache embeddings for repeated queries - even a 30% hit rate trims a third off your yearly query bill.
- ✓Re-index only the documents that changed instead of the whole corpus to avoid paying the full indexing cost repeatedly.
- ✓Deduplicate and trim boilerplate before indexing, because indexing cost falls one-to-one with total document tokens.
- ✓Quantize vectors from fp32 to int8 to cut storage roughly fourfold once your index passes a few million vectors.
- ✓Compare same-price models by dimension count - a 1024-dimension model stores cheaper than a 1536-dimension one at the same per-token price.
- ✓Batch multiple texts per API request to reduce overhead and improve throughput during large indexing jobs.
- ✓Estimate vector storage early, since at $70 per GB per month it often outgrows the one-time embedding cost.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-05
Help us improve!
How would you rate the Embedding Cost Calculator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Standard Mathematical References
by Various