Skip to content
Built in Lahore, PakistanHow we check the math
mathbehind

Data Storage Converter

Convert between bytes, KB, MB, GB, TB, and PB, using the binary (1024-based) convention operating systems actually use.

By Muhammad Ahmad, Software EngineerLinkedIn

Your numbers

Converted value

1,024.0000

Equivalent in bytes
1,073,741,824
The math behind it
  1. GB to MB

    1 × 1,024equals1,024 MB

Storage units can mean two slightly different things depending on context: operating systems and most software (including this converter) use the binary convention, where each step up is ×1,024, while some drive manufacturers advertise capacity using the decimal convention, where each step is ×1,000. That mismatch is why a "1TB" drive shows up as roughly 931GB in your operating system.

How it works

This converter uses the binary convention: 1 KB = 1,024 bytes, 1 MB = 1,024 KB, and so on up through PB, matching what your operating system reports for file and drive sizes.

Conversion works by first converting your input to bytes (multiplying by 1,024 raised to the power matching the source unit), then dividing by 1,024 raised to the power matching the target unit.

The technically precise names for binary units are KiB, MiB, GiB, etc. (kibibyte, mebibyte, gibibyte), but KB, MB, and GB are used almost universally in everyday software to mean the same binary values this converter uses.

A worked example

1 GB converts to exactly 1,024 MB, or 1,073,741,824 bytes, the number you'd see if you checked a 1GB file's exact size in a file manager.

More examples

In binary units, as used here and by Windows, 1 TB is 1,024 GB, or 1,099,511,627,776 bytes. Drive makers use decimal units, where 1 TB is 1,000 GB, which is why a new 1 TB drive shows about 931 GB.

Common mistakes

  • Mixing decimal (1,000) and binary (1,024) units in one calculation.
  • Confusing bits and bytes: network speeds are in bits.
  • Expecting a drive's full advertised size to be available after formatting.
  • Assuming RAM and storage use the same unit convention.

Questions people ask

Why does my hard drive show less space than advertised?

Drive manufacturers typically advertise capacity using the decimal convention (1TB = 1,000,000,000,000 bytes), while your operating system reports size using the binary convention (1TB = 1,099,511,627,776 bytes). The drive isn't missing storage. It's the same number of bytes, described two different ways, which is why a "1TB" drive shows as roughly 931GB in Windows or macOS.

What's the difference between KB and KiB?

They represent the same binary value (1,024 bytes). KiB (kibibyte) is the International System-approved unambiguous name, introduced specifically to resolve the KB decimal-vs-binary confusion. In practice, most consumer software still uses "KB" to mean what is technically a KiB, which is the convention this converter follows.

How many bytes are in a bit, and does this converter handle bits?

A byte is 8 bits. This converter works in bytes and its multiples (KB, MB, GB, etc.); network speeds are often quoted in bits per second (Mbps) rather than bytes, which is a common source of confusion when estimating download times from a connection speed.

How many MB are in a GB?

1,000 MB in the decimal system that drive makers and most cloud providers use. In the binary system that some operating systems use, 1 GiB is 1,024 MiB.

How much is a terabyte?

1,000 gigabytes, or 1 trillion bytes. That's roughly 250,000 photos at 4 MB each, or about 500 hours of HD video at 2 GB an hour.