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.
| Power | Exact value | Roughly | Unit |
|---|---|---|---|
| 2¹⁰ | 1,024 | a thousand | KB |
| 2²⁰ | 1,048,576 | a million | MB |
| 2³⁰ | 1,073,741,824 | a billion | GB |
| 2⁴⁰ | ~1.1 × 10¹² | a trillion | TB |
| 2⁵⁰ | ~1.1 × 10¹⁵ | a quadrillion | PB |
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
| Period | Seconds | Round to |
|---|---|---|
| 1 day | 86,400 | 100,000 (10⁵) |
| 1 month | ~2.6 million | 2.5 million |
| 1 year | ~31.5 million | 30 million |
| 5 years | ~1,825 days | 2,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
- Write down the inputs and their units, like users, actions per user per day, bytes per record, how long you keep data.
- Round every input to one or two significant figures before you multiply.
- Multiply counts first, then sizes, then time. Track powers of ten separately from the leading digits.
- Turn daily totals into per-second averages, then multiply by a peak factor (2–10× depending on how spiky traffic is).
- Add overheads last, like replication (often 3×), indexes and headroom.
- Sanity-check the result against something you know. Does it fit on one disk? One server? One rack?
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).
| Step | Working | Result |
|---|---|---|
| Links kept | 10 M/day × 365 × 5 | ~18 billion |
| Raw bytes | 18 × 10⁹ × 500 B | ~9 × 10¹² B ≈ 9 TB |
| Shortcut | 10 M × 2,000 days × 500 B | 10 TB (about 10% high) |
| With 3× replication | 9 TB × 3 | ~27 TB |
| Step | Working | Result |
|---|---|---|
| Writes per second | 10 M ÷ 100,000 | ~100/s (exact: ~116/s) |
| Reads per second at 100 reads per write | 100 × 116 | ~12,000/s |
| Peak reads at 3× average | 12,000 × 3 | ~35,000/s |
| Read bandwidth at 500 B each | 35,000 × 500 B | ~17 MB/s |
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.
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.