Number estimation, often called back-of-the-envelope math, is a quick rough calculation that tells you how big a system is. How many requests per second? How much storage after five years? The point is not the exact number. The point is to find out which parts of the design are under pressure, so you know where to spend your time.
You don't have to get it right. Nobody expects exact numbers. Round hard, use powers of ten, and say your assumptions out loud. If you can't remember a number at all, describe the scale in plain words instead: "this is billions of rows, so it won't fit on one machine" is a good answer. The interviewer is checking your reasoning, not your arithmetic.
When to estimate#
Estimate only when the answer changes a decision. In the Interview Approach, this happens in step 2, right after the non-functional requirements. A few questions are worth a number:
| Question | The decision it settles |
|---|---|
| How many writes per second? | Whether one database can take the writes, or you need sharding or a queue |
| How many reads per second? | Whether you need a cache, read replicas or a CDN |
| How much data in total? | Whether it fits on one machine, or must be split across many |
| How much bandwidth? | Whether large files must go through a CDN or blob storage |
If an estimate won't change anything, skip it and say so: "The writes are tiny, so I won't size them."
Numbers worth remembering#
You only need a few numbers, and each one only roughly. Everything else you can work out from these.
Time#
| Period | Exact | Round to |
|---|---|---|
| 1 day | 86,400 seconds | 100,000 (10⁵) |
| 1 month | about 2.6 million seconds | 2.5 million |
| 1 year | about 31.5 million seconds | 30 million |
The day is the one that matters. Dividing by 100,000 turns "per day" into "per second":
| Per day | Per second (average) |
|---|---|
| 1 million | about 10 |
| 100 million | about 1,000 |
| 1 billion | about 10,000 |
Sizes#
Each unit is 1,000 times the one before. Matching the units to the counting words keeps the math easy: a million things of 1 KB each is 1 GB.
| Unit | Bytes | Counting word |
|---|---|---|
| KB | 10³ | thousand |
| MB | 10⁶ | million |
| GB | 10⁹ | billion |
| TB | 10¹² | trillion |
| PB | 10¹⁵ | quadrillion |
Typical sizes of things, all rough:
| Thing | Size |
|---|---|
| A character (ASCII), a boolean | 1 byte |
| An integer, a timestamp | 4–8 bytes |
| A UUID | 16 bytes |
| A short text record, like a message or a database row | a few hundred bytes to 1 KB |
| A compressed photo | a few hundred KB to a few MB |
| One minute of HD video | tens of MB |
Speed#
These are orders of magnitude, not exact figures. They change with hardware, but the gaps between them stay about the same.
| Operation | Time |
|---|---|
| Read from memory | about 100 nanoseconds |
| Random read from an SSD | about 100 microseconds |
| Disk seek on a spinning hard drive | about 10 milliseconds |
| Round trip inside one data center | about 0.5 milliseconds |
| Round trip across a continent or an ocean | about 100 milliseconds |
The lesson in this table: memory is about 1,000 times faster than an SSD, and a trip across the world costs more than almost anything you do inside one data center. That's why caches live in memory and CDNs put content near users.
What one machine can do#
Rough capacities for a single, well-sized machine. They vary a lot with the workload, so treat them as "is this obviously fine or obviously not?" checks.
| Component | Roughly handles |
|---|---|
| Web or app server, simple requests | thousands of requests per second |
| Relational database, simple writes | a few thousand to around 10,000 writes per second |
| In-memory cache like Redis | around 100,000 operations per second |
| Memory on one server | tens to hundreds of GB |
| Storage for one database | up to a few TB before it gets hard to manage |
The method#
Every estimate follows the same four steps. Write each line on the board so the interviewer can follow, and correct, your assumptions.
- Start from users. Daily active users (DAU), and how many times each one does the action per day.
- Turn it into per second. Actions per day ÷ 100,000.
- Plan for the peak. Multiply the average by 2 to 10, depending on how spiky the traffic is.
- Size the data. Storage = items per day × size of one item × days kept. Bandwidth = requests per second × size of one response.
Then say what the number means for the design. A number with no conclusion is wasted time.
Worked example#
Take an online course platform with video lessons. Assume 10 million registered students, of whom 1 million are active each day.
Requests.
- Each active student watches about 5 lessons a day: 1 million × 5 = 5 million lesson views a day.
- 5 million ÷ 100,000 = about 50 views per second on average.
- Evenings are busy, so assume 5× at peak: about 250 views per second.
- Conclusion: a few app servers handle this easily. Request count is not the hard part.
Storage.
- Assume 100,000 lessons, about 10 minutes each, at tens of MB per minute: roughly 500 MB per lesson.
- 100,000 × 500 MB = 50 TB of video, before keeping several quality levels.
- Conclusion: far too much for a database. Video goes in blob storage, and only the metadata goes in the database.
Bandwidth.
- An HD stream is a few megabits per second. 250 streams at peak × about 5 Mbps = about 1.25 Gbps out.
- Conclusion: serve video from a CDN, so this traffic never hits your own servers.
Three short estimates, three decisions: the app tier stays small, video goes to blob storage, and delivery goes through a CDN.
When you can't remember the numbers#
Forgetting a figure in the moment is normal. You can still reason about scale in plain words, as long as you land on a decision. Describe which bracket the system falls in:
The same works for traffic:
| What you can say | What it means for the design |
|---|---|
| "A few requests a second, like an internal tool" | One server and one database. Don't over-build |
| "Thousands a second, like a popular app" | Several stateless servers behind a load balancer, maybe a cache |
| "Hundreds of thousands a second, like a global service" | Caching everywhere, replicas, sharding, CDNs |
| "Reads far outnumber writes" | Optimize the read path: caches and replicas |
| "Every user writes constantly" | Optimize the write path: sharding, queues, batching |
Saying "I don't remember the exact number, but this is clearly billions of rows, so we'll need to shard" is a strong answer. It shows the judgment the estimate was meant to produce.
Common mistakes#
Most estimation mistakes come from treating it as a math test instead of a design tool:
| Mistake | Fix |
|---|---|
| Chasing precision, like 86,400 instead of 100,000 | Round to one significant figure and powers of ten |
| Estimating everything | Only estimate what changes a decision |
| A number with no conclusion | End every estimate with "so we need…" or "so we don't need…" |
| Silent math | Say each assumption out loud so the interviewer can adjust it |
| Forgetting the peak | Size for peak traffic, not the daily average |
| Freezing on a forgotten number | Describe the scale in plain words and move on |
Key takeaways#
- Estimation tells you which parts of the design are under pressure. Exact numbers don't matter.
- You don't have to get it right. Round hard, state assumptions, and describe the scale in plain words if you forget a number.
- Estimate only when the answer changes a decision.
- One day ≈ 100,000 seconds, so 1 million a day ≈ 10 a second.
- KB, MB, GB, TB line up with thousand, million, billion, trillion.
- Memory is about 1,000 times faster than an SSD. A cross-world round trip is about 100 ms.
- Method: users → per second → peak → storage and bandwidth → a decision.