🧬 Embedding Cost Calculator

Estimate what it costs to embed your document or RAG corpus across OpenAI, Cohere, Google, and open-source models — plus the resulting vector storage footprint.

🧬 Corpus Details
*Open-source models have no per-token API charge, but you still pay for GPU/CPU infrastructure to run them.
Used only for the vector storage size estimate below.
📈 Embedding Cost & Storage
Total Embedding Cost
Estimated Vector Storage
Total Tokens Processed
Cost per 1,000 Chunks
Storage (MB)
Storage (GB)

📊 Cost by Embedding Model (same corpus)

Total Cost by Model
Storage Size by Dimension
⚠️ Prices updated June 2026 — verify current rates on each provider's pricing page. Storage estimate assumes 4 bytes per dimension (float32) and does not include vector database index overhead, metadata, or replication, which typically add 20-50% more on top of raw vector size.
📊

Enter your details and click Calculate to see results

Guide

About the Embedding Cost Calculator

Before a retrieval-augmented generation (RAG) system, semantic search index, or recommendation engine can do anything useful, every chunk of your corpus has to be converted into a numeric embedding vector — and that conversion is billed per token just like a chat completion. This embedding cost calculator takes the size of your corpus (number of chunks and average tokens per chunk) and computes the total cost to embed it across five common providers, from OpenAI's inexpensive text-embedding-3-small to Google's gemini-embedding and self-hosted open-source alternatives, alongside an estimate of how much disk space the resulting vectors will occupy.

How It Works

The calculator multiplies your number of chunks by the average tokens per chunk to get total tokens processed, then applies the selected embedding model's price per 1 million tokens to compute total embedding cost, plus a normalized cost per 1,000 chunks so you can compare corpora of different sizes on equal footing. Separately, it estimates vector storage size by multiplying chunk count by embedding dimension by 4 bytes (since embeddings are typically stored as 32-bit floats), converting the result into megabytes and gigabytes. A bar chart compares total cost across all five models for the same corpus, and a second chart shows how storage size scales with embedding dimension.

Why It Matters

Embedding cost is usually a one-time (or periodic, if your corpus updates) expense, but it can still add up meaningfully for corpora in the tens of millions of tokens, and the storage footprint has an ongoing cost through your vector database bill. Higher-dimension embeddings from premium models often improve retrieval quality, but the tradeoff is both a higher per-token embedding price and roughly proportionally larger storage — this calculator makes that tradeoff visible before you commit to a model and dimension for a corpus that may be expensive to re-embed later.

Tips for Accurate Results

  • Measure your actual average tokens per chunk from a representative sample rather than guessing — chunking strategy (by sentence, paragraph, or fixed token count) significantly affects this number.
  • Remember that switching embedding models or dimensions later generally requires re-embedding your entire corpus, since vectors from different models aren't compatible with each other.
  • Add 20-50% on top of the raw storage estimate here to account for vector database index structures, metadata fields, and any replication for high availability.
  • For open-source self-hosted models, budget separately for GPU or CPU compute time — the $0 API cost here does not include infrastructure.
  • Re-embedding cost matters for corpora that update frequently; if your documents change often, factor in the ongoing cost of re-embedding changed chunks, not just the initial one-time cost.
About

Understanding Embeddings & Vector Storage

🧬

What is an Embedding?

An embedding is a fixed-length list of numbers (a vector) that represents the meaning of a piece of text, so that semantically similar text produces vectors that are close together — the foundation of semantic search and RAG retrieval.

📐

Dimension Tradeoffs

Higher-dimension embeddings (1536, 3072) can capture more semantic nuance but cost more to generate and store than smaller ones (384, 768). Many production RAG systems use 768-1536 dimensions as a practical middle ground.

💾

Storage Grows Linearly

Vector storage size scales directly with chunk count and dimension — doubling either one roughly doubles your storage footprint, which is why chunking strategy matters as much as model choice for cost planning.

FAQ

Frequently Asked Questions

Common questions about embedding costs

How much does it cost to embed a document corpus?
Cost depends on the total tokens in your corpus (chunks × average tokens per chunk) and the embedding model's price per 1M tokens. For example, OpenAI's text-embedding-3-small at $0.02 per 1M tokens costs about $0.02 to embed 1 million tokens, while text-embedding-3-large at $0.13 per 1M costs roughly 6.5x more for the same corpus.
How is vector storage size calculated?
Each embedding vector stores one 32-bit (4-byte) floating point number per dimension. Storage size is approximately chunks × dimension × 4 bytes. A 1,536-dimension embedding for 100,000 chunks needs roughly 100,000 × 1,536 × 4 = 614,400,000 bytes, or about 586 MB, before any index overhead.
Does a higher embedding dimension mean better search quality?
Generally yes, up to a point — higher-dimension embeddings can capture more nuance, but the improvement flattens out and storage/compute cost keeps rising linearly with dimension. Many teams find 768 or 1536 dimensions is a good balance between retrieval quality and infrastructure cost for most RAG applications.
Are open-source embedding models actually free?
There's no per-token API charge for self-hosted open-source models like BGE or E5, but you still pay for the GPU or CPU infrastructure to run them, plus engineering time for deployment and maintenance. Whether that's cheaper than a hosted API depends heavily on your volume and whether you already have spare GPU capacity.
Do I need to re-embed my whole corpus if I switch models?
Yes — embeddings from different models (and often different dimensions) are not directly comparable or interchangeable in the same vector index. Switching embedding models means re-processing your entire corpus and rebuilding your vector store, which is worth factoring into the true cost of a model change.

Related Calculators

Explore other AI & tech tools