Vector database size calculator
How it adds up
| Item | Vectors | With index and metadata |
|---|---|---|
| 32-bit floats | 1.37 GiB | 2.51 GiB |
| 16-bit floats | 703.1 MiB | 1.48 GiB |
| 8-bit integers | 351.6 MiB | 985.1 MiB |
| Binary | 43.9 MiB | 523.7 MiB |
Shrinking the numbers is the biggest saving: 8-bit and binary quantisation cut the vectors to a quarter or a thirty-second of their 32-bit size, usually at some cost in search quality, so test recall on your own questions before switching. Index overhead depends on the database and its settings; check its documentation, then adjust the percentage.
Worked out from the numbers you enter. Calculated in this browser; nothing you enter is sent anywhere or stored.
How to use it · free, no signup
How to use the Vector Database Size Calculator
Enter your documents, chunks per document, embedding dimensions and precision to estimate the size of a vector database for RAG. Calculated in your browser.
01
Count the vectors
Documents and the chunks each is split into; each chunk is one vector.
02
Enter the embedding
Its dimensions, and the bytes each one takes: 4 for 32-bit floats.
03
Add what is stored beside it
The chunk text and metadata per vector, and the index overhead.
Vectors, metadata and the index
A vector database for retrieval-augmented generation stores one embedding for every chunk of every document, usually with the chunk’s text and some metadata beside it, plus an index for fast search. The starting example is 20,000 documents in 12 chunks each, with 1,536-dimension embeddings in 32-bit floats:
| Part | Size |
|---|---|
| Vectors | 240,000 |
| Raw vectors (240,000 × 1,536 × 4 bytes) | 1.37 GiB |
| Text and metadata (2,000 bytes each) | 457.8 MiB |
| Index overhead (50%) | 703.1 MiB |
| Total | About 2.51 GiB |
Precision is the biggest lever
Each dimension of an embedding is a number, and how many bytes it takes is a choice. 32-bit floats take 4 bytes, 16-bit 2, 8-bit integers 1 and binary a single bit, an eighth of a byte. Moving from 32-bit to 8-bit cuts the vectors to a quarter, and binary to a thirty-second. Search quality usually drops somewhat as precision falls, so test recall on real questions before switching.
Planning assumptions
- Index overhead varies by database and settings; the 50% default is a planning assumption, not a measurement.
- Memory or disk. Some databases keep everything in memory for speed; others keep vectors on disk and only the index in memory.
- Growth. Re-run the figures for next year’s document count, not today’s.
- Replicas multiply the total if the database keeps copies for safety.
Getting the inputs
The number of chunks depends on document length and chunk size, which the chunk size calculator works out. Embedding the documents costs tokens too; the AI API cost calculator prices them at your provider’s rates. For how the pieces fit together, see the context window calculator, which shows how many retrieved chunks fit in a prompt.
Published by Koit Academy. Who runs it, how it is paid and how its tools are checked.
Questions
What people ask about the Vector Database Size Calculator
How big is one embedding?
How do I estimate the number of vectors?
What is index overhead?
Does quantisation reduce search quality?
Is the chunk text stored with the vector?
Related tools
Token Counter
An estimate of the tokens in any text
Open itChunk Size Calculator
Chunks, overlap and cost for retrieval
Open itPassword Generator
Generate strong passwords in your browser and see what they are actually worth
Open itAI Prompt Generator
One clear prompt from its parts
Open itAI Image Prompt Generator
A detailed image prompt from its parts
Open itAI Text Cleaner
Plain text from an AI answer, without the Markdown
Open it