Course contents

Back-of-envelope estimation

Back-of-envelope estimation for system design interviews: powers of two, latency numbers, QPS from DAU, storage, bandwidth and read/write ratio, with a worked example and when to skip the maths.

FreeMust know for interviewsLesson12 min readBeginner → SeniorReviewed Oct 2026
On this page
  1. Picture it first: estimates are a decision tool
  2. The numbers to know cold
  3. The four calculations
  4. A worked example, start to finish
  5. Peaks are where systems break
  6. When estimates matter, and when to skip them
  7. How to say it in the interview

🧮 What is back-of-envelope estimation?

It's quick, rough arithmetic that tells you the size of a problem: how many requests per second, how many terabytes, how many gigabits per second. You round hard, write down your assumptions, and aim to be right within a factor of ten. A builder pacing out a room before buying tiles is doing the same thing: they don't need the area to the centimetre, they need to know whether it's one box or ten.

For this lesson, we'll cover the numbers worth knowing by heart, the four calculations that come up in almost every round (requests per second, storage, bandwidth and the read/write ratio), one fully worked example, and the part most guides skip: when to do the maths and when to leave it out. Interviewers ask for estimates less to test your arithmetic and more to see whether you can turn a number into a design decision.

Below the line (out of scope)

  • Where estimates fit in the round: The delivery framework (step 4)
  • The full latency story for a single request: Search end to end
  • Capacity techniques once you know you need them: Caching, Sharding and partitioning

The 30-second answer

I estimate only when a number will change a decision, and I say which decision. I start from daily active users, multiply by actions per user to get requests a day, and divide by about 100,000 seconds to get the average per second, then multiply by a peak factor of around 3. For storage I multiply writes a day by bytes per item and by days kept. For bandwidth I multiply reads per second by response size. I round to one significant figure, write assumptions on the board, and then say what the number means: "about 100k reads a second, so we need a cache", or "7 PB a year, so blobs go to object storage, not the database".

What you’ll learn

  • Recall powers of two, seconds per day (round to 100,000) and the latency ladder from RAM to cross-continent
  • Turn daily active users into average and peak QPS in under a minute
  • Estimate storage and bandwidth, and split blobs from metadata
  • Use the read/write ratio to decide where caching and replicas go
  • Know when an estimate changes a decision, and when to skip it in one sentence

01Picture it first: estimates are a decision tool

Here's the best short example I know, from a talk Jeff Dean gave at LADIS 2009. The question was how long it takes to build an image results page of 30 thumbnails. Reading them one after another, each needing a disk seek of about 10 ms plus the read, came out at roughly 560 ms. Issuing the 30 reads in parallel came out at roughly 18 ms, which he noted was really more like 30 to 60 ms once you allow for variance.

In the real world

In Dean's "Numbers Everyone Should Know" slides (LADIS 2009), the serial design costs 30 seeks x 10 ms plus 30 x 256 KB read at 30 MB/s, about 560 ms. The parallel design costs one seek plus one read, about 18 ms. Neither number is precise. Both are good enough to show the parallel design wins by more than ten times, and that's the decision that mattered.

That's the attitude to bring into the room. You aren't producing a capacity plan. You're asking "is this one machine or a hundred?", "does it fit in memory?", "can one database take these writes?" A rough number answers each of those in under a minute.

02The numbers to know cold

You need three small tables in your head: powers of two for sizes, seconds in a period for rates, and latency orders of magnitude for "is this fast enough?".

Sizes: powers of two

Power Exact Roughly Unit
2^10 1,024 a thousand 1 KB
2^20 1,048,576 a million 1 MB
2^30 about 1.07 billion a billion 1 GB
2^40 about 1.1 trillion a trillion 1 TB
2^50 about 1.13 quadrillion a quadrillion 1 PB

In an interview, treat 1 KB as a thousand bytes and move on. The 2 to 13% error doesn't change any decision. The one place to be careful is bits versus bytes: network links are quoted in bits per second, so multiply bytes by 8.

Time: seconds in a period

  • 1 day = 86,400 seconds. Round it to 100,000. It makes division trivial. It undercounts the per-second rate by about 14%, which the peak factor more than covers.
  • 1 month ≈ 2.6 million seconds. 1 year ≈ 31.5 million seconds.
  • Shortcuts that fall out of this: 1 million a day ≈ 12 a second; 100 million a day ≈ 1,200 a second; 1 billion a day ≈ 12,000 a second.

Latency: orders of magnitude

These come from Peter Norvig's table, Jeff Dean's LADIS 2009 slides and Colin Scott's interactive version, which models how they change over the years. Treat them as orders of magnitude, not benchmarks. Real hardware varies, and the sources disagree slightly (Norvig lists a disk seek at 8 ms, Dean at 10 ms).

Fig. 1

Latency numbers on a log scale

