Decimal (SI) vs Binary (IEC) Units
| Decimal unit | Bytes | Binary unit | Bytes |
|---|---|---|---|
| KB (kilobyte) | 1,000 | KiB (kibibyte) | 1,024 |
| MB (megabyte) | 1,000,000 | MiB (mebibyte) | 1,048,576 |
| GB (gigabyte) | 1,000,000,000 | GiB (gibibyte) | 1,073,741,824 |
| TB (terabyte) | 1,000,000,000,000 | TiB (tebibyte) | 1,099,511,627,776 |
How to Use It
1
Open the tool
Go to Numbers & Dates and scroll to the Byte Size Calculator.
2
Enter a value
Type a number and select the unit — bytes, KB, MB, GB or TB.
3
View all conversions
All equivalent values in other units appear instantly, in both decimal and binary variants.
4
Copy the result
Copy the converted value for use in documentation, code or specifications.
Pro Tips
💡Hard drive manufacturers use decimal (1 TB = 1,000,000,000,000 bytes). Your OS reports binary GiB, so 1 TB drive = ~931 GiB — same data, different unit.
💡In code:
const MB = 1024 * 1024 for binary MiB. const MB = 1_000_000 for decimal MB. Specify which you're using in comments.💡RAM is always measured in binary powers: 8 GiB, 16 GiB, 32 GiB — never 8 GB in the decimal sense.
Frequently Asked Questions
KB vs KiB — what's the difference?
KB (kilobyte) = 1,000 bytes in SI decimal. KiB (kibibyte) = 1,024 bytes in IEC binary. Drive manufacturers use decimal; operating systems often report in binary.
How many bytes in 1 MB?
1 MB (decimal) = 1,000,000 bytes. 1 MiB (binary) = 1,048,576 bytes. In everyday usage, "MB" often means the binary 1,048,576 for file sizes in OS file explorers.
Why does my 1 TB drive show less space?
The drive has 1,000,000,000,000 bytes (decimal TB). Your OS shows ~931 GiB (binary). Same data — different unit labelling.
What unit should I use in code?
Use raw bytes for precision. Define named constants —
const MiB = 1024 ** 2 — and document whether you're using decimal or binary to avoid confusion.Convert byte sizes now
Open the Byte Size Calculator and convert between any digital storage units instantly — free, no login.
Open Byte Calculator →