File Size Calculator

File sizes are measured in bytes and their multiples, but there are two competing systems: binary (IEC) and decimal (SI). Binary uses powers of 1,024 (1 KB = 1,024 bytes, 1 MB = 1,048,576 bytes) and is the system used by operating systems like Windows and macOS when reporting file sizes. Decimal uses powers of 1,000 (1 KB = 1,000 bytes, 1 MB = 1,000,000 bytes) and is used by storage manufacturers. This discrepancy explains why a 1 TB hard drive appears as approximately 931 GB in Windows. This calculator converts any value in bits, bytes, kilobytes (KB), megabytes (MB), gigabytes (GB), terabytes (TB), or petabytes (PB) into all other units simultaneously, showing both binary and decimal (SI) results side by side.

Binary vs decimal file size reference

UnitBinary (IEC)Decimal (SI)
1 Kilobyte (KB / KiB)1,024 bytes1,000 bytes
1 Megabyte (MB / MiB)1,048,576 bytes1,000,000 bytes
1 Gigabyte (GB / GiB)1,073,741,824 bytes1,000,000,000 bytes
1 Terabyte (TB / TiB)1,099,511,627,776 bytes1,000,000,000,000 bytes
1 Petabyte (PB / PiB)1,125,899,906,842,624 bytes1,000,000,000,000,000 bytes

File size: frequently asked questions

What is the difference between binary and decimal (SI) file sizes?

Binary (IEC) prefixes use powers of 1,024: 1 kibibyte (KiB) = 1,024 bytes, 1 mebibyte (MiB) = 1,048,576 bytes. Decimal (SI) prefixes use powers of 1,000: 1 kilobyte (KB) = 1,000 bytes, 1 megabyte (MB) = 1,000,000 bytes. Operating systems traditionally use binary values but label them with SI prefixes (e.g., Windows shows 'MB' but calculates in MiB), which causes confusion. Hard drive manufacturers use decimal values, which is why a drive labelled 1 TB appears as ~931 GiB in Windows.

How many bytes are in a megabyte?

In the binary (IEC) system used by most operating systems: 1 mebibyte (MiB) = 1,048,576 bytes. In the decimal (SI) system used by storage manufacturers: 1 megabyte (MB) = 1,000,000 bytes. The difference is approximately 4.9%. For most practical purposes, 1 MB is treated as approximately 1 million bytes.

What is the difference between a bit and a byte?

A bit is the smallest unit of digital data, representing a 0 or 1. A byte is 8 bits. Most file sizes are measured in bytes, while network speeds are measured in bits per second (bps). To convert between them: divide bytes by 8 to get bits per second for speed, or multiply megabytes by 8 to get megabits when comparing file size to download speed.

What are petabytes and exabytes used for?

A petabyte (PB) equals 1,000 terabytes (decimal) or 1,024 tebibytes (binary), approximately 1 quadrillion bytes. Petabytes are used to measure enterprise data centres, government archives, and cloud storage. An exabyte (EB) equals 1,000 petabytes. Global internet traffic is measured in exabytes per month. Individual users rarely encounter petabytes; even large personal storage arrays are measured in terabytes.

Which system should I use for file sizes?

For everyday use, either system works as a rough guide. For precision: use binary (KiB, MiB, GiB) when working with operating system memory, RAM, and processor cache. Use decimal (KB, MB, GB) when comparing to storage device specifications or network speed ratings. For computing contexts in general, binary is more traditional, but the IEC recommends using the explicit binary prefixes (KiB, MiB, GiB) to avoid ambiguity.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.