Part 4 · 2 chapters · ~12 min

Estimation and Back-of-Envelope Maths

Fermi estimation, orders of magnitude, ranges instead of points, the numbers worth memorising, estimating systems (QPS, storage, cost), estimating projects with reference classes, and sanity-checking every number you are given.

8

Fermi problems

Enrico Fermi famously estimated quantities with almost no data by breaking them into factors. Engineers use the same move for capacity planning, cost forecasting and sanity checks (Backend System Design part 0 lists the numbers worth memorising).

A FERMI ESTIMATE
how many POS card transactions happen in Nigeria on a weekday? (structure, not a fact)
questionPOS transactions per weekdayactive terminals~1.5-2M (assume)transactions per terminal~20-40/day (assume)estimate30M-80M/daysanity checkcompare with published figures
swipe the figure sideways, or tap expand for full screen
1/4
decompose
Break the unknown into factors you can estimate: number of active terminals × transactions per terminal per day.
unknown = product of guessable factorseach factor easier than the whole
9

Estimating projects

techniquehow
reference classhow long did the last three similar projects take? start there
break down, then add contingencyestimate parts, then add for integration, review, unknowns (often 30-50%)
ranges with confidence"4-7 weeks, 80% confident"
re-estimate on new informationupdate weekly; an estimate is a forecast, not a promise
spike the unknownsa two-day spike can shrink a range from 2-12 weeks to 3-5