Convert memory sizes such as GB of RAM to MB, using binary (1,024) or decimal (1,000) units, or estimate storage from a data rate and duration.

RAM uses binary sizes: 1 GB of RAM = 1,024 MB (shown as GiB and MiB). Disk and network sizes use decimal: 1 GB = 1,000 MB.

Optional settings

Calculator Functions

FunctionWhat it doesWhat it requires
Convert a memory sizeConverts a memory or storage size from one unit to anotherRequires the memory size, its unit and the result unit
Storage from data rate and timeEstimates the storage that a steady stream of data fills over a periodRequires the data rate, the duration and the result unit; overhead in percent and a compression ratio are optional
Storage from unit count and unit sizeFinds the total size of a number of equal itemsRequires the number of units, the size of each unit and the result unit

Sizes can be entered and shown in bits, bytes and the decimal and binary multiples up to TB and TiB. Every result also gives the size in bytes and bits and a table of the same amount in all ten units.

Memory Size Formulas

size = bytes ÷ U
sizeMemory size in the result unit
bytesTotal size in bytes, from the selected function
UBytes in one result unit, from the table below
UnitBytesType
bit0.125—
Byte (B)1—
Kilobyte (kB)1,000Decimal
Kibibyte (KiB)1,024Binary
Megabyte (MB)1,000,000Decimal
Mebibyte (MiB)1,048,576Binary
Gigabyte (GB)1,000,000,000Decimal
Gibibyte (GiB)1,073,741,824Binary
Terabyte (TB)1,000,000,000,000Decimal
Tebibyte (TiB)1,099,511,627,776Binary

Decimal units go up in steps of 1,000 and binary units in steps of 1,024 [1]. RAM is sized in binary units, so a module sold as 16 GB holds 16 GiB, while drives and network speeds use decimal units.

Convert a memory size

bytes = entered size × Uin

Uin is the bytes in one unit of the entered size. 16 GiB of RAM is 16 × 1,073,741,824 bytes, and dividing by 1,048,576 gives 16,384 MiB. In the same way 4 GiB is 4,096 MiB and 8 GiB is 8,192 MiB. A 500 GB drive is 500,000,000,000 bytes, which is 465.66 GiB, the figure an operating system that counts in binary reports.

Storage from data rate and time

bytes = rate × time ×
(1 + overhead ÷ 100) ÷ ratio

The rate is converted to bytes per second (1 Mbit/s = 125,000 bytes/s) and the time to seconds. Overhead is a percentage added for container or protocol data, and ratio is the compression ratio, where 2 means the data shrinks to half. Both are optional and default to 0% and 1. An 8 Mbit/s stream for 2 hours is 1,000,000 × 7,200 = 7.2 GB. With 10% overhead and 2:1 compression it is 3.96 GB.

Storage from unit count and unit size

bytes = count × unit size

The unit size is taken in bytes. Five blocks of 1,024 bytes are 5,120 bytes, or 5 KiB. One million 4-byte integers are 4,000,000 bytes, or 4 MB.

Limits of This Estimate

  • A converted size is arithmetic. It does not predict the formatted capacity of a drive, which loses space to the file system.
  • The data rate estimate assumes a constant rate and the stated compression. Variable bit rates and real compression results differ.
  • Labels are not always used strictly: software often writes KB, MB and GB for the binary units [1]. Check which one a figure means before converting it.

Sources

  1. NIST, Prefixes for binary multiples: binary prefixes (Ki, Mi, Gi, Ti) as powers of 1,024 and SI prefixes as powers of 1,000