Embedding Cost Calculator
Calculate embedding API costs and storage requirements across OpenAI, Cohere, and self-hosted models.
About this calculator
Building a vector search or RAG system means embedding your whole document corpus once and then keeping it fresh as content changes, and this calculator prices both halves of that. Initial cost multiplies total tokens (document count times average tokens per document) by the selected model's per-million-token price — OpenAI's text-embedding-3-small is dramatically cheaper per token than 3-large or Cohere's embed-v3, which is why model choice matters more here than almost anywhere else in an AI budget. Choosing the self-hosted option (e5-large) switches the calculation entirely: instead of a token price, cost is derived from an assumed throughput of 2,000 documents per minute on an A100 GPU billed at $1/hour, so that branch estimates compute time rather than metered API spend.
Ongoing cost assumes roughly 10% of your corpus changes between each update batch, and multiplies that re-embedding cost by how many batches you run per month; the annual cost total is simply the one-time initial cost plus twelve months of that recurring update cost. Storage is computed independently from cost: each embedding vector is stored as one 4-byte float32 per dimension, so a 1536-dimension OpenAI vector takes about 6KB, and that per-vector size times your document count gives total storage in MB and GB — a number worth checking against your vector database's pricing tier before committing to a model. The dimensions field is informational for the API-priced models (their output dimension is generally fixed or configurable per model) but is forced to 768 for the self-hosted option regardless of what you enter, since e5-large's dimensionality is fixed.
Inputs
Results
Initial embedding cost ($)
$1.00
Annual embedding cost ($)
$3.40
How to Use This Calculator
- Enter the Number of Documents (or text chunks) you need to embed — e.g., 50,000 for a mid-size knowledge base.
- Set the average Tokens per Document (a typical page is ~500 tokens) and select the Embedding Model.
- Review Initial Embedding Cost for the one-time indexing expense and Vector Storage in MB to size your database.
- Enter Batch Updates per Month to account for re-embedding as your corpus changes.
- Check Annual Embedding Cost and Cost per 1K Docs to compare self-hosted vs. API-based embedding strategies.
How the result changes with Number of documents
| Number of documents | Initial embedding cost ($) | Annual embedding cost ($) |
|---|---|---|
| 25,000 | $0.50 | $1.70 |
| 37,500 | $0.75 | $2.55 |
| 75,000 | $1.50 | $5.10 |
| 125,000 | $2.50 | $8.50 |
What each input means
- Number of documents
- Total documents or text chunks to embed.
- Avg tokens per document
- Average token count per document. A typical page is ~500 tokens.
- Embedding model
- Select the embedding model
- Vector dimensions
- Output vector dimensions. Affects storage size. 3-small: 1536, 3-large: 3072, ada-002: 1536, Cohere: 1024.
- Batch updates per month
- Monthly re-embedding batches for corpus updates (~10% of docs per batch).
What each result means
- Initial embedding cost ($)
- One-time cost to embed your full document corpus.
- Monthly update cost ($)
- Cost for monthly re-embedding of updated documents.
- Annual embedding cost ($)
- Initial embedding + 12 months of updates.
- Total tokens (millions)
- Total tokens in the document corpus.
- Vector storage (MB)
- Storage required for all vectors in float32 format.
- Cost per 1K docs ($)
- Embedding cost per 1,000 documents.
- Vector count
- Total number of embedding vectors.
- Effective dimensions
- Dimensions per vector (may differ by model).
How this is calculated
Worked example, using the default values
- Identify Input Parameters4 parametersNumber of documents = 50000, Avg tokens per document = 1000, Embedding model = 0, Vector dimensions = 1536 = 5 input(s) provided
- Calculate Initial embedding costInitial embedding cost1 = $1
- Calculate Annual embedding costAnnual embedding cost = initialCost + monthlyUpdateCost * 123.4 = $3.4
- Calculate Monthly update costMonthly update cost = updateCost * batchUpdatesPerMonth0.2 = $0.2
- Calculate Total tokensTotal tokens = totalTokens / 1_000_00050 = 50
Engine last updated . Checked against 3 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.
Frequently Asked Questions
Why doesn't changing Vector Dimensions affect the cost for API-based models?
Cost for the API-priced models (text-embedding-3-small/large, ada-002, Cohere embed-v3) is computed purely from total tokens times the model's per-million-token price — the dimensions field never enters that formula. It only feeds the storage calculation (vectorDimensions times 4 bytes times document count), so changing it changes storageMB and totalStorageGB but leaves initialCost, monthlyUpdateCost, and annualCost unchanged.
Why is my Vector Dimensions input ignored when I select the self-hosted model?
Selecting the self-hosted e5-large option forces effectiveDims to a fixed 768 regardless of what you typed into the dimensions field, since e5-large's output dimensionality isn't configurable the way some API models' embeddings are. Both the storage calculation and the vectorDimensions output use that forced 768 value, so any number you enter there is silently overridden for this model choice.
How is the monthly update cost estimated, and can I control it?
The calculator assumes a fixed 10% of your corpus changes between each update batch — that's not adjustable — and re-embeds that 10% at the same per-token or per-GPU-hour rate as the initial embedding, then multiplies by however many Batch Updates per Month you set. Raising Batch Updates per Month scales monthlyUpdateCost linearly since each batch re-embeds the same fixed 10% slice again.
What's the difference between Initial Cost and Annual Cost?
Initial Cost is the one-time expense of embedding your entire document corpus for the first time, computed once from total tokens. Annual Cost adds twelve months of the recurring update cost on top of that one-time figure (initialCost + monthlyUpdateCost × 12), giving a full first-year total rather than just the upfront indexing bill — useful for budgeting a corpus that keeps changing after the initial build.
Related Calculators
The questions that sit next to this one — chosen by subject, including calculators filed under a different category.
RAG System Cost Calculator
Estimate vector DB storage, embedding, and query costs for a Retrieval-Augmented Generation system.
Ai ToolsLLM Token Calculator
Estimate token count and API cost from text length across different tokenizers (GPT-4, Claude, Llama).
Ai ToolsFine-Tuning Cost Calculator
Estimate LLM fine-tuning costs from dataset size, epochs, and model choice for OpenAI API and self-hosted options.
More in Technology & Computing.