Vector Database Cost Calculator
Vector DB monthly cost estimate.
Formula
Storage GB + Query cost
Example
1M vectors × 1536 dims, 100K queries → $1.27.
Vector database costs scale in ways most teams discover only after the bill arrives. The pricing pages list a per-vector or per-pod number; the real bill is driven by embedding dimensions, query patterns, and how often you re-index. This guide explains where the cost actually lives — and the four levers that cut it most.
What actually drives the cost
Three layers stack to form your monthly bill. Most teams over-focus on the cheapest layer (storage) and ignore the expensive one (compute for queries against an in-memory index).
Where the monthly cost actually goes
Two reasons compute dominates: indices for fast similarity search (HNSW, IVF) sit in RAM, not disk. And every query is a top-k nearest-neighbor scan over millions of high-dimensional vectors. Both make compute the binding cost — even before you serve a single query.
Managed provider pricing, compared
Pricing across major vector databases for a typical workload (1M vectors × 1,536 dimensions, 100K queries/month):
| Provider | Pricing model | Est. monthly cost | Notes |
|---|---|---|---|
| Pinecone (Serverless) | $/GB storage + $/read & write units | $70 – $130 | Pay-per-use; cheapest at low-medium scale |
| Pinecone (Pod-based) | $0.096/hour per p1.x1 pod | $70 – $280 | Fixed cost; predictable but underused at low traffic |
| Weaviate Cloud | $25/mo base + dimensions × vectors tier | $95 – $200 | Open-source under the hood; self-host option available |
| Qdrant Cloud | RAM-based: $0.014/hour per GB RAM | $60 – $140 | Lowest entry price; strong hybrid search |
| Milvus / Zilliz | CU-hours (1 CU = 8 GB RAM) | $65 – $160 | Free tier up to 2M vectors |
| pgvector (Postgres ext.) | Whatever your Postgres costs | $15 – $80 | Cheapest, but slower above ~10M vectors |
The gap between cheapest and most expensive at the same scale is often 5×, and the "right" choice depends entirely on whether your bottleneck is read latency, write throughput, or operational simplicity — not headline price.
Embedding dimensions are the biggest lever
Vector storage scales linearly with embedding dimensions. The dimension you choose at model-selection time decides your bill for the lifetime of the index.
| Embedding model | Dimensions | Storage per 1M vectors | Relative cost |
|---|---|---|---|
OpenAI text-embedding-3-small | 1,536 (default) | ~6.1 GB | Baseline (1.0×) |
OpenAI text-embedding-3-small (truncated 512) | 512 | ~2.0 GB | 0.33× |
OpenAI text-embedding-3-large | 3,072 | ~12.3 GB | 2.0× |
Cohere embed-v3 | 1,024 | ~4.1 GB | 0.67× |
Sentence-BERT all-MiniLM-L6-v2 | 384 | ~1.5 GB | 0.25× |
Voyage AI voyage-3-large | 1,024 | ~4.1 GB | 0.67× |
The most overlooked optimization: Matryoshka representation learning (supported in OpenAI's text-embedding-3 family) lets you truncate a 1,536-dim embedding to 512-dim at minimal quality loss — cutting storage and RAM by 3×.
When to self-host instead
| Situation | Use managed | Use self-hosted |
|---|---|---|
| Under 100K vectors, prototyping | ✓ (often free tier) | — |
| 100K – 10M vectors, <100 QPS | ✓ | pgvector on existing Postgres |
| 10M – 100M vectors, steady traffic | Depends on team | ✓ (Qdrant, Milvus on K8s) |
| Over 100M vectors, high QPS | — | ✓ (cost difference is huge) |
| No DevOps capacity | ✓ (always) | — |
| Strict data residency / on-prem requirement | — | ✓ |
Five ways to cut your bill 50%+
- Truncate dimensions. Switch from 1,536-dim to 512-dim via Matryoshka or a smaller embedding model. Savings: 60–70%, with negligible retrieval quality loss.
- Quantize the index. Scalar quantization (int8) and binary quantization cut RAM by 4× and 32× respectively. Qdrant, Weaviate, and Milvus support this natively.
- Prune stale vectors. Most indices have a long tail of vectors never retrieved. TTL or last-accessed deletion cuts working-set size by 30–50%.
- Use a hybrid (sparse + dense) index. BM25 + vector search routes high-frequency keyword queries to cheap sparse retrieval, dropping vector query volume by 40–60%.
- Cache top results. A simple LRU cache on query embeddings catches the long tail of duplicate queries — chat apps see 20–40% cache hit rates.
Real-world cost scenarios
The same nominal "1 million vectors" workload can cost wildly different amounts depending on what you actually do with them. Here are three realistic scenarios that show how query patterns dominate the bill.
| Scenario | Vectors | Queries/mo | Index type | Est. monthly |
|---|---|---|---|---|
| Personal RAG (notes, documents) | 50K | 500 | Serverless / pgvector | $0 – $15 |
| Small SaaS semantic search | 500K | 10K | Pinecone Serverless | $25 – $60 |
| Mid-market product recommendations | 2M | 200K | Pod-based or Qdrant | $150 – $400 |
| Customer support chatbot at scale | 5M | 1M | Multi-pod with replication | $800 – $2,000 |
| Enterprise multi-tenant RAG | 50M | 5M | Self-hosted Milvus cluster | $3,000 – $8,000 |
| Real-time fraud detection | 100M | 50M | Self-hosted, dedicated hardware | $10,000+ |
Notice the non-linear jumps: going from 500K to 5M vectors only multiplies cost roughly 5-10×, but going from 10K to 5M queries multiplies cost 50-100×. Read amplification is the silent cost multiplier most teams miss.
How embedding choice cascades into cost
Most teams pick an embedding model based on benchmark quality, then absorb whatever cost follows. This is backwards. The embedding decision should jointly optimize quality, dimensions, and downstream storage cost.
A practical exercise: for any RAG application, run a retrieval-quality benchmark (NDCG@10 or MRR) at multiple dimension counts using the same source model. Most teams find that truncating from 1,536 to 768 dimensions costs under 2% retrieval quality while halving storage and RAM. Truncating to 512 dimensions costs around 3-5% quality but cuts cost by two-thirds. The OpenAI text-embedding-3 family is specifically trained for this Matryoshka truncation — quality degrades gracefully rather than catastrophically.
For cost-sensitive workloads, Sentence-BERT models (384 dimensions) are often a much better starting point than industry-default OpenAI embeddings. They run free locally, store 4× less data, and retrieval quality is sufficient for many applications — especially if you can pair them with hybrid search.
Compute cost mechanics: what you are really paying for
When a vector database charges by "pod-hour" or "compute unit," the underlying resource is RAM. HNSW indices — the de facto standard for approximate nearest neighbor search — require the entire index graph to be resident in memory for low-latency queries. Each vector contributes roughly its raw size plus an additional 1.4-2.0× overhead for graph edges, meaning your effective RAM requirement is significantly higher than naïve storage math suggests.
A 1M-vector index at 1,536 dimensions (32-bit floats) needs ~9-12 GB RAM with HNSW overhead, not the 6 GB raw storage. At 100M vectors that becomes 900 GB to 1.2 TB — well beyond a single machine's RAM, requiring sharding or quantization. This is where managed providers' "pod" pricing structures become apparent: you're paying for dedicated RAM that may sit underutilized at low query volumes.
Newer index types like DiskANN (used in Microsoft's research and increasingly in production systems) push parts of the index to SSD, trading 2-5× latency increase for 5-10× lower memory requirements. For workloads with relaxed latency SLAs, this changes the cost equation dramatically — DiskANN-based systems can serve 100M vectors on a single machine with 32-64 GB RAM instead of needing a cluster.
Hybrid search: the underused cost reducer
Pure vector search is overkill for many queries. When a user searches for "iPhone 15 battery replacement cost," the keywords "iPhone 15" and "battery" are deterministic signals that traditional BM25 ranks well. Vector embedding the entire query and doing a similarity search across millions of vectors wastes compute on a problem keyword search would solve faster.
Hybrid search systems (Weaviate, Qdrant, Vespa, OpenSearch, and Milvus 2.4+ all support this) route queries through both sparse (BM25) and dense (vector) retrieval, then fuse results. The cost savings come from two sources: BM25 is roughly 10-100× cheaper to compute, and the fusion step often allows reducing the dense retrieval's k (top-k results scanned) because you're only using vector search to handle the long-tail semantic cases.
Production deployments commonly see 40-60% reduction in vector query volume after switching to hybrid, with retrieval quality improving rather than degrading — because keyword matching catches exact-phrase queries that embeddings sometimes fuzz over.
Common mistakes
- Pricing by storage alone. Storage is ~15% of total cost. Two providers with similar $/GB can be 3× apart on total bill once compute is included.
- Ignoring re-indexing cost. Schema changes or model upgrades require re-embedding every vector. Plan for 1-2 re-indexes per year.
- Choosing dimensions before measuring. Default 1,536-dim costs 3× a tuned 512-dim. Benchmark retrieval quality first.
- Underestimating dev/staging environments. Most teams run 2-3 environments. Use serverless for non-prod.
Questions and answers
Why is RAM the bottleneck, not disk?
Approximate-nearest-neighbor indices (HNSW, IVF) require random-access reads across millions of vectors per query. SSDs serve a few thousand random reads/sec; RAM serves tens of millions. Disk-based indices slash throughput by 100×.
Should I use the default dimensions?
No — defaults are tuned for retrieval quality, not cost. Most teams overpay by 2-3× because they accept the default. Always benchmark retrieval@k at smaller dimensions before locking in.
Is pgvector viable for production?
Up to roughly 10M vectors with HNSW indexing, yes — and it's often the cheapest option if you already run Postgres. Beyond 10M vectors or 100+ QPS, dedicated vector DBs pull ahead.
Sources
- Pinecone: Pricing & capacity planning documentation (pinecone.io/pricing)
- Weaviate: Cluster sizing guide (weaviate.io/developers/weaviate)
- OpenAI: text-embedding-3 model card & Matryoshka documentation
- Qdrant: Cloud pricing and quantization benchmarks (qdrant.tech)
- Milvus: Capacity planning and CU pricing reference (milvus.io)
Related calculators: AI Inference Cost · AI Tokens per Word · RAG Pipeline Cost · GPU Memory Required