Data Size Converter (KB, MB, GB, KiB, MiB, GiB, ...)

Convert a data size between bits, bytes, and both decimal (KB, MB, GB) and binary (KiB, MiB, GiB) prefixes. The two families are kept explicitly separate, which is what makes the difference between them visible. Everything runs in your browser.

How the conversion works

Every unit on this page is defined by how many bits it represents, with 1 byte = 8 bits. The input is converted to bits, then from bits into the target unit:

result = value × (bits per source unit) ÷ (bits per target unit)

Using the bit as the base rather than the byte means bit-based units (network speeds, for instance) and byte-based units (file sizes) can be converted against each other directly.

Decimal versus binary: the 1000 vs 1024 problem

This is the reason a "1 TB" drive never shows 1 TB of free space, and it is not a scam or a formatting overhead issue. It is two different unit systems using confusingly similar names.

Decimal prefixes follow the SI convention where each step is a power of 1000: 1 KB = 1000 bytes, 1 MB = 1,000,000 bytes, 1 GB = 109 bytes. Storage manufacturers, network equipment, and most of the industry use these.

Binary prefixes step by powers of 1024, which is what computers actually work in: 1 KiB = 1024 bytes, 1 MiB = 1,048,576 bytes, 1 GiB = 230 bytes. These are the correct names (kibibyte, mebibyte, gibibyte), standardized by the IEC in 1998.

The problem is that Windows and many older tools display binary quantities using decimal labels. Windows shows a 1 TB drive as "931 GB" when it really means 931 GiB. macOS and most Linux distributions switched to decimal reporting years ago, which is why the same drive shows about 1000 GB there. Nothing is missing, the two systems just count differently.

DecimalBytesBinaryBytesGap
1 KB10001 KiB10242.4%
1 MB1061 MiB1,048,5764.9%
1 GB1091 GiB1,073,741,8247.4%
1 TB10121 TiB24010.0%

Note that the gap widens at every step. At the terabyte level it is already 10%, which is why the "missing" space on large drives is so noticeable.

Bits versus bytes

A second, independent source of confusion. Network speeds are quoted in bits per second, file sizes in bytes. Since a byte is 8 bits, the numbers differ by a factor of 8.

A "100 Mbit/s" connection transfers at most 12.5 MB/s. A 1 Gbit/s fiber line tops out around 125 MB/s. The capital letter matters: Mb is megabit, MB is megabyte. Marketing materials favor bits because the number looks eight times larger.

Real-world throughput is always somewhat lower than the theoretical maximum because of protocol overhead, typically 5 to 10% for TCP/IP over Ethernet.

Quick reference table

UnitIn bytesApproximate content
1 KB1000A short email, a paragraph of text
1 MB106A high-quality photo, a minute of MP3
1 GB109About 250 songs, 20 minutes of HD video
1 TB1012Roughly 250,000 photos

Practical examples

Estimating download time

Convert the file size to bits, then divide by the connection speed in bits per second. A 4 GB file over a 50 Mbit/s connection: 4 GB is 32,000 Mbit, and 32,000 ÷ 50 = 640 seconds, roughly 11 minutes at full speed. Real transfers take longer because of overhead and shared bandwidth.

Buying storage

When comparing drives, remember that the advertised capacity is decimal. A 2 TB drive holds 2 × 1012 bytes, which Windows will report as about 1.82 TB. Neither figure is wrong, they use different units. Budget for roughly 7 to 10% less usable space than the number on the box suggests if your system reports in binary units.

Mobile data allowances

Data plans are quoted in decimal gigabytes. Typical consumption: streaming music at standard quality uses around 70 MB per hour, HD video roughly 1 to 3 GB per hour, and video calls about 500 MB per hour. A 10 GB monthly allowance covers only a few hours of HD streaming.

Backup and archive planning

When sizing backup storage, work in a single unit system throughout. Mixing a decimal drive capacity with binary file size totals produces an overestimate of available space, which is exactly the situation where running out of room is most costly.

Frequently asked questions

Why does my 1 TB drive show less than 1 TB?

The manufacturer counts in decimal terabytes (1012 bytes) while Windows displays binary tebibytes (240 bytes) but labels them "TB". The same physical storage appears as roughly 931 GB. No space is actually lost.

Is a kilobyte 1000 or 1024 bytes?

Formally, a kilobyte is 1000 bytes and a kibibyte is 1024 bytes. In practice many tools use "KB" for 1024 bytes, so check the context. This converter offers both explicitly.

How many megabytes is a gigabyte?

1000 MB in decimal units, or 1024 MiB if you are working in binary units. Mixing the two is the most common source of error.

What is the difference between Mb and MB?

Mb is megabit, MB is megabyte, and one byte is eight bits. So 100 Mb is 12.5 MB. Network speeds use bits, file sizes use bytes.

How fast can a 100 Mbit/s connection download?

Theoretically 12.5 MB/s. In practice expect 10 to 11 MB/s after protocol overhead.

Why were kibibytes and mebibytes invented?

The IEC introduced them in 1998 precisely to end the ambiguity. Adoption has been partial: Linux and macOS mostly comply, Windows still does not, which is why the confusion persists nearly three decades later.

Related tools