Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path
Embedding Cost Calculator
Set your corpus (documents × average tokens), chunking (size + overlap), embedding model and vector dtype — and get the numbers that decide RAG budgets: one-time indexing cost, vector count, storage footprint from FP32 down to binary, and the monthly bill for query embeddings.
Embedding a corpus is usually cheap; storing and serving the vectors is where the money and memory go. This calculator prices the one-time job of embedding your documents, counts the vectors that produces, sizes their raw storage at the precision you choose, and prices the query embeddings you will create every month.
What it computes
tokens = documents × avg tokens per doc × (1 + overlap% / 100)
vectors = ceil(tokens ÷ chunk size)
index $ = tokens / 1,000,000 × model price per 1M tokens
storage = vectors × dimensions × bytes per value ÷ 2^30
query $ = queries per day × 30 × 25 tokens / 1,000,000 × model price
- Model: three built-in options. Small is $0.02 per 1M tokens with 1,536 dimensions (for example text-embedding-3-small), large is $0.13 with 3,072 (for example text-embedding-3-large), and a self-hosted open model is $0.005 with 768.
- Overlap: the share of extra tokens embedded because neighboring chunks repeat each other's edges.
- Vector dtype: 4 bytes per value for FP32, 2 for FP16, 1 for INT8 and one bit (0.125 bytes) for binary.
- Queries: each one is assumed to be 25 tokens, embedded with the same model.
Storage counts raw vectors only and is reported in binary gigabytes of 2^30 bytes.
A worked example
The defaults are the small model, FP32 vectors, 100K documents of 800 tokens, 512-token chunks with 15% overlap, and 10K queries a day.
- Tokens:
100,000 × 800 × 1.15 = 92,000,000, shown as 92M tokens incl. overlap. - Vectors:
92,000,000 ÷ 512 = 179,687.5, rounded up to 179,688. - Index cost:
92 × $0.02= $1.84, paid once. - Storage:
179,688 × 1,536 × 4 = 1,104,003,072bytes, shown as 1.03 GB (1.10 GB in decimal units). - Queries:
10,000 × 30 × 25 = 7,500,000tokens a month, and7.5 × $0.02= $0.150/mo.
The same 179,688 vectors at each precision:
| Dtype | Bytes per vector | Storage |
|---|---|---|
| FP32 | 6,144 | 1.03 GB |
| FP16 | 3,072 | 0.51 GB |
| INT8 | 1,536 | 0.26 GB |
| Binary | 192 | 0.03 GB |
The large model raises the index bill 6.5 times, to $11.96, and doubles storage to 2.06 GB because every vector has twice the dimensions. Neither API bill is large here. The ongoing cost is the memory and the vector database that hold the result.
Assumptions and limits
- Overlap as a flat surcharge. Tokens are inflated by the overlap percentage. A sliding window whose step is (1 − overlap) × chunk size re-embeds closer to 1 ÷ (1 − overlap): 1.18× at 15% rather than 1.15×, and 2× rather than 1.5× at 50%.
- One continuous corpus. Vectors are counted as if every document were concatenated. Chunking each document separately rounds each one up: 800-token documents in 512-token chunks make 2 chunks apiece, 200,000 vectors rather than 179,688.
- Raw vectors only. Index structures such as HNSW graphs, metadata, stored chunk text, replicas and backups all add to the storage figure.
- Built-in prices. The three model prices are fixed in the tool and may differ from current list prices. A self-hosted model really costs hardware time, not a per-token fee.
- Fixed query length and a 30-day month. Re-embedding after a model change or document edits is not included.
How to use the result
- Budget for re-embedding, not just embedding. Changing models means paying the index cost again for the whole corpus, since vectors from two different models cannot share one index.
- Size memory from storage, then add the index. Approximate nearest neighbor indexes usually keep vectors in RAM, so the storage figure plus index overhead is a floor for the machine or the managed tier.
- Choose precision with an evaluation, not a default. Measure recall on your own queries at each dtype, and consider a binary or INT8 shortlist rescored with full-precision vectors.
- Chunk size trades vectors for granularity. Halving chunks to 256 tokens doubles the vector count and storage at the same index cost, because the tokens embedded do not change.
How it works
- Index cost = corpus tokens (incl. overlap) ÷ 1M × model price.
- Vectors = corpus tokens ÷ chunk size; storage = vectors × dims × dtype bytes.
- Storage is raw vectors in binary GB; index structures, metadata and text are extra.
- Query spend recurs: queries/day × 25 tokens × 30 days.
Frequently asked questions
How much does it cost to embed documents for RAG?
Multiply the tokens you embed by the model price per million tokens. The defaults embed 100,000 documents of 800 tokens with 15% chunk overlap, 92 million tokens, which costs $1.84 at $0.02 per million and $11.96 at $0.13 per million. Embedding is a one-time charge per corpus version, so for most projects the larger costs are the vector database that stores the result and the repeat bill whenever you re-embed after changing the model or the chunking.
How much storage do embeddings need?
Multiply the number of vectors by the dimensions and by the bytes per value. A 1,536-dimension FP32 vector is 1,536 times 4, or 6,144 bytes, so the default 179,688 vectors take 1,104,003,072 bytes, shown as 1.03 GB in binary units. That figure is raw vectors only. The index structure, metadata, stored chunk text and replicas add to it, and approximate nearest neighbor search usually wants the working set in memory.
How does chunk size change embedding cost?
Chunk size changes the number of vectors, not the number of tokens you pay to embed. Halving the default chunk from 512 to 256 tokens doubles the vectors from 179,688 to 359,375 and storage from 1.03 GB to 2.06 GB, while the one-time embedding cost stays $1.84. Overlap is what raises the embedding bill, because the overlapping tokens are embedded again, and it adds vectors as well.
Should I store embeddings as FP32, FP16, INT8 or binary?
Lower precision cuts memory in proportion: FP16 is half of FP32, INT8 a quarter and binary, at one bit per dimension, a thirty-second. For the default corpus that is 1.03, 0.51, 0.26 and 0.03 GB. How much retrieval quality each step costs depends on the model and the data, so measure recall on your own queries. A common pattern is a binary or INT8 shortlist that is then rescored with full-precision vectors.
How much do query embeddings cost?
Every search embeds the query with the same model, and the calculator assumes 25 tokens per query over a 30-day month. Ten thousand queries a day is 7.5 million tokens a month, $0.15 with the small model at $0.02 per million and about $0.98 with the large one. Even at the slider maximum of a million queries a day the small model costs $15 a month, so query embedding is rarely the expensive part of retrieval.
What does a self-hosted open embedding model cost?
The tool prices its open option at $0.005 per million tokens with 768 dimensions, a stand-in for the compute a self-hosted model uses rather than a vendor fee. Your real cost is hardware time divided by throughput, so measure how many tokens per second your machine embeds and divide its hourly price by that rate. The smaller dimension count also halves storage against a 1,536-dimension model, which matters more as the corpus grows.