Computer science
Data size units and download time
Type the size of a file or a disk and the speed of the connection: get the same amount in every unit, decimal and binary, and the transfer time with a realistic allowance for protocols.
Why a 1 TB disk shows 931 GB
The prefixes kilo, mega and giga mean a thousand, a million and a billion, as in every other unit: a gigabyte is 10^9 bytes. But computers count in powers of two, and for years the same words were used for 1024, 1024² and 1024³. The binary prefixes were created to tell them apart: kibibyte (KiB), mebibyte (MiB), gibibyte (GiB).
Disk makers use decimal units; Windows shows binary ones but calls them GB, which is why a 1 TB disk appears as 931 GB. No space is missing, only the unit changes. macOS and Linux now use decimal units, like the maker.
Connection speed is measured in bits per second, files in bytes: there is a factor of eight between them. A 100 Mbit/s line downloads at most 12.5 MB per second, and in practice a little less, because part of the bandwidth goes to protocols.
Common mistakes
- Dividing by 1000 where 1024 was meant, or the other way round: on a terabyte the difference is almost 10%.
- Mixing up Mb and MB: lower-case b is the bit, capital B the byte, eight times larger.
- Expecting the full nominal speed: Wi-Fi, a slow server and protocols always cut the real figure.
Frequently asked questions
How many MB are in 1 GB?
A thousand, in the decimal units used by makers and network speeds. In binary units, 1 GiB is 1024 MiB. The operating system may show either under the same name.
How long does 1 GB take at 100 Mbit/s?
A gigabyte is 8000 megabits: at 100 Mbit/s it takes 80 seconds in theory, about a minute and a half with 10% protocol overhead.
Why does the speed test say 300 Mbit/s but downloads run at 35 MB/s?
Because they are the same thing: 300 Mbit/s divided by 8 is 37.5 MB/s, and the 35 MB/s you see is what is left after protocols.
How this calculation works
Bits = size × bits per unit (byte = 8 bits, kB = 8·10^3, MB = 8·10^6, GB = 8·10^9, KiB = 8·1024, MiB = 8·1024², GiB = 8·1024³). Time = bits ÷ (speed in bit/s × (1 − overhead)). For example 4.7 GB at 100 Mbit/s with 10% overhead: 37.6·10^9 bits ÷ 90·10^6 bit/s ≈ 418 s, about 7 minutes.
Related calculators
IEEE 754 floating point
How a decimal is stored as a 32 or 64-bit float: sign, exponent, mantissa and the error.
Unicode and UTF-8 codes
The code point, UTF-8 and UTF-16 bytes and HTML code of every character, emoji included.
Base64 converter
From text, integer, hexadecimal or binary to Base64 and back, with the 6-bit groups explained.