Latency numbers on a log scaleHorizontal bars on a log scale from 1 nanosecond to 1 second. L1 cache reference 0.5 ns. Main memory reference 100 ns. SSD random read 16 microseconds. Read 1 MB sequentially from memory 250 microseconds. Round trip inside one data centre 0.5 ms. Disk seek 10 ms. Read 1 MB sequentially from disk 20 ms. Packet from California to the Netherlands and back 150 ms. Three bands group them: inside the CPU and memory, storage and the local network, and across the world.1 ns1 µs1 ms1 sL1 cache reference0.5 nsMain memory reference100 nsSSD random read16 µsRead 1 MB from memory250 µsRound trip in one data centre0.5 msDisk seek10 msRead 1 MB from disk20 msCalifornia to Netherlands and back150 msCPU and RAM: nanosecondsStorage and the local network: µs to msAcross the world: 100+ ms
Each band is about a thousand times slower than the one before. Memory is nanoseconds, the local network and storage are micro- to milliseconds, and crossing an ocean costs 150 ms whatever you do.
Operation Rough time Source
L1 cache reference 0.5 ns Norvig, Dean
Main memory reference 100 ns Norvig, Dean, Colin Scott
SSD random read 16 µs Colin Scott
Read 1 MB sequentially from memory 250 µs Norvig, Dean
Round trip inside one data centre 0.5 ms Dean, Colin Scott
Disk seek 8-10 ms Norvig (8), Dean (10)
Read 1 MB sequentially from disk 20 ms Norvig, Dean
Packet California to the Netherlands and back 150 ms Dean, Colin Scott

What to take from it: a network hop inside the data centre costs about 5,000 RAM reads, so a design that makes ten sequential service calls per request has spent 5 ms before doing any work. And a user on another continent pays around 150 ms per round trip before your servers do any work, which is why you put content near them with a CDN.

Availability: what the nines allow

From the availability table in Google's SRE book: 99.9% allows about 8.76 hours of downtime a year, 99.99% about 52.6 minutes, and 99.999% about 5.26 minutes. Each extra nine cuts the allowed downtime by a factor of ten, and usually means more replicas, more regions and more automation. Use this when you write non-functional requirements, so "highly available" turns into a target you can design for.

03The four calculations

Fig. 2

From daily users to the three numbers that drive a design

From daily users to the three numbers that drive a designA flow from left to right. Daily active users times actions per user gives requests per day. Dividing by about 100,000 seconds gives average requests per second, and multiplying by a peak factor gives peak requests per second, which decides how many servers and whether to cache. Writes per day times bytes per item gives storage per day, then per year, which decides sharding and storage tier. Reads per second times bytes per response gives bandwidth, which decides whether you need a CDN.Daily usersDAU, assumed1Requests a dayDAU x actions2Per second÷ ~100,000 sx peak factor3Peak QPSservers? cache?Storagewrites x bytesx 365 x years4TB per yearshard? which store?Bandwidthreads/s xresponse bytes5GB per secondCDN?
Every estimate ends in a question. Peak QPS decides servers and caching, storage decides sharding and the storage tier, bandwidth decides whether you need a CDN.

1. Requests per second. Daily active users x actions per user per day = requests a day. Divide by 100,000 for the average per second. Multiply by a peak factor for the busiest hour. I use 3 as a default and say it's an assumption; spiky products need much more (see the REAL block below).

2. Read/write ratio. Do the first calculation separately for reads and writes. The ratio shapes the whole design: read-heavy systems (100:1 or more) want caches, replicas and precomputed results; write-heavy systems want append-friendly storage, partitioning and queues to absorb bursts.

3. Storage. Writes a day x bytes per item x days kept. Split it by kind: small metadata rows (hundreds of bytes to a few KB) usually go in a database, while large blobs (images, video, files) go in object storage. Add replication on top if the interviewer cares: three copies triple the raw number.

4. Bandwidth. Reads per second x bytes per response gives egress. Multiply by 8 for bits per second. Ingress is the same calculation using writes and upload size.

Try it yourself first

Before reading the worked example, try it yourself. A photo-sharing app has 50 million daily users. Each uploads 0.2 photos a day on average and views 50 photos a day. A stored photo is about 2 MB, a feed-sized version about 200 KB, and its metadata about 1 KB. Work out write QPS, read QPS, storage a year and egress bandwidth. Give yourself 4 minutes.

04A worked example, start to finish

Here's how I'd lay it out on the board. Every row ends with the decision it drives; a number with no decision attached is wasted time.

What Roughly Decision it drives
Uploads a day 50M x 0.2 = 10M
Write QPS 10M / 100k ≈ 100/s average, ~300/s peak One primary database can take the metadata writes
Views a day 50M x 50 = 2.5B
Read QPS 2.5B / 100k ≈ 25k/s average, ~75k/s peak Too much for one database: cache feeds and photo metadata
Read/write ratio 2.5B / 10M = 250:1 Strongly read-heavy: precompute and cache the read path
Photo storage 10M x 2 MB = 20 TB a day, ≈ 7 PB a year Blobs go to object storage, never into the database
Metadata storage 10M x 1 KB = 10 GB a day, ≈ 3.6 TB a year Fits a sharded database comfortably; one day of it fits in a cache
Egress 25k/s x 200 KB ≈ 5 GB/s ≈ 40 Gbps average Serve images from a CDN, not from our servers

