Data size converter
Convert between B, KB, MB, GB, TB and bits.
| Bit (bit) | - |
|---|---|
| Byte (B) | - |
| Kilobyte (KB) | - |
| Megabyte (MB) | - |
| Gigabyte (GB) | - |
| Terabyte (TB) | - |
| Petabyte (PB) | - |
Based on binary (IEC) units where 1KB = 1024B. This may differ from storage manufacturer labeling (1KB = 1000B).
An attachment is a few megabytes over a 25MB mail limit, or a new drive labelled 1TB shows up in the file manager as 931GB. Storage units look familiar until you actually have to compare two of them. Enter one value with its unit and this converter fills in every other unit at once, from bits up to petabytes.
How it works
How to use it
Put a number in Value and pick the Unit that number is in. The table below fills in bit, B, KB, MB, GB, TB and PB simultaneously — the same seven units you can choose from as input. There is nothing to submit; change either field and the whole table updates.
The calculation: a chain of 1024s
This tool uses binary units, where each step up is a factor of 1,024 — the way an operating system counts.
| Relationship | Value |
|---|---|
| 1 byte | 8 bits |
| 1 KB | 1,024 B |
| 1 MB | 1,024 KB |
| 1 GB | 1,024 MB |
| 1 TB | 1,024 GB |
| 1 PB | 1,024 TB |
So 1 GB works out to 1,024 x 1,024 x 1,024 = 1,073,741,824 bytes.
Some places count in 1000s
Storage manufacturers and network speed ratings normally use decimal units (1,000 per step). That is why a drive sold as "1TB" reports roughly 931GB once it is plugged in: the manufacturer counts a trillion bytes as 1TB, while the operating system counts 1,073,741,824 bytes as 1GB. Nothing is wrong with the drive. To avoid the ambiguity, the binary units are sometimes written explicitly as KiB, MiB and GiB (kibi-, mebi-, gibibyte).
Bits and bytes are not the same
Internet speed in Mbps is megabits per second; file size in MB is megabytes. The difference is a factor of eight, so mixing the two when you estimate a download time will throw the answer badly off.
Terms explained
- Bit
- The smallest unit, holding a single 0 or 1. Eight bits make one byte.
- Byte (B)
- Roughly enough to store one Latin character; the base unit for file sizes.
- KiB, MiB, GiB
- Binary prefixes written explicitly to signal a factor of 1,024 rather than 1,000.
- Mbps
- Megabits per second, used for connection speeds. Eight times smaller per unit than MB.
- Petabyte (PB)
- 1,024 TB — the scale used for enterprise servers and large data stores.
- Binary (IEC) units
- The 1,024-per-step system this converter uses, as opposed to the decimal 1,000-per-step system.
Frequently asked questions
How many MB are in a GB?
1,024 MB, using binary units. By the same chain, 1 MB is 1,024 KB and 1 KB is 1,024 bytes. Storage manufacturers often count in thousands instead, so the figure can differ slightly depending on context.
My 1TB external drive shows only 931GB. Is it faulty?
No. The manufacturer labels 1TB as one trillion bytes, while the operating system divides by 1,073,741,824 to get a gigabyte. One trillion divided by 1,073,741,824 is about 931, which is exactly the number you see. It is a labelling difference, not lost capacity.
How long does a 1GB download take on a 100Mbps connection?
1 GB is about 8,590 megabits, so at 100Mbps the theoretical time is roughly 86 seconds. In practice it usually takes longer because of line conditions, server speed and protocol overhead.
What is the difference between KB and KiB?
KiB always means exactly 1,024 bytes. KB is ambiguous and is used for both 1,024 and 1,000 bytes depending on who wrote it. This converter treats KB as 1,024 bytes.
What would I use the bit value for?
Transfer rates and bandwidth are usually quoted in bits. Converting a file size into bits makes it straightforward to estimate how long it will take over a connection rated in Mbps.
Tell us what went wrong and we'll fix it fast. (Leave an email if you'd like a reply.)