Back of the Envelope Calculation for System Design
Interviewers want assumptions, a clean formula chain and rounded numbers. Pick a preset or enter your own DAU, and get QPS, peak QPS, storage, bandwidth, cache and servers, written the way you would put it on a whiteboard. No login.
How back-of-the-envelope estimation works
A back of the envelope calculation turns a few stated assumptions into order-of-magnitude numbers. Start with daily active users (DAU), multiply by actions per user to get requests per day, and divide by 86,400 seconds to get average QPS. Multiply by a peak factor for peak QPS, multiply bytes per item by items per day for storage, and multiply QPS by payload size for bandwidth. Round aggressively and say your assumptions out loud, because changing one assumption changes the whole answer.
Reference numbers: latency, time and QPS rules of thumb
| Operation | Time |
|---|---|
| L1 cache reference | 0.5 ns |
| L2 cache reference | 7 ns |
| Main memory reference | 100 ns |
| Compress 1 KB | ~3 µs |
| Send 1 KB over a 1 Gbps network | 10 µs |
| Random read 4 KB from SSD | ~150 µs |
| Read 1 MB sequentially from memory | ~250 µs |
| Round trip inside one data center | ~500 µs |
| Read 1 MB sequentially from SSD | ~1 ms |
| Disk seek | ~10 ms |
| Read 1 MB sequentially from disk | ~20 ms |
| Packet round trip California to Netherlands | ~150 ms |
| Fact | Value |
|---|---|
| Seconds in a day | 86,400 (about 105) |
| Seconds in a year | about 31.5 million |
| 1 million requests per day | about 12 QPS |
| 1 billion requests per day | about 11,600 QPS |
| Relational database, order of magnitude | ~1,000 QPS per node |
| Key-value / NoSQL store, order of magnitude | ~10,000 QPS per node |
| In-memory cache, order of magnitude | 100,000+ QPS per node |
Latency figures follow the widely circulated "numbers every programmer should know" list. Throughput rows are planning rules of thumb, not benchmarks. Real values depend on hardware, query shape and tuning.
1. Pick a preset or enter your numbers
One-click presets (illustrative assumptions)Presets are round, illustrative interview assumptions, not official figures for any company. Decimal units are used (1 KB = 1,000 bytes) to keep the arithmetic easy to do by hand.
2. Your estimate
Whiteboard answer (copy it, then rewrite in your own words)Back of the envelope calculation: frequently asked questions
What is a back of the envelope calculation in system design?
It is a quick order-of-magnitude estimate of load and resources, such as queries per second, storage, bandwidth and server count, made from a few stated assumptions. In an interview the goal is not an exact number. It is to show that you can state assumptions, chain simple formulas, round sensibly and notice which result drives the design.
How do you calculate QPS from daily active users?
Average QPS = DAU x requests per user per day / 86,400, because a day has 86,400 seconds. Compute reads and writes separately. Peak QPS is the average multiplied by a peak factor, commonly 2x to 3x, which is an assumption you should state out loud.
How do you estimate storage for a system design question?
Storage per day = new items per day x size per item. Multiply by 365 for a year and by the retention period in years, then multiply by the replication factor (3 is a common assumption) to get raw disk. Keep media such as photos and video separate from text metadata, because media usually dominates.
How do you estimate bandwidth?
Ingress bandwidth = write QPS x bytes per write. Egress bandwidth = read QPS x bytes per response. Both come out in bytes per second, so multiply by 8 to get bits per second (Gbps) when comparing with network link capacity. Use peak QPS to size the links.
How many servers do I need?
Divide peak QPS by the QPS one server can sustain, then round up. The per-server figure depends heavily on the work per request: a few hundred to a few thousand requests per second is a common planning number for an application server, and a cache can serve far more than a relational database. Add headroom for failures and deploys.
Are the Twitter, YouTube and other presets real company numbers?
No. The presets are round, illustrative interview assumptions chosen so the math is easy to follow. They are not official or current figures for any company. Edit any field and the answer updates, and in a real interview you should state your own assumptions and ask the interviewer to confirm them.
Is my data stored or sent anywhere?
No. The estimator runs entirely in your browser with no login. The Copy link button stores your inputs in the part of the URL after the # sign, which browsers do not send to servers.