Vector Database Storage Calculator

Estimate how much disk or RAM your embeddings need from vector count, dimensions and precision, plus the HNSW index, metadata and replicas.

Your vectors

One per chunk, document or item you embed.

Set by the embedding model, e.g. 384, 768, 1536, 3072.

float32 = 4, float16 = 2, int8 = 1, binary = 1/8.

Index, metadata and copies

Typical defaults are 16 to 32.

Stored text chunk, IDs and filter fields. 0 if stored elsewhere.

1 = no replica, 3 = primary plus two replicas.

10 to 30% is a common planning margin.

Result

Total storage
6.43 GiB
6.9 GB
One copy
6.43 GiB
with headroom
Raw vectors
5.72 GiB
6.14 GB
Per vector
6,276 B
vector + index + metadata
Storage breakdown for one copy
Part (one copy)SizeShare
Vectors5.72 GiB97.9%
HNSW graph126 MiB2.1%
Metadata0 B0%

The HNSW graph adds 2.2% on top of the raw vectors (a ×1.02 multiplier).

How to use it

  1. Enter how many vectors you will store and the dimensions of your embedding model. Pick a preset for a common model.
  2. Choose the precision your database stores: float32 is the default, int8 or binary quantization cuts it sharply.
  3. Pick HNSW and set M, or Flat if your database does not build a graph. Add metadata bytes per vector if you store payloads.
  4. Set the total number of copies and a headroom margin, then read the total and the breakdown.

How the numbers are worked out

  • Raw vectors = vectors × dimensions × bytes per value
  • HNSW graph ≈ vectors × 4 bytes × (2 × M + M ÷ (M − 1)): 2M links on the bottom layer plus a small share on upper layers
  • Metadata = vectors × metadata bytes per vector
  • Total = (vectors + graph + metadata) × (1 + headroom) × copies

Worked example

One million 1,536-dimension float32 vectors take 1,000,000 × 1,536 × 4 = 6.14 GB (5.72 GiB). With HNSW at M = 16 the graph adds about 132 bytes per vector, 0.12 GiB, for 5.85 GiB per copy. With 10% headroom that is 6.43 GiB, and two copies make 12.9 GiB. Storing the same vectors as int8 would cut the raw vectors to 1.43 GiB.

Need to know how many vectors your documents make, or what embedding them costs? Use the RAG chunking and embedding cost calculator. Sizing GPU memory for the model instead? See the KV cache calculator. Real engines differ in how they store graphs, quantized copies and payloads, so treat the result as a planning estimate. Nothing you enter leaves your browser.

See also

Frequently Asked Questions (FAQ)

How do I calculate vector database storage?

Multiply the number of vectors by the dimensions and by the bytes per value: 4 for float32, 2 for float16, 1 for int8 and 1/8 for binary. One million 1,536-dimension float32 vectors is 1,000,000 × 1,536 × 4 = 6.14 GB (5.72 GiB) before any index, metadata or replicas.

How much extra space does an HNSW index add?

Each vector keeps about 2 × M neighbour links on the bottom layer, plus a small share on the upper layers, at roughly 4 bytes per link. With M = 16 that is about 132 bytes per vector. The graph is small next to a 1,536-dimension float32 vector (6,144 bytes, about 2% extra) but large next to a 384-dimension int8 vector (384 bytes, about 34% extra).

What does M mean in HNSW?

M is the number of links each node keeps to its neighbours. A higher M improves recall and speeds up hard queries but makes the graph bigger and slower to build. Common defaults are 16 to 32. Some engines let you set it per collection.

How much memory do I save with quantization?

Going from float32 to float16 or int8 cuts vector storage to a half or a quarter, and binary quantization to one thirty-second. Quality drops a little, most with binary. Many engines keep the original float32 vectors on disk for re-scoring, which adds storage back: add those as extra metadata bytes per vector if you do that.

Do replicas multiply the storage?

Yes. Each replica is a full copy of the data and index, so three total copies need three times the space. Enter the total number of copies, not the number of extra ones. Replicas improve availability and query throughput, not capacity.

What should I put in metadata bytes per vector?

The payload you store with each vector, such as the original text chunk, an ID, a URL or filter fields. A 500-character chunk is about 500 bytes, plus a few dozen for IDs and fields. Leave it at 0 if you store payloads elsewhere.

Why add overhead on top?

Real databases keep write-ahead logs, segments waiting to be merged, deleted-but-not-compacted rows and filesystem slack. 10 to 30% extra is a sensible planning margin; the right number depends on your engine and update rate.

Does this tell me the RAM I need?

It gives the total size of data plus index. Engines that keep everything in memory, such as an in-memory HNSW index, need about that much RAM per copy. Disk-based engines can need less RAM but more disk. Check your engine’s documentation for how it splits the two.

Does the calculator send my numbers anywhere?

No. Everything is calculated in your browser, and the numbers you enter never leave it.