By · Updated

File Size Converter

Bytes, KB, MB, GB, TB and KiB, MiB, GiB, TiB

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the File Size Converter works

This file size converter takes one size and shows it in every unit at once: bytes, the decimal KB, MB, GB, TB and PB used by drive makers and macOS, and the binary KiB, MiB, GiB and TiB that Windows and Linux tools count in. Enter the number, pick the unit, and the full list updates as you type.

The same file can be "2 TB" on the box, "1.81 TB" in Windows and "2 TB" again on a Mac. Nothing is missing. Storage makers count in powers of 1,000 and many operating systems count in powers of 1,024, while both label the result with the same letters. Seeing every unit side by side ends the guesswork.

How the file size converter works

The formula is two steps. First the size is turned into bytes by multiplying by its unit: 1,000 for KB, 1,000,000 for MB, 10⁹ for GB and 10¹² for TB, or 1,024, 1,024², 1,024³ and 1,024⁴ for KiB, MiB, GiB and TiB. Then the byte count is divided by each unit in turn. Results keep six significant figures, so very small or very large figures stay readable.

First example. A 2 TB drive holds 2 × 10¹² bytes. Divided by 1,024³ that is 1,862.65 GiB, and divided by 1,024⁴ it is 1.81899 TiB, which Windows rounds and labels "1.81 TB".

Second example. A laptop with 16 GiB of memory has 16 × 1,024³ = 17,179,869,184 bytes. That is 17.1799 decimal GB and exactly 16,384 MiB.

How many GiB does a drive show? Multiply the advertised GB by 0.9313. The gap grows with each prefix: 2.4% at kilo, 4.9% at mega, 7.4% at giga and 10% at tera, which is why big drives look most "short".

Advertised drive sizes in decimal GB with the binary GiB and TiB an operating system shows

Advertised (GB) GiB shown TiB shown
1 0.93 0.001
2 1.86 0.002
4 3.73 0.004
8 7.45 0.007
16 14.9 0.015
32 29.8 0.029
64 59.6 0.058
120 111.76 0.109
128 119.21 0.116
250 232.83 0.227
256 238.42 0.233
480 447.03 0.437
500 465.66 0.455
512 476.84 0.466
960 894.07 0.873
1,000 931.32 0.909
2,000 1,862.65 1.819
4,000 3,725.29 3.638
6,000 5,587.94 5.457
8,000 7,450.58 7.276
10,000 9,313.23 9.095
12,000 11,175.87 10.914
16,000 14,901.16 14.552
20,000 18,626.45 18.19

Tips and pitfalls

FAQ

Why does my 1 TB drive show as 931 GB?

The drive holds 10¹² bytes. Windows divides by 1,024³ and labels the result GB, which gives 931.3. The bytes are all there; only the unit differs. macOS counts in decimal and shows the same drive as 1 TB.

What is the difference between GB and GiB?

A gigabyte (GB) is 1,000,000,000 bytes and a gibibyte (GiB) is 1,073,741,824 bytes, which is 2³⁰. A GiB is 7.4% larger. Drive makers use GB, while Windows, RAM sizes and many Linux tools use GiB.

How many bytes are in a megabyte?

A decimal megabyte is 1,000,000 bytes. A binary mebibyte is 1,048,576 bytes. Windows uses the binary figure but labels it MB, so the answer depends on where the number came from.

Is 1,024 MB equal to 1 GB?

Only in binary units, where 1,024 MiB is 1 GiB. In decimal units 1,000 MB is 1 GB. Phone plans and drives use decimal; RAM and Windows use binary.

Which unit does Windows use?

Windows Explorer counts in binary units, dividing by 1,024 at each step, but labels them KB, MB, GB and TB. macOS since 10.6, iOS and Android count in decimal, so the same file shows slightly larger there.

See also: all Units tools, Images, Audio & Video, Documents, Data & Code.

Related tools