Capacity Estimation &
Back-of-the-Envelope Math
Learn the 5 simple formulas that let you estimate how much traffic, storage, memory, and bandwidth any system needs — the most asked skill in system design interviews.
Why Capacity Estimation Matters
Imagine you're in a system design interview and the interviewer says:
That's capacity estimation — a quick, rough calculation done on a whiteboard without a calculator. You don't need to be perfectly accurate. You just need to be in the right ballpark (within 2-3× of the real answer).
By the end of this module, you'll know 5 simple formulas that cover every capacity question:
📋 Quick Reference Cheatsheet (expand when you need it)
The 86,400 Seconds Shortcut
| Daily Volume | ÷ 86,400 ≈ QPS |
|---|---|
| 1 Million / day | ~10 QPS |
| 10 Million / day | ~100 QPS |
| 100 Million / day | ~1,000 QPS |
| 1 Billion / day | ~10,000 QPS |
Trick: 86,400 ≈ 100,000 (10⁵). Just drop 5 zeros from daily volume!
Powers of Two & Storage Units
| Power | Approx. | Unit |
|---|---|---|
| 2¹⁰ | ~1,000 | 1 KB |
| 2²⁰ | ~1 Million | 1 MB |
| 2³⁰ | ~1 Billion | 1 GB |
| 2⁴⁰ | ~1 Trillion | 1 TB |
| 2⁵⁰ | ~1 Quadrillion | 1 PB |
Latency Numbers to Know
L1 Cache ref = 0.5 ns · Main memory = 100 ns
SSD random read ≈ 100 µs
HDD seek = 10 ms · Cross-region = 150 ms
Formula 1 — Queries Per Second (QPS)
QPS tells you how many requests your servers process every single second. It's the most fundamental number in system design — like knowing a highway's lane capacity before building on-ramps.
100 Million requests/day → drop 5 zeros → ~1,000 QPS. Done!
Real Example: Twitter's Read Traffic
Formula 2 — Peak QPS
Average QPS is like average daily traffic on a road. But what about rush hour? On Black Friday, a flash sale, or when a celebrity tweets — traffic can spike 2× to 5× above average. Your system must survive the peak, not just the average.
Real Example: Twitter Peak
This means your auto-scaling group must handle ~350K requests/second during the busiest moment of the day.
Formula 3 — Storage Capacity
Every time a user posts a tweet, uploads a photo, or sends a message, data gets written to disk. The question is: how much disk do you need over 5 years? (5 years is the standard retention window interviewers expect.)
5-Year Storage = Daily Storage × 365 × 5 × Replication Factor// Replication Factor = 3× (standard) — data is stored on 3 separate machines for safety
Real Example: Twitter Storage
What's in a tweet? ~200 bytes text + ~100 bytes metadata (user ID, timestamp) = ~300 bytes. About 20% of tweets have an image (avg ~200 KB each).
Formula 4 — Memory (RAM) Caching
Here's a powerful insight: 20% of your data gets 80% of the traffic. Think about it — on Twitter, most people view the same trending tweets, not random tweets from 2019.
So if you cache just the hottest 20% of daily reads in RAM (using Redis or Memcached), you'll serve ~80% of all requests from super-fast memory instead of slow disk. This is called the Pareto Principle or 80/20 rule.
RAM Cache Needed = Daily Read Volume × 20%// This 20% working set satisfies ~80% of all read requests from memory!
Real Example: Twitter Cache
900 GB fits in just 4 Redis nodes (256 GB RAM each). That's a tiny cluster to serve 80% of Twitter's reads!
Formula 5 — Network Bandwidth
There's one common gotcha here: storage is measured in Bytes, but network speed is measured in Bits. Since 1 Byte = 8 Bits, you need to multiply by 8 when converting.
Real Example: Twitter Egress
If we include media (images/videos), the actual bandwidth is much higher — but the formula stays the same. Just use a larger payload size.
🧮 Interactive System Sizer — Try It Yourself!
Live Capacity Estimator
Adjust the sliders or pick a preset to see real-time results.
🏗️ Practice: Right-Size a Scaled Web Application
Scenario: You just calculated the capacity for an application handling 50,000 Peak QPS, 20% hot data in RAM, and 5-year persistent storage.
Wire the architecture: Connect incoming Users to the Load Balancer, distribute traffic to the App Server Fleet, connect servers to Redis Cache (for fast RAM reads), and persist writes to the Database.
Task: Right-Sizing Infrastructure Tiers
Drag components to arrange them freely, and click two nodes to connect them.