How to convert bytes, KB, MB, GB and TB
This data size converter translates a value between bytes, kilobytes, megabytes, gigabytes, terabytes and petabytes. A single toggle switches between SI (decimal) units, where 1 KB = 1,000 bytes, and binary units, where 1 KiB = 1,024 bytes — the source of most "where did my disk space go?" confusion.
Use it for storage quotas, bandwidth and transfer estimates, container memory limits, upload size limits, or checking a cloud bill.
How to use it
- Enter a number and choose its unit — for example
500GB. - Pick SI (1000) or Binary (1024).
- Read the equivalent value in every other unit, and copy what you need.
SI vs binary units
| SI (decimal) | Bytes | Binary (IEC) | Bytes |
|---|---|---|---|
| 1 kB | 1,000 | 1 KiB | 1,024 |
| 1 MB | 1,000,000 | 1 MiB | 1,048,576 |
| 1 GB | 1,000,000,000 | 1 GiB | 1,073,741,824 |
| 1 TB | 10^12 | 1 TiB | 1,099,511,627,776 |
| 1 PB | 10^15 | 1 PiB | 1,125,899,906,842,624 |
Drive manufacturers, network speeds and most cloud storage pricing use SI units. Operating systems are split: Windows reports sizes in binary units but labels them "GB", while macOS (since 10.6) uses true decimal GB. That's why a "1 TB" drive shows up as about 931 GB in Windows: 10^12 ÷ 1024^3 ≈ 931.3.
The gap grows with each step: about 2.4% at kilo, 4.9% at mega, 7.4% at giga and 10% at tera.
Which convention your tools use
| Context | Units |
|---|---|
| Kubernetes resources | Mi / Gi are binary (512Mi = 536,870,912 bytes); M / G are decimal |
Docker --memory | m / g are binary (512m = 512 MiB) |
Linux df -h, free -h, ls -lh | Binary, shown with single letters (G means GiB) |
| AWS S3, Google Cloud Storage pricing | Binary GB (GiB) for storage billing, despite the "GB" label |
| Network speeds (Mbps, Gbps) | Decimal bits per second |
Bits vs bytes
Network bandwidth is quoted in bits per second (lowercase b: Mbps), storage in bytes (uppercase B: MB). There are 8 bits in a byte, so a 100 Mbps connection transfers at most 12.5 MB/s — in practice a bit less after protocol overhead. To estimate a download time, convert the file size to megabits (MB × 8) and divide by the line speed.
Working with raw numbers in other bases? Try the number base converter. Shrinking images before upload? Try the image converter.
Estimating transfer and storage
| Task | Calculation | Result |
|---|---|---|
| Download 4 GB at 100 Mbps | 4 × 8,000 Mb ÷ 100 Mbps | ≈ 320 s (5–6 minutes) |
| Upload 500 MB at 20 Mbps | 500 × 8 Mb ÷ 20 Mbps | ≈ 200 s (3–4 minutes) |
| 1 million rows × 2 KB | 1,000,000 × 2,000 B | ≈ 2 GB (1.86 GiB) |
| 30 days of 5 GB/day logs | 30 × 5 GB | 150 GB (≈ 140 GiB) |
Real transfers are usually 5–15% slower than the raw line speed because of protocol overhead, and storage needs headroom for indexes, replication and backups — plan for more than the raw byte count.
Frequently asked questions
Is 1 GB 1000 MB or 1024 MB?
Both conventions exist. In SI units 1 GB = 1,000 MB. In binary units 1 GiB = 1,024 MiB. Storage vendors use SI; many operating systems and tools use binary but still write "GB".
Why does my 1 TB drive show 931 GB?
The drive holds 10^12 bytes (SI terabyte). Windows divides by 1024^3 and labels the result GB, giving about 931. No space is missing.
What's the difference between MB and Mb?
MB is megabytes; Mb is megabits. One byte is eight bits, so 1 MB = 8 Mb.