Skip to calculator

Unit converters · Digital data

Convert bytes, kilobytes, mebibytes, and bits

The maths routes through the bit. Decimal prefixes (1 kB = 1,000 bytes) and binary ones (1 KiB = 1,024 bytes) are handled separately, as IEC 80000-13 specifies.

Calculate

Amount of data to convert.

Starting unit. Default: decimal gigabyte.

Target unit. Default: binary gibibyte.

How the calculator works

Each unit has an exact factor to the bit: 1 byte = 8 bits, 1 kB = 8 × 10³ bits, 1 KiB = 8 × 1,024 bits. The conversion multiplies then divides, and never treats 1 kB as 1 KiB. That confusion is exactly why a drive sold as “1 TB” appears as roughly 931 GiB in an operating system.

Formula and method

b = x × kfrom ; y = b / kto

k is the unit's factor to the bit.

1 KiB = 1024 bytes ; 1 kB = 1000 bytes

Binary (IEC) and decimal (SI) prefixes are two distinct families.

1 TB = 10¹² bytes ≈ 0.909 TiB

The gap reaches about 9% at the tera level.

IEC 80000-13 reserves kilo, mega and giga for powers of ten, and introduces kibi, mebi and gibi for powers of 1,024. Drive manufacturers use decimal prefixes; many operating systems display powers of 1,024, sometimes still labelled “GB”. Here the label always matches the factor actually applied.

Worked example

A 1 TB drive in gibibytes

x = 1, from TB to GiB.

  1. 1 TB = 10¹² bytes.
  2. 1 GiB = 1,073,741,824 bytes.
  3. 10¹² / 1,073,741,824 ≈ 931.32.

≈ 931.32 GiB: the classic “smaller than advertised” drive.

500 MB in bytes

x = 500, from MB to B.

  1. 500 × 10⁶ = 500,000,000 bytes.

500 million bytes.

Input notes

Value
The quantity alone. The unit is chosen in the From and To lists.
From
Starting unit. Check whether your source means decimal (kB) or binary (KiB).
To
Target unit. The default compares a decimal gigabyte with a binary gibibyte.

Assumptions and limits

Assumptions

  • 1 byte = 8 bits.
  • The prefixes kB, MB, GB, TB are decimal (10³, 10⁶, 10⁹, 10¹²).
  • The prefixes KiB, MiB, GiB, TiB are binary (1,024ⁿ).

Limits

  • No machine word, disk sector or filesystem block size.
  • Connection throughput is measured in bits per second: convert with the bit unit, then divide by the duration.
  • Compression and formatting change the usable space.

How to read the result

A “1 TB” drive really does hold 10¹² bytes: the manufacturer is not cheating. It is the file explorer that divides by 1,024³ while still printing “GB”. For a mobile data plan, a “GB” is almost always decimal. For RAM, by contrast, sizes are binary by construction.

Common mistakes

  • Treating 1 GB and 1 GiB as the same.

    1 GiB ≈ 1.074 GB, and the gap grows with every prefix.

  • Confusing bytes (B) with bits (b).

    A 100 Mb/s link delivers 12.5 MB/s, not 100 MB/s.

  • Expecting exactly 1,000 GB on a formatted 1 TB drive.

    Formatting reserves space, and the display often uses powers of 1,024.

Comparison

Decimal against binary
Decimal prefixBytesBinary prefixBytes
1 kB1,0001 KiB1,024
1 MB10⁶1 MiB1,048,576
1 GB10⁹1 GiB1,073,741,824
1 TB10¹²1 TiB1,099,511,627,776

Methodology · Sources

Related calculations

Frequently asked questions

Why does my 1 TB drive show 931 GB?

The system divides by 1,024³.

The manufacturer counts 10¹² bytes. The operating system divides by 1,073,741,824 and gets 931.32, but often writes “GB” instead of “GiB”.

How many bytes are in a mebibyte?

1,048,576 bytes.

A mebibyte is 1,024² bytes, so 1,048,576. A decimal megabyte is 1,000,000 bytes, about 4.9% less.

How many MB/s is 1 Gb/s?

125 MB/s.

Divide by 8 to go from bits to bytes: 1,000 Mb/s ÷ 8 = 125 MB/s, before any protocol overhead.

Author and update

Written by Rédaction HexaCalc (editorial team). Content last updated: August 25, 2026. No third-party medical or financial review is claimed.

Need to convert a download time?

The duration converter moves between seconds and hours to estimate a transfer.

Duration converter

Category: Unit converters