Bytes to MB to GB Calculator: Convert Data Units
- Decimal result (1,000 base)
- Result
- Value
- 1073741824
- You entered
- From unit
- Byte
- You entered
This calculator converts between bytes, kilobytes (KB), megabytes (MB), gigabytes (GB), and terabytes (TB) using the binary (1,024) system that operating systems use. Enter any value in bytes, KB, MB, GB, or TB, and you get the equivalent in all other units instantly, plus the same value in decimal (1,000) units so you can compare with storage drive labels.
Formula
The calculator uses two different formulas depending on which system you want:
- Binary (base 2): 1 KB = 1,024 bytes, 1 MB = 1,024 KB, 1 GB = 1,024 MB, 1 TB = 1,024 GB. The formula is:
bytes = value × from_multiplier, wherefrom_multiplieris 1 for bytes, 1,024 for KB, 1,048,576 for MB, 1,073,741,824 for GB, and 1,099,511,627,776 for TB. - Decimal (base 10): 1 KB = 1,000 bytes, 1 MB = 1,000 KB, 1 GB = 1,000 MB, 1 TB = 1,000 GB. The formula is:
bytes = value × from_multiplier_decimalwhere the multipliers are 1, 1,000, 1,000,000, 1,000,000,000, and 1,000,000,000,000 respectively.
The output shows the result in the most appropriate unit (e.g., if the result is 5,000,000 bytes, it shows 5 MB in decimal and 4.77 MB in binary). The calculator’s first output is the binary result in the best-fit unit, and the second output is the decimal result in the best-fit unit.
Worked Example
Using the default value: 1,073,741,824 bytes (which is exactly 1 GiB in binary).
- Start with bytes: 1,073,741,824.
- Convert to MB (binary): divide by 1,048,576 → 1,073,741,824 ÷ 1,048,576 = 1,024 MB.
- Convert to GB (binary): divide by 1,073,741,824 → 1,073,741,824 ÷ 1,073,741,824 = 1 GB.
- So the binary result is 1 GB (or 1,024 MB).
- Now decimal: 1,073,741,824 bytes ÷ 1,000,000,000 = 1.07 GB (decimal).
The calculator shows: binary result = 1 GB, decimal result = 1.07 GB. This matches what Windows shows as 1 GB but what a drive manufacturer would label as 1.07 GB.
Why Are There Two Different Systems?
The confusion comes from history. Hard drive manufacturers adopted the decimal system (1,000) because it makes capacities look slightly larger. Operating systems like Windows, macOS, and Linux traditionally use the binary system (1,024) when displaying file sizes. So a drive labeled “500 GB� actually holds 500,000,000,000 bytes, which Windows reports as “465 GB� because it divides by 1,073,741,824. This is not a bug – it’s a difference in base. The International Electrotechnical Commission (IEC) proposed binary prefixes (KiB, MiB, GiB) to clarify, but most people still say MB and GB for both. This calculator gives you both so you can translate between what the drive says and what the OS shows.
How to Use the Calculator
Using the calculator is straightforward:
- Enter the numeric value in the “Value� field.
- Select the unit of that value from the drop-down (bytes, KB, MB, GB, TB).
- The first output shows the binary equivalent in the most suitable unit (e.g., if you enter 5,000,000,000 bytes, it shows 4.66 GiB).
- The second output shows the decimal equivalent (e.g., 5 GB).
You can enter any positive number, including decimals (like 1.5 GB). The calculator works for any size, from a few bytes to terabytes. For example, if you enter 1,500,000,000,000 bytes, you get 1.36 TiB (binary) and 1.5 TB (decimal).
Common Mistakes and Misconceptions
A frequent error is mixing up the two systems. When someone says “I have a 1 TB drive,� they usually mean 1,000,000,000,000 bytes (decimal). But when they ask “Why does my computer show 931 GB?� – that’s because the OS uses binary. Another mistake is rounding too early. If you convert 500 MB to bytes and then to GB, you should not round the intermediate MB value. Always keep full precision until the final step. Also, remember that file sizes are usually shown in binary on your computer, but network speeds are in bits per second (not bytes). One byte equals 8 bits, so a 100 Mbps connection transfers about 12.5 MB/s (megabytes per second) – a common confusion.
Practical Examples
Here are some real-world conversions to give you a feel:
- A typical MP3 song is about 5 MB (binary) = 5.24 MB (decimal).
- A full-length movie in HD might be 4 GB (binary) = 4.29 GB (decimal).
- A 256 GB SSD (decimal) shows as 238 GB in Windows (binary).
- A 1 TB external drive shows as 931 GB in Windows.
- An email attachment limit of 25 MB means 25,000,000 bytes (decimal) or 23.8 MiB (binary).
These examples show why it’s useful to know both values.
Frequently Asked Questions
Why does my 1 TB drive show as 931 GB?
Because the drive manufacturer uses decimal (1 TB = 1,000,000,000,000 bytes), but your operating system uses binary (1 GB = 1,073,741,824 bytes). Dividing 1,000,000,000,000 by 1,073,741,824 gives 931.32, so Windows shows 931 GB. This is normal and not a defect.
What is the difference between MB and MiB?
MB (megabyte) can mean either 1,000,000 bytes (decimal) or 1,048,576 bytes (binary). MiB (mebibyte) always means 1,048,576 bytes. The IEC introduced MiB to remove ambiguity. When you see MB on a drive label, it’s usually decimal; when you see it in file properties, it’s usually binary.
How many bytes are in a gigabyte?
In decimal, 1 GB = 1,000,000,000 bytes. In binary, 1 GB = 1,073,741,824 bytes. The calculator shows both. Most people use binary when talking about RAM and file sizes, and decimal when talking about storage capacity.
Is a kilobyte 1000 or 1024 bytes?
It depends on context. Historically, in computing, a kilobyte was 1,024 bytes because of binary math. However, the SI definition is 1,000 bytes. The confusion led to the creation of KiB (1,024) and KB (1,000) in formal standards. Most software still uses 1,024, but drive manufacturers use 1,000.
How do I convert bytes to MB manually?
To convert bytes to MB (binary), divide the number of bytes by 1,048,576. For example, 5,000,000 bytes ÷ 1,048,576 = 4.77 MB. To convert to decimal MB, divide by 1,000,000. This calculator does both automatically.
Why do network speeds use bits instead of bytes?
Networking historically measures data rates in bits per second (bps), while storage uses bytes. Since 1 byte = 8 bits, a 100 Mbps connection equals 12.5 MB/s. This is why your download speed in MB/s is always about 8 times lower than the advertised Mbps.
Related
Formula used
in val | Value | - | 1073741824 | 0 sel from | From unit | Byte=1, KB=1024, MB=1048576, GB=1073741824, TB=1099511627776 out bin | Binary result (1,024 base) | - | val * from | 2 out dec | Decimal result (1,000 base) | - | val * from / pow(10, floor(log10(val * from)) / 3 * 3) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.