← All articles

Powers of two and back-of-the-envelope estimation

Updated Nov 8, 2026 · 3 min read

An estimate tells you which problem you actually have. Ten gigabytes fits on one machine; ten petabytes does not. Two hundred requests a second is one server; two hundred thousand is a fleet. You only need to be right to within a factor of two or so to make those calls, which means you can do it on a napkin with a few memorized constants.

Powers of two

Each step of 2¹⁰ is close to a step of 1,000, which is why the binary and decimal units line up so neatly.

PowerExact valueRoughlyUnit
2¹⁰1,024a thousandKB
2²⁰1,048,576a millionMB
2³⁰1,073,741,824a billionGB
2⁴⁰~1.1 × 10¹²a trillionTB
2⁵⁰~1.1 × 10¹⁵a quadrillionPB

A few more are worth knowing because limits hide behind them:

  • 2⁸ = 256: the values in one byte.
  • 2¹⁶ = 65,536: the number of TCP ports on one IP address.
  • 2³² ≈ 4.3 billion is the ceiling of an unsigned 32-bit integer. A table with a 32-bit id column runs out here, and signed ids run out at half of it (~2.1 billion).
  • 2⁶⁴ ≈ 1.8 × 10¹⁹: effectively unlimited for ids. A 64-bit counter at a million per second lasts over half a million years.

Time constants

PeriodSecondsRound to
1 day86,400100,000 (10⁵)
1 month~2.6 million2.5 million
1 year~31.5 million30 million
5 years~1,825 days2,000 days

Rounding a day up to 100,000 seconds makes per-second rates a matter of dropping five zeros. It runs about 15% low, which is fine for planning and easy to correct for if you need to.

  • 1 million a day ≈ 12 a second.
  • 100 million a day ≈ 1,200 a second.
  • 1 billion a day ≈ 12,000 a second.

The method

  1. Write down the inputs and their units, like users, actions per user per day, bytes per record, how long you keep data.
  2. Round every input to one or two significant figures before you multiply.
  3. Multiply counts first, then sizes, then time. Track powers of ten separately from the leading digits.
  4. Turn daily totals into per-second averages, then multiply by a peak factor (2–10× depending on how spiky traffic is).
  5. Add overheads last, like replication (often 3×), indexes and headroom.
  6. Sanity-check the result against something you know. Does it fit on one disk? One server? One rack?
Inputsusers × actionsPer daycounts × sizesPer second÷ 100,000At peak× 2–10With overheads× 3 copiesSanity checkone disk? one box?
The method as a pipeline. Counts, then time, then peaks and overheads, then a sanity check.

A worked example with a URL shortener

Say the service creates 10 million links a day, keeps them for 5 years, and stores about 500 bytes per link (the long URL, the code, a timestamp and an owner id).

StepWorkingResult
Links kept10 M/day × 365 × 5~18 billion
Raw bytes18 × 10⁹ × 500 B~9 × 10¹² B ≈ 9 TB
Shortcut10 M × 2,000 days × 500 B10 TB (about 10% high)
With 3× replication9 TB × 3~27 TB
Storage
StepWorkingResult
Writes per second10 M ÷ 100,000~100/s (exact: ~116/s)
Reads per second at 100 reads per write100 × 116~12,000/s
Peak reads at 3× average12,000 × 3~35,000/s
Read bandwidth at 500 B each35,000 × 500 B~17 MB/s
Traffic

Those numbers already shape the design. Nine terabytes is too much for one comfortable database node, so you plan for sharding or a store that shards for you. Thirty-five thousand reads a second is a lot for a database but easy for a cache, so the cache does most of the work. And 18 billion links is more than 32-bit ids can count, so ids are 64-bit.

Raw bytes, 5 years~9 TB
Rounded to 2,000 days10 TB
With 3× replication~27 TB
The storage estimate, step by step. Replication is the step people forget.

Common mistakes

  • Dropping units halfway through. Write them on every line and cancel them like algebra.
  • Planning for the average. Capacity is set by the peak, and failover makes a peak hit fewer machines.
  • False precision. "About 9 TB" is more honest and more useful than "9.125 TB".
  • Forgetting copies. Replicas, backups and indexes often double or triple raw size.