Back-of-the-envelope estimation for system design interviews, explained
Back-of-the-envelope estimation is the quick order-of-magnitude math that answers how big a system is, actually - rough numbers for queries per second, storage, bandwidth, and memory, worked out in your head to one significant figure.
Sketch any system at scale - a feed, a chat app, a video platform - and sooner or later the interviewer asks the question that separates a hand-wave from a design: how big is this, actually?
It matters because every real architecture decision downstream depends on it: whether one database node is enough or you need to shard, whether you need a cache or a CDN, how many servers you provision. You cannot justify "I'll shard this" or "I'll put a cache here" without a number behind it, and producing that number fast - without a calculator, without false precision - is a core system design interview skill that interviewers probe directly.
Why estimation comes up
A design with no numbers is untestable. "I'll use a database" is a non-answer until you know whether that database holds a gigabyte or a petabyte, serves a hundred requests a second or a million.
Estimation turns a vague box-drawing into a set of constraints that force the architecture: a few thousand writes a second fits on one node; six hundred thousand reads a second does not, so now you are talking caching, replicas, and sharding whether you wanted to or not.
The interviewer is not checking your arithmetic to the decimal - they want to see you reach for the right rough figure, apply a peak multiplier, remember replication, and let the result drive the design.
Why back-of-the-envelope estimation comes up in system design interviews
Estimation rarely gets its own prompt. It appears inside a design - "design a URL shortener," "design a news feed," "design a video platform" - right after you state the scale, when the interviewer asks what that scale implies for the system.
You say "it's a large service," and the follow-up is the trap: how many queries per second is that, how much storage per year, and does it fit on one machine? The interviewer is not testing whether you can multiply - they are testing whether you can turn a user count into the numbers that decide the architecture, quickly and without pretending to a precision you don't have.
The interviewer rarely lets a round number sit unexamined. "You said about three hundred thousand reads a second at peak. Good - now, is that one database or a hundred? Walk me through the storage for five years too, and don't forget you're keeping more than one copy of every row. Round as you go - I want the order of magnitude, not six digits."
That question - forcing the numbers to actually constrain the design, replication and peak included - is the one a vague "it's web-scale" answer can never survive.
The rounds on Zynter are modelled on how the loop runs, not scraped from any candidate's recall. What matters for prep is the shape: you name a scale, and the next sentence asks you to convert it into QPS, storage, and bandwidth - and then to say what those numbers force you to build.
What the interviewer is really testing
An estimation answer is read on the same four dimensions as any design decision.
- Problem solving - did you estimate only what the design actually hinges on (the load that decides sharding, the storage that decides the data tier), or drown in irrelevant math?
- Communication - can you narrate the arithmetic out loud, rounding cleanly, so the interviewer can follow every step?
- Technical execution - do you remember the peak multiplier, the replication factor, and the right ballpark for a record size or a latency?
- Time management - did you get to a usable number in a minute and move on, instead of polishing digits?
The numbers worth memorising
Estimation is fast only if a handful of numbers are automatic, so you multiply and divide in rounded powers of ten instead of reaching for precision you don't need. Three sets are worth knowing cold:
- Powers of two โ data sizes.
2^10โ 1 thousand (a KB),2^20โ 1 million (a MB),2^30โ 1 billion (a GB),2^40โ 1 trillion (a TB),2^50(a PB). This lets you turn "a billion records of a kilobyte each" into a terabyte in your head. - Latency numbers โ what's fast. Reading from memory is ~100 nanoseconds; a random read from SSD is ~0.1 millisecond; a disk seek is ~10 milliseconds; a round trip inside one datacenter is ~0.5 millisecond; cross-country is ~40-70 milliseconds; cross-continent is ~150 milliseconds. Memory beats SSD beats disk by orders of magnitude, and a network hop dwarfs a local read - which is the whole justification for caching and for keeping data close to the user.
- Time and ratios. There are 86,400 seconds in a day, which you round to
10^5- the single most useful trick, because it turns "actions per day" into "actions per second" with one division. And read-heavy systems commonly run a read:write ratio around 100:1, so reads usually dominate your QPS.
The sentence that scores: I keep a few numbers automatic - powers of two map to KB/MB/GB/TB, memory is ~100ns while a disk seek is ~10ms and a cross-continent round trip ~150ms, and a day is about 10^5 seconds - so I can convert users into QPS and records into storage in my head, to one significant figure.
Having the cheat sheet in memory is what makes the rest fast enough to do live.
The estimation funnel: from users to QPS, storage, and bandwidth
With the numbers in hand, estimation is a funnel: start from the user count the prompt gives you and convert it, step by step, into the four figures that constrain the design. Drive each step off a simple formula and round aggressively:
- QPS from DAU. Queries per second = daily active users ร actions per user per day รท seconds per day. Divide by
10^5(the rounded 86,400), not a calculator. This gives you average QPS. - Peak QPS. Real traffic is spiky, so multiply average by a peak factor of 2ร to 10ร depending on the workload. A system is provisioned for peak, not average - forgetting this is the classic miss.
- Storage. Bytes per day = writes per day ร bytes per record. Then multiply by retention (how many days or years you keep it) and by a replication factor of ~3 (you keep multiple copies), plus a bit for indexes and metadata. That product is what decides single-node vs sharded.
- Bandwidth. Throughput = QPS ร average payload size. Read bandwidth (egress) and write bandwidth (ingress) are separate; large media (images, video) usually dominate and often belong on a CDN or object store, not the database.
- Cache memory. Apply the 80/20 rule - roughly 20% of the data serves 80% of the reads - so size the cache to hold the hot set, often a fraction of the daily read volume rather than the whole dataset.
The sentence that scores: I funnel from users down - DAU times actions over 10^5 gives average QPS, times a peak factor of 2 to 10 for provisioning; storage is records per day times record size times retention times a replication factor of about 3; bandwidth is QPS times payload; and I size the cache to the hot 20%. Then I read the numbers back to decide the architecture.
Naming the funnel and the peak and replication multipliers is the method the whole topic is testing.
A worked example: estimating a Twitter-like feed
Numbers stick when you run them, so take a Twitter-like service and push it through the funnel. Say it has 300 million daily active users, each posting 2 tweets a day and reading 100 tweets a day, with a tweet averaging ~300 bytes of text and metadata.
Work it out loud, rounding every step:
- Write QPS. 300M ร 2 รท
10^5= 600M รท10^5= 6,000 writes/second average; at a 2ร peak, ~12,000/second. - Read QPS. 300M ร 100 รท
10^5= 30,000M รท10^5= 300,000 reads/second average; at 2ร peak, ~600,000/second. That is a read:write ratio around 50:1, so reads dominate. - Storage per day. 600M tweets ร 300 bytes โ 1.8 ร
10^11bytes โ 180 GB/day. With a ~3ร replication factor, ~540 GB/day of raw capacity. - Storage over 5 years. 180 GB/day ร 365 ร 5 โ 330 TB of tweet data before replication, roughly 1 PB with three copies.
- Read bandwidth. 300,000 reads/second ร 300 bytes โ 90 MB/second of egress for tweet text alone (media would be far larger and belongs on a CDN).
Now read the numbers back, because that is the point: 600,000 reads/second will never come off one node, so you need caching (the hot 80/20 set in memory) plus read replicas; ~1 PB over five years will never fit on one machine, so the data tier must be sharded; and the media bandwidth says CDN and object storage, not the database.
The sentence that scores: the estimate isn't the deliverable - the architecture it forces is. 600K read QPS and a petabyte say cache, replicas, and sharding; the media bandwidth says CDN. I estimate to decide, then move on.
The pitfalls interviewers probe
The math is easy; the mistakes are predictable, and a strong candidate heads them off before being caught. Name these as you go:
- False precision. Carry one significant figure and round as you multiply (86,400 โ
10^5). A clean order-of-magnitude answer in thirty seconds beats a six-digit answer in five minutes that you can't sanity-check. - Forgetting the peak multiplier. Average QPS under-provisions you; systems are built for peak. Always apply the 2ร-10ร factor and say which you chose and why.
- Forgetting replication and overhead. You keep ~3 copies of the data, plus indexes and metadata, so multiply raw storage accordingly - an estimate that ignores replication is off by a factor of three before you start.
- Unit slips. Keep bits and bytes straight (1 byte = 8 bits; network bandwidth is often quoted in bits), and keep your powers of ten lined up. A single unit slip moves the answer by orders of magnitude.
- Estimating the wrong thing. Only compute what the design hinges on. The number that tells you "one node or a cluster" is worth a minute; a number that changes nothing is a waste of it.
The point to state plainly: I round to one significant figure, always apply a peak factor and a replication factor, keep bits and bytes straight, and only estimate the numbers that actually move the design. The goal is a fast figure that forces a decision, not precision for its own sake.
That discipline - rough, fast, decision-driving - is what the estimation probe rewards.
How to talk about estimation in an interview
The probes from every section rhyme. Master these five and you can run the numbers in any design, not just this checklist.
- "How many QPS is that?" โ DAU ร actions per user per day รท
10^5for average, then a 2ร-10ร peak factor. State the peak number, since that's what you provision for. - "How much storage over N years?" โ records per day ร bytes per record ร days of retention ร a ~3 replication factor, plus a bit for indexes. Round to one significant figure.
- "Does that fit on one machine?" โ Compare the storage and peak QPS to a single node's limits; if it blows past them, say so and move to replicas, caching, and sharding. The estimate is there to force that call.
- "Why are you rounding so hard?" โ Because I need the order of magnitude to pick an architecture, not a precise figure. One significant figure I can do in my head and sanity-check beats six digits I can't.
- "You forgot something in that storage number." โ Replication - I keep about three copies - plus index and metadata overhead; let me multiply it back in.
How to prepare: a short plan
You do not need a spreadsheet; you need the numbers automatic and the funnel reflexive, so when a design needs a figure you produce it in under a minute.
Day 1: Memorise the cheat sheet - powers of two to data sizes, the latency numbers, 86,400 โ 10^5, and the 100:1 read:write ratio - until you can recall each without thinking.
Day 2: Drill the funnel - DAU โ QPS (with a peak factor), storage (with retention and ร3 replication), bandwidth, cache sizing - on three different services until the formulas are muscle memory.
Day 3: Put estimation inside a full design (a feed, a chat app, a video platform): estimate the load and storage, then say out loud what the numbers force - one node or a cluster, cache, CDN. Then do it timed, with someone asking "does that fit on one machine?"
Frequently asked questions
What is back-of-the-envelope estimation in system design? It is quick, rough, order-of-magnitude math used to turn a system's scale into the numbers that constrain its architecture - queries per second, storage, bandwidth, and memory - done in your head to about one significant figure.
The name comes from the idea that you could work it out on the back of an envelope: no calculator, no precision, just fast arithmetic in rounded powers of ten.
In an interview it comes up the moment you state a scale, because "a large service" means nothing until you know whether it serves a hundred requests a second or a million, and holds a gigabyte or a petabyte.
Comments
No comments yet. Start the discussion.