Skip to content
Koit Academy
AI Guides·

5 min read

How Much Storage Do Embeddings Need? Vector DB Sizing

How to estimate a vector database's size from chunks, embedding dimensions and precision, plus metadata and index overhead, with a RAG example.

By Koit Academy

Retrieval-augmented generation, or RAG, lets an AI model answer from your own documents by storing them as embeddings: lists of numbers that capture meaning, kept in a vector database so the most relevant passages can be found quickly. Before choosing a database or a hosting plan, it helps to know how big that store will be. The answer is mostly arithmetic, and the part that surprises people is that the text stored beside each vector can take as much room as the vector itself.

The formula

raw vectors = number of vectors × dimensions × bytes per dimension

  • Number of vectors: one per chunk of text, so documents × chunks per document.
  • Dimensions: set by the embedding model, often a few hundred to a few thousand.
  • Bytes per dimension: 4 for 32-bit floats, 2 for 16-bit floats, 1 for 8-bit integers, and 1/8 for binary vectors.

On top of the raw vectors come:

  • metadata: the chunk’s text, its ID, the source document and any fields you filter on;
  • the index: the structure that makes search fast, such as HNSW, which adds memory depending on the database and its settings.

A worked example

A knowledge base of 20,000 documents, split into 12 chunks each, is 240,000 vectors. With an embedding model producing 1,536 dimensions stored as 32-bit floats:

  • raw vectors: 240,000 × 1,536 × 4 bytes = about 1.37 GiB;
  • metadata at about 2,000 bytes per vector: about 458 MiB;
  • index overhead, assumed at 50% of the vectors: about 703 MiB;
  • total: about 2.5 GiB.
PrecisionRaw vectorsTotal with metadata and index
32-bit float1.37 GiB2.51 GiB
16-bit float703 MiB1.48 GiB
8-bit integer352 MiB985 MiB
Binary44 MiB524 MiB

The 50% index figure is a planning assumption, not a property of any one database. Real index size varies with the index type and its settings.

The vector database size calculator works out raw vectors, metadata, index and total for your own counts, dimensions and precision.

How a real database counts it

Databases add a little per vector for their own bookkeeping. The pgvector extension for Postgres, for example, documents that each vector takes 4 × dimensions + 8 bytes, a halfvec (16-bit) takes 2 × dimensions + 8, and a bit vector dimensions ÷ 8 + 8. For 1,536 dimensions that is 6,152 bytes per full-precision vector, close to the raw figure above. pgvector supports up to 16,000 dimensions for its vector types.

Metadata is easy to underestimate

If you store each chunk’s text with its vector, which most RAG systems do so they can pass it to the model, the text adds its own size. A chunk of about 400 English words is around 2,000 to 2,500 characters, so 2 KB or more per vector before IDs and other fields. In the example, metadata is a third the size of the full-precision vectors, and larger than them once vectors are stored at 8-bit or binary.

Chunk size changes everything

The number of vectors depends on how finely the documents are split. Smaller chunks mean more vectors, more storage and a larger index; larger chunks mean fewer vectors but less precise retrieval. The chunk size calculator works out how many chunks a document makes at a given size and overlap, and the token counter shows how many tokens a chunk holds. Our guide on what tokens are explains the units chunk sizes are usually set in.

Estimating chunks per document

With overlapping chunks, the count is roughly (document length − overlap) ÷ (chunk size − overlap), rounded up. A 3,000-word document cut into 400-word chunks with 50 words of overlap gives (3,000 − 50) ÷ (400 − 50), about 8.4, so 9 chunks. Across 20,000 such documents that is 180,000 vectors; halving the chunk size roughly doubles it.

Ways to shrink it

  • Lower precision. 16-bit floats halve the vectors with little loss in search quality for many models; 8-bit and binary shrink them further, usually with some loss, often recovered by re-ranking the top results with full vectors.
  • Fewer dimensions. Some embedding models can output shorter vectors, trading a little accuracy for size.
  • Store text elsewhere. Keep only IDs with the vectors and fetch the text from ordinary storage.
  • Remove duplicates and boilerplate before embedding.

Memory or disk?

Many vector indexes perform best when the index, and sometimes the vectors, fit in memory. A 2.5 GiB store fits easily on a modest server; a store of tens or hundreds of millions of vectors needs planning around memory, compression and possibly several machines. Estimate early, because it often decides the hosting choice.

Growth

Plan for the knowledge base you will have, not the one you have today. If documents are added every month, multiply. Re-embedding everything with a new model also means storing two versions during the switch.

Common questions

How big is one embedding? Dimensions × bytes per dimension: a 1,536-dimension vector at 32-bit is 6,144 bytes, about 6 KB, before metadata.

How much storage for a million embeddings? At 1,536 dimensions and 32-bit, about 5.7 GiB of raw vectors, plus metadata and index.

Does the index really add 50%? It depends on the database and settings. The figure is a planning assumption; check your database’s documentation.

Do I need a dedicated vector database? Not always. Extensions such as pgvector add vector search to an ordinary Postgres database, which is often enough for a few million vectors. Dedicated vector databases help at larger scale or with specific search features.

How many dimensions should embeddings have? That is set by the embedding model. More dimensions can capture more detail but cost more storage; some models let you choose a shorter output.

Is binary quantisation worth it? It cuts vector size by 32 times compared with 32-bit floats. Test search quality on your own data before relying on it.

Limits of this guide

Index overhead and per-vector bookkeeping differ between databases and settings. Use the estimate for planning, then measure the real size after loading a sample.

Sources, read November 15, 2026:

  • pgEdge documentation for pgvector, Reference: storage of 4 × dimensions + 8 bytes per vector, 2 × dimensions + 8 for halfvec, dimensions ÷ 8 + 8 for bit, and up to 16,000 dimensions.