Design FundamentalsBack-of-the-envelope CalculationsEasy⏱️ ~3 min

What are Back of the Envelope Calculations and Why Do They Matter?

Definition
Back-of-the-envelope calculations are quick, rough estimates using simple math and memorized numbers to validate whether a system design is feasible before investing in detailed analysis. They answer: "Is this approach even in the right ballpark?"

Why Quick Estimates Matter

Detailed capacity planning takes weeks. Back-of-envelope takes minutes. In design discussions and interviews, you need to rapidly validate assumptions. Can a single database handle this load? Do we need a cache? How many servers? Quick math gives you directionally correct answers to frame the design.

The goal is not precision. The goal is detecting orders of magnitude problems. If your estimate says you need 10 servers and reality needs 12, you are fine. If your estimate says 10 and reality needs 1000, you have a fundamental design flaw.

The Estimation Process

Step 1: Clarify the scale. How many users? How many requests per second? How much data? Get concrete numbers or state assumptions explicitly.

Step 2: Break down into components. A "user request" might involve: load balancer, application server, cache lookup, database query, response formatting. Estimate each separately.

Step 3: Apply memorized benchmarks. A single database handles about 10,000 queries/sec for simple lookups. An application server handles about 1,000 requests/sec for complex operations. An in-memory cache (like Redis, which stores data in RAM for fast access) handles about 100,000 ops/sec.

Step 4: Check for sanity. If you calculate needing 1000 database servers for 1 million users, something is wrong. Real systems serve millions with far fewer machines.

Common Estimation Anchors

Memory: 1 million users × 1KB = 1GB. Fits in RAM. 1 billion users × 1KB = 1TB. Needs distributed storage.

Storage: 1M posts/day × 1KB × 365 = 365GB/year. Add images at 1MB each: 365TB/year.

Traffic: 1M requests/day ÷ 100k seconds ≈ 10 requests/sec. 1B requests/day ≈ 10,000 requests/sec.

Key Insight: Round aggressively. 86,400 seconds/day becomes 100,000 for easy math. Close enough to validate a design.
💡 Key Takeaways
Back-of-envelope catches order of magnitude errors early; if estimate says 10 servers but reality needs 1000, you have a design flaw
Four step process: clarify scale, break into components, apply benchmarks (DB ~10k QPS, server ~1k RPS, Redis ~100k ops/sec), sanity check
Round aggressively using powers of 2 and 10; precision does not matter, directional correctness does
Always state assumptions explicitly; interviewers care about your reasoning process, not memorized numbers
📌 Interview Tips
1Start every capacity discussion by stating scale assumptions: 10M users, 10% daily active, 5 requests per session = 5M requests/day = ~60 RPS average
2When asked if a design works, immediately do quick math: 60 RPS is trivial for a single server, no need for complex scaling
3Show your work out loud; saying 'million divided by 100k seconds per day gives about 10 RPS' demonstrates structured thinking
← Back to Back-of-the-envelope Calculations Overview