Estimate the raw vector storage for 10 million 768-dim float32 embeddings before any index overhead.
Your team is sizing a new vector database deployment. The corpus is 10,000,000 documents, each embedded once with a 768 dimension model stored as float32 (4 bytes per dimension). Ignoring graph or index overhead, metadata, and replication, estimate the raw storage for the vectors alone.
About 30 GB: 10M vectors x 768 dims x 4 bytes = 30.72 GB raw. The real deployment adds graph links, metadata, and replicas on top of this floor.
A vector is just a list of decimal numbers. Each one takes 4 bytes in standard precision. If a single embedding has 768 numbers, that is about 3 kilobytes. Now imagine 10 million of these embeddings sitting in a database; multiply 3 KB by 10 million and you get roughly 30 gigabytes. That is the size of the raw data, like the weight of all the bricks before you build the house. The actual database will be bigger because it needs walls, doors, and a roof on top of the bricks: the index, the metadata, and the replicas. But the brick count is always the starting point of any capacity conversation.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Estimating raw vector storage is the first arithmetic any vector-database engineer learns and the one that becomes muscle memory after the third capacity-planning meeting. The formula is simple enough to do in your head: dimension times bytes-per-dim times count. The trap is treating the raw number as the deployment total, when in practice the real budget is 2x to 4x larger after index overhead, metadata, and replication.
This deep-dive walks through the formula and its derivation, the three layers of overhead on top of the raw number, the role of quantization as the primary cost lever at scale, and the unit conventions (decimal GB vs binary GiB) that catch teams out in surprising ways.
The formula and its derivation
The arithmetic
A float32 number is 4 bytes (32 bits). A vector of dim float32 numbers is dim * 4 bytes. A corpus of N such vectors is N * dim * 4 bytes.
where N is vector count, d is dimension, and b is bytes per dimension (4 for float32, 2 for float16, 1 for int8).
For the question: N = 10,000,000, d = 768, b = 4. So:
Divide by 10^9 for decimal gigabytes: 30.72 GB. Divide by 2^30 for binary GiB: 28.6 GiB.
Why this is the right starting point
Every downstream sizing decision (RAM, disk, network, replication) anchors on this number. Get this wrong by an order of magnitude and the architecture review is wrong by an order of magnitude. Get this wrong by 2-3x and you ship a cluster that runs out of RAM in week four.
Memorize the per-vector size for common dimensions:
- 384 dim float32: 1.5 KB.
- 768 dim float32: 3 KB.
- 1024 dim float32: 4 KB.
- 1536 dim float32: 6 KB.
- 3072 dim float32: 12 KB.
Multiply by your corpus size to get the raw number in seconds, without a calculator.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Pinecone capacity calculators expose exactly this formula in their UI; users enter dim, count, and quantization to get sizing.
- Pgvector documentation walks through the same calculation when advising on `shared_buffers` and instance sizing.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does the formula change for a billion-vector deployment, and at what scale does float32 stop making sense?
Same formula: 1B * 768 * 4 = 3 TB. With 3x replication that is 9 TB just for vectors before any index or metadata. The crossover where quantization becomes mandatory is usually around 100M-500M vectors depending on hardware budget; above that, scalar or product quantization is the default.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating 30 GB as the deployment total. Real HNSW adds 30-50% on top for graph links, plus metadata, plus replicas. Budget at least 2x the raw figure.
60 second bullets to scan on the way to the call.
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.