Lesson 3 of 19
2. Back-of-Envelope Estimation

2.2 Which units and sizes should you know?

3 min read+10 XP

At the wedding: You think in useful units: a plate per guest, a kilo of rice per 10 people, a sack is 25 kilos. Nobody counts grains.

In the system: You need a ladder of units, each 1,000 times bigger than the last:

UnitBytes (decimal, used in estimates)Close power of 2
KB (kilobyte)1,0002¹⁰ = 1,024
MB (megabyte)1,000,000 (a million)2²⁰ ≈ 1.05 million
GB (gigabyte)a billion2³⁰ ≈ 1.07 billion
TB (terabyte)a trillion2⁴⁰ ≈ 1.1 trillion
PB (petabyte)a thousand trillion2⁵⁰ ≈ 1.13 thousand trillion

Why both columns? Memory and computers count in powers of 2 (1 KB = 1,024 bytes). Estimates use round thousands. The gap is under 13% even at PB, which never changes a design decision, so use 1,000 and move on.

Sizes worth knowing by heart:

ThingRough size
One character of English text (ASCII)1 byte
An integer4 bytes
A long integer or a timestamp8 bytes
A UUID16 bytes
A short text message or a database row of metadata100 bytes to 1 KB
A compressed photoa few hundred KB to a few MB

The last two rows depend on the product, so say your assumption out loud: "I'll assume 2 MB per uploaded photo."

Memory code: "King Midas Gave Tea Parties." KB, MB, GB, TB, PB. Each one is a thousand times the last.