Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Estimation Shortcuts
HLD

Estimation Shortcuts

The mental math cheat sheet — time constants, unit conversions, and arithmetic tricks that make back-of-envelope work fast.

Why Shortcuts Matter

Back-of-envelope estimation is a speed game: conclusions within 2x of truth, produced in seconds, while the interviewer watches. Precision is the enemy; these constants are the toolkit.

Time Constants

 1 hour    = 3,600 s      ≈ 4 × 10³ s
 1 day     = 86,400 s     ≈ 10⁵ s          ← the single most-used constant
 1 month   ≈ 2.6 × 10⁶ s  ≈ 30 × 10⁵
 1 year    ≈ 31.5M s      ≈ 3 × 10⁷ s

 THE conversion everyone uses:
   X million events/day ÷ 10⁵ = X × 10 rps average
   100M/day → ~1,000 rps average (true value 1,157 — close enough)

The rps-per-Million Table

Precomputed from the day constant:

Daily volumeAverage rateWith 2.5x peak
1M/day~12/s~30/s
10M/day~120/s~300/s
100M/day~1,200/s~3,000/s
1B/day~12,000/s~30,000/s

Memorize one row’s logic; regenerate all others instantly.

Storage Flow Constants

 sustained write flow → daily accumulation:
   1 MB/s  writes for a day  ≈ 86 GB/day
   1 KB record at 1k/sec       ≈ 86 GB/day
   
 yearly: X GB/day × 365 ≈ X × 0.37 TB/year
   20 GB/day → ~7 TB/year ✓ (RideShare trips check)

 replication multiplier quick table:
   RF=3 → ×3 storage and ×3 write bandwidth
   erasure coding (8+3)-ish → ~×1.4 storage

Unit Conversion Anchors

 bits↔bytes:  divide by 8 (networks bits, payloads bytes)
 1 Gbps       = 125 MB/s
 powers of 2: 2¹⁰≈10³, 2²⁰≈10⁶, 2³⁰≈10⁹, 2³²≈4×10⁹
 percentages: 5% of 1M = 50k (move decimal + halve... 5% = /20)

Arithmetic Tricks Under Pressure

 round aggressively FIRST:  17.3 GB × 46 days → 20 × 50 = 1,000 GB
 keep ONE significant digit per factor
 track exponents separately: (2×10⁷ × 3×10³) = 6×10¹⁰
 sanity-anchor results against known systems:
   "Twitter-scale reads" ≈ hundreds of thousands rps
   "one Postgres"        ≈ thousands of reads/sec

The last trick catches most errors: if your estimate says a URL shortener needs 500 database nodes, an anchor comparison flags the arithmetic slip before the interviewer does.

A Complete Worked Example in 30 Seconds

Prompt: image host, 10M uploads/day, avg 2 MB.

 storage/day  = 10⁷ × 2 MB            = 20 TB/day (!)
              → this is a CDN + object-storage design instantly
 egress guess = views ≈ 10x uploads by count, similar bytes class
              → hundreds of Gbps → CDN mandatory
 metadata     = 10⁷ × 200 B           = 2 GB/day → trivial DB load
 
 three numbers, three architecture decisions, half a minute

Interview Framing

Interviewers grade method speed, not decimal places. Speaking pattern that scores: constant stated (“a day is about 10 to the fifth”), rounded multiplication aloud, anchor-check, conclusion bound to a decision. Practiced fluency here buys credibility minutes later when the hard trade-offs need the remaining clock.

My Private Notes

Notes are auto-saved locally to this device.