Back-of-the-Envelope Estimations and Math
Master quick mental math for system scale, QPS, daily storage growth, network bandwidth, and memory sizing in system design.
When beginning a high-level system design interview or planning real-world cloud infrastructure, candidates often jump directly into picking tools: "We will use Redis for caching, Cassandra for storage, and Kafka for streaming."
Without understanding the underlying numbers, this approach leads to flawed architectures:
- Sizing a cluster for 500,000 queries per second when the actual business requirement is only 200 requests per second wastes massive cloud budget.
- Sizing a relational database for a simple document store that accumulates 50 terabytes of append-only events every week leads to disk exhaustion and emergency outages.
- Neglecting network egress calculations can result in unexpected six-figure cloud bandwidth bills.
Back-of-the-envelope estimation is the discipline of using quick, rounded mental math to calculate scale, queries per second (QPS), storage accumulation, network bandwidth, and memory requirements before drafting an architecture.
01Core concepts and intuition
Estimations do not require exact calculator precision. Interviewers look for structured reasoning, comfort with standard units, and realistic engineering assumptions.
Key powers of two and data unit conversions
Memorizing standard data conversions saves valuable time during whiteboard design:
- 1 Byte = 8 bits
- 1 Kilobyte (KB) = 1,000 Bytes (10^3 bytes, or 1,024 bytes)
- 1 Megabyte (MB) = 1,000 KB = 10^6 Bytes (1,000,000 bytes)
- 1 Gigabyte (GB) = 1,000 MB = 10^9 Bytes (1,000,000,000 bytes)
- 1 Terabyte (TB) = 1,000 GB = 10^12 Bytes (1 trillion bytes)
- 1 Petabyte (PB) = 1,000 TB = 10^15 Bytes (1 quadrillion bytes)
The rule of 86,400 seconds
There are 86,400 seconds in a 24-hour day (24 hours * 60 minutes * 60 seconds).
In interview estimations, round 86,400 to 100,000 seconds.
- If a system receives 10 million requests per day: Average QPS = 10,000,000 / 100,000 = 100 requests per second.
- If a system receives 1 billion requests per day: Average QPS = 1,000,000,000 / 100,000 = 10,000 requests per second.
Rounding to 100,000 makes division instantaneous and provides a slightly conservative baseline.
Average QPS versus Peak QPS
User traffic is rarely uniform across a 24-hour window. Most web and mobile applications experience diurnal cycles, where traffic surges during midday or evening hours, and spikes dramatically during marketing campaigns or breaking news.
As a standard engineering baseline:
- Peak QPS = Average QPS * 2 to 3 for general consumer services.
- Peak QPS = Average QPS * 5 or higher for flash-sale platforms, ticketing systems, or live event streaming.
Designing your compute cluster and database read replicas to handle peak QPS prevents cascading bottlenecks when traffic surges.
Loading the rest of the lesson…