Two ways to count: 1,000 and 1,024
In the International System of Units a kilo is 1,000, a mega 1,000,000 and so on. The SI Brochure is explicit: SI prefixes “refer strictly to powers of 10. They should not be used to indicate powers of 2 (for example, one kilobit represents 1000 bits and not 1024 bits).” Computers, though, count memory in powers of two, so for decades “kilobyte” also meant 1,024 bytes. To end the ambiguity the International Electrotechnical Commission approved separate binary prefixes in December 1998 — kibi (Ki), mebi (Mi), gibi (Gi) and so on, each 1,024 times the last — and the 2025 edition of IEC 80000-13 extended them to robi (Ri, 2⁹⁰) and quebi (Qi, 2¹⁰⁰).
| Decimal (SI) | Bytes | Binary (IEC) | Bytes | Binary is bigger by |
|---|---|---|---|---|
| kilobyte (kB) | 1,000 | kibibyte (KiB) | 1,024 | 2.4% |
| megabyte (MB) | 1,000,000 | mebibyte (MiB) | 1,048,576 | 4.9% |
| gigabyte (GB) | 10⁹ | gibibyte (GiB) | 1,073,741,824 | 7.4% |
| terabyte (TB) | 10¹² | tebibyte (TiB) | 2⁴⁰ | 10.0% |
| petabyte (PB) | 10¹⁵ | pebibyte (PiB) | 2⁵⁰ | 12.6% |
| exabyte (EB) | 10¹⁸ | exbibyte (EiB) | 2⁶⁰ | 15.3% |
| zettabyte (ZB) | 10²¹ | zebibyte (ZiB) | 2⁷⁰ | 18.1% |
| yottabyte (YB) | 10²⁴ | yobibyte (YiB) | 2⁸⁰ | 20.9% |
| ronnabyte (RB) | 10²⁷ | robibyte (RiB) | 2⁹⁰ | 23.8% |
| quettabyte (QB) | 10³⁰ | quebibyte (QiB) | 2¹⁰⁰ | 26.8% |
The old habit hasn’t gone. JEDEC, the semiconductor standards body, still defines kilo, mega and giga as 1,024-based “as a prefix to units of semiconductor storage capacity”, noting the definitions are “included only to reflect common usage” — which is why a “16 GB” memory module holds 16 GiB. Ronna and quetta, the decimal prefixes for 10²⁷ and 10³⁰, were added to the SI in 2022, partly, the resolution says, for “the needs of data science”.
Why a 1 TB drive shows as 931 GB
Drive makers count in decimal. Western Digital’s capacity notice reads: “one gigabyte (GB) is equal to 1,000MB (one billion bytes), and one terabyte (TB) is equal to 1,000GB (one trillion bytes)”; Samsung cites the IDEMA standard for the same definition. Windows counts the same bytes in 1,024s but keeps the KB, MB, GB and TB labels — Seagate’s support article lists “FDISK, system BIOS, Windows, and older versions of macOS” as using the binary system, and a Microsoft engineer’s blog explains that Explorer “continues to use the abbreviation KB” for 1,024 bytes “just following existing practice”.
| On the box | Bytes | Windows shows | macOS shows |
|---|---|---|---|
| 128 GB | 128,000,000,000 | 119 GB | 128 GB |
| 500 GB | 500,000,000,000 | 465 GB | 500 GB |
| 1 TB | 1,000,000,000,000 | 931 GB | 1 TB |
| 2 TB | 2,000,000,000,000 | 1.81 TB | 2 TB |
| 4 TB | 4,000,000,000,000 | 3.63 TB | 4 TB |
Nothing is missing: both columns are the same bytes. Apple says its systems used binary units only up to “iOS 10 and earlier and OS X Leopard and earlier”; since then macOS and iOS count like the box. Android’s size formatter has used decimal units since Android 8. On Linux it depends on the command — df -h counts in 1,024s, df -H in 1,000s. The space you can actually use is a little less again, after formatting and the operating system, as every maker’s small print notes.
Counting explains a gap of about 7% at gigabyte scale and 9% at terabyte scale — and only that. On Super User, where “931 GB” turns up in dozens of questions, the accepted answer to one explains why a typical “500 GB” drive holds exactly 500,107,862,016 bytes: the IDEMA standard sets the sector count, which works out to 1,000,204,886,016 bytes for 1 TB. A freshly formatted 1 TB NTFS drive in another Super User question showed just 118 MiB used, so claims that file systems take “5% or so” are far off. If half a drive is missing — “1 TB shows 465 GB” — the cause is a partition, a second volume or a faulty drive, not the units; the “Is anything really missing?” box in the Drive size tab tells the two apart. Consoles count the same way: a Reddit post on the Nintendo Switch 2 found 249 of its 256 GB available to the user — which the console displays as 232 “GB”, really 232 GiB.
Some common answers online are simply wrong: a 1 TB drive is not “really 750 GB”, the binary system is base 2, not “base 8”, and iPhones have not counted in binary since iOS 11.
The difference has reached court. In 2006 Western Digital settled a US class action that alleged its 80 GB drive held 74.4 GB, by offering buyers free backup software and promising a clearer disclaimer, the Associated Press reported; in 2007 Seagate offered a 5% cash refund or free backup software to settle a similar case, according to The Register.
Bits, bytes and Mbps
A byte is 8 bits. Storage is sold in bytes (B); connections are sold in bits per second (bit/s, or Mbps for megabits). The US FCC’s broadband guide, for example, lists download speeds in “Megabits per second, or Mbps”. So a 100 Mbps connection moves at most 12.5 megabytes a second, and a 1 Gbps line 125 MB/s. Speeds use decimal prefixes — JEDEC’s own dictionary gives “a 1-kb/s data transfer rate, which is equal to 1000 bits per second”.
| Link | Rated speed | In bytes |
|---|---|---|
| USB 2.0 | 480 Mbps | 60 MB/s |
| USB 5Gbps / 10Gbps / 20Gbps | 5 / 10 / 20 Gbps | 625 / 1,250 / 2,500 MB/s |
| USB4 (80 Gbps cables) | up to 80 Gbps | 10 GB/s |
| Thunderbolt 5 | 80 Gbps, up to 120 Gbps with Bandwidth Boost | 10–15 GB/s |
| SATA III | 6 Gb/s | 600 MB/s after 8b/10b encoding |
| PCIe 6.0 x16 | 64 GT/s per lane | up to 256 GB/s |
Rated speeds are line rates, not what files move at. SATA-IO says plainly that “not all 600MB/s are realized as the user data payload because the protocol includes other data and handshaking”. On a network, the headers TCP, IP and Ethernet add to every standard 1,500-byte packet leave about 95% of the line rate for data (1,460 of 1,538 bytes, by our arithmetic); the converter’s “network overhead” box uses that figure. Converter sites that knock off 10% or quote “60–80%” give no source.
Mixing the two is the most common question of all. “Why is my actual download speed less than that found by speedtest.net?” has been viewed more than 200,000 times on Super User; the answer is that the speed test reports bits and the download meter bytes. Steam, browsers and most download managers show MB/s, so a 600 Mbps plan should show about 75 MB/s at best — not the 60 that a “divide by 10” rule of thumb gives. Two other caps turn up again and again on r/HomeNetworking: a computer or cable that links at only 100 Mbps, which tops out around 11–12 MB/s however fast the plan, and a Wi-Fi “link rate” that is far above the real throughput.
How long will a download take?
Time = size × 8 ÷ speed in bits per second. A 1 GB file at 100 Mbps takes 80 seconds at best; a 50 GB game at 500 Mbps takes 13 minutes 20 seconds. In August 2026 Ookla’s Speedtest Global Index put the world’s median fixed broadband download speed at 129.68 Mbps and mobile at 109.05 Mbps, so a 1 GB file is about a minute on a median home connection. Real downloads usually take longer than the arithmetic: the server, Wi-Fi and everything else on the line share the speed.
Data transfer rate to file size
Run the sum the other way — size = rate × time ÷ 8 — and a bitrate becomes a file size or a data allowance. One hour at 100 Mbps is 45 GB. Services publish the figures:
- Netflix: up to 1 GB an hour in standard definition, up to 3 GB in HD and up to 7 GB in 4K, which needs 15 Mbps or more.
- YouTube recommends 5 Mbps for 1080p and 20 Mbps for 4K — about 2.25 GB and 9 GB an hour at those rates.
- Spotify’s Very high quality is about 320 kbit/s, roughly 144 MB an hour; Normal, at 96 kbit/s, about 43 MB.
- Zoom uses about 1.2 Mbps each way for a one-to-one 720p call; Microsoft says Teams can deliver HD video in under 1.5 Mbps.
Converting data sizes in Excel and Google Sheets
Divide by the factor: =A1/1024^3 turns bytes into GiB (what Windows calls GB) and =A1/10^9 into decimal GB. Excel’s CONVERT function knows both — =CONVERT(A1,"byte","Gbyte") and =CONVERT(A1,"byte","Gibyte") — but its unit names are case-sensitive and kibi is written with a lowercase “ki”. To keep bytes in the cell and only display a larger unit, use a custom number format: Microsoft explains that “a comma that follows a digit placeholder scales the number by 1,000”, so 0.00,,," GB" shows bytes as decimal gigabytes. Commas only divide by 1,000, so the binary units need a formula. Google Sheets scales by commas the same way. The “Formulas” tab writes the formula for any pair.
Beware the most-copied answer. The accepted Stack Overflow answer to “How can I format bytes a cell in Excel as KB, MB, GB etc?” — over 250,000 views — uses exactly these commas, so it divides by 1,000, not 1,024, and its thresholds label 600,000 bytes as “1 MB”. If the bytes come in as text with units (“10GB 102MB”), convert each part to bytes first, then add.
File sizes in the terminal: ls on a Mac and on Linux
On a Mac, ls -l lists sizes in bytes and ls -lh adds B, K, M and G suffixes — “using base 2 for sizes”, as Apple’s ls manual puts it. So a file Finder reports as 1 MB shows as about 977K in ls -lh: Finder counts in 1,000s. For kilobytes, divide the byte count by 1,024 to match ls, or by 1,000 to match Finder; du -sk gives a folder’s size in 1,024-byte units, and stat -f%z file the exact bytes.
GNU coreutils on Linux works the same way by default: -h uses powers of 1024 and --si powers of 1000. A size letter on its own or with “iB” means 1,024s and one followed by “B” means 1,000s, so --block-size=K and --block-size=KB differ by 2.4%. df and du round up, which is why a 1 TB drive shows as 932G in df -h. One trap: df -H means --si, but du -H means something else entirely (follow symbolic links), so use du --si. To sort the human-readable output, use sort -h; to turn a byte count into K, M and G, numfmt --to=iec (or --to=si).
When df, du and Finder disagree about free space it is rarely the units. Answers on Ask Ubuntu and Unix & Linux Stack Exchange trace it to deleted files that a program still holds open, and on a Mac to local Time Machine snapshots and “purgeable” space that Finder counts as free.
Formatting sizes in code
“Correct way to convert size in bytes to KB, MB, GB in JavaScript” has over 600,000 views on Stack Overflow, and the bugs repeat across languages: dividing by 1,024 but writing “KB” or “Kb” (which means kilobits), and rounding that prints “1000.0 kB” instead of moving up to “1.0 MB” — the flaw the author of Stack Overflow’s most-copied Java answer reported in his own snippet in 2019. Pick one base, label it KiB or kB to match, and switch units before rounding. JavaScript’s Intl.NumberFormat can label kilobytes and gigabytes but does not convert, and its list of units has no kibibytes.
Which unit to use
Write decimal units (kB, MB, GB) for storage, downloads and anything a reader will compare with a box or a price list, and binary units (KiB, MiB, GiB) for memory and anywhere powers of two matter. Write the symbol beside every number, keep B for bytes and bit (or b) for bits, and the 7% gap at giga-scale stops being a surprise. For the common pairs there are pages for KB to MB, MB to GB, GB to MB, KB to GB, GB to TB and bytes to GB.
For a sense of scale, IDC expects its “Global DataSphere” to surpass 700 zettabytes by 2030.