A few things to notice. I used 100,000 seconds a day, so 2.5 billion became 25,000 a second (the exact figure is about 29,000; the decision is identical). I kept each line to one significant figure. And the photo storage line changed the architecture: at 7 PB a year, the question isn't "which database?", it's "object storage plus a metadata database".

Performance angle

The bandwidth row is the one candidates most often skip, and it's the one that justifies the CDN. About 40 Gbps on average, and roughly three times that at peak, is a lot of traffic to serve from your own origin. A CDN serves popular images from edge locations near users, so the origin only sees the misses.

05Peaks are where systems break

The average is a comfortable number. The peak is the one your system has to survive. A peak factor of 2 to 3 is a sensible default for products with smooth daily cycles. Products tied to live events can spike far higher.

In the real world

Twitter's engineering blog reported in 2013 that it normally took in more than 500 million Tweets a day, about 5,700 a second on average. During a TV airing of Castle in the Sky in Japan it hit a one-second peak of 143,199 Tweets per second, about 25 times the steady state. A design sized for the average, or even 3x the average, would have fallen over.

So when the prompt involves live events (sports scores, ticket sales, flash sales, live comments), say so: "This is spiky. I'll design for 10 to 25 times the average, and plan to absorb bursts with a queue rather than provisioning for the peak all the time." See Queues and event streams for how that works.

06When estimates matter, and when to skip them

Estimates earn their minutes when the answer could go either way. Some decisions that depend on a number:

  • One machine or many? If the write rate is 100 a second, one primary is fine. At 100,000, you're partitioning.
  • Does it fit in memory? 10 GB of hot metadata fits in one cache node. 3.6 TB doesn't fit in one, so you'd shard it or cache only the hot slice.
  • How long must the key be? The URL shortener needs 365 billion codes, so 6 base62 characters (about 57 billion) is too few and 7 (about 3.5 trillion) is enough.
  • Do we need a CDN? Tens of gigabits per second of media says yes.
  • Is this latency budget possible? Five sequential cross-region calls can't fit in a 200 ms budget at 150 ms each.

Skip the maths, or keep it to one sentence, when no plausible number would change the design. If the interviewer has already told you "assume Twitter scale", the conclusion (shard, cache, replicate) is obvious, and ten minutes of multiplication shows nothing new. Same if the interesting part of the problem is correctness, like a distributed lock, rather than volume. In those cases I'd say: "I'll assume roughly 100 million daily users and 10k requests a second at peak. I'll come back to the maths if a decision depends on it."

Where candidates slip

Many candidates spend 10 to 15 minutes on careful estimates, with exact products and unit conversions, and then never refer to the numbers again. That costs you twice: time you needed for deep dives, and a signal that you estimate out of habit rather than for a reason. Keep estimates under 3 minutes, round to one significant figure, and finish every number with "so we need...". If you can't finish that sentence, skip the number.

A few smaller traps worth avoiding:

  • Forgetting the peak. Average QPS is not what you provision for.
  • Mixing bits and bytes. 5 GB/s is 40 Gbps, not 5 Gbps.
  • Doubling up precision. "28,935 QPS" sounds less senior than "about 30k", not more.
  • Inventing hardware limits as facts. If you need "requests per server", say it's an assumption ("say one server handles a few thousand of these a second") and invite the interviewer to adjust it.

07How to say it in the interview

When I ask for an estimate, I'm listening for three things: clear assumptions, quick rounding, and a decision at the end. I don't check your arithmetic to the last digit. I do notice if 2.5 billion divided by 100,000 comes out as 2,500.

In the interview

"Let me do a quick estimate, because it decides whether we need object storage and a CDN. I'll assume 50 million daily users, each uploading 0.2 photos and viewing 50 a day. That's 10 million uploads, about 100 a second, and 2.5 billion views, about 25,000 a second on average, so maybe 75,000 at peak. Reads outnumber writes 250 to 1, so the read path gets the caching. Photos at 2 MB are 20 TB a day, about 7 PB a year, so they go to object storage with metadata in a database. Serving 200 KB images at 25,000 a second is about 40 gigabits a second, so images come from a CDN. Those are the three decisions; I'll move on to the design."

On the whiteboard

  • 1 day ≈ 10^5 s · 1M/day ≈ 12/s · peak ≈ 3x (live events 10-25x)
  • 2^10 KB · 2^20 MB · 2^30 GB · 2^40 TB · 2^50 PB · bytes x 8 = bits
  • RAM 100 ns · SSD 16 µs · DC RTT 0.5 ms · seek ~10 ms · intercontinental 150 ms
  • 99.9% ≈ 8.8 h/yr · 99.99% ≈ 53 min/yr · 99.999% ≈ 5 min/yr
  • QPS = DAU x actions / 10^5 x peak
  • Storage = writes/day x bytes x days · Bandwidth = reads/s x bytes
  • Every number ends with "so we need..."
Further reading (7)