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.
Calculator Functions
| Function | What it does | What it requires |
|---|---|---|
| Convert a memory size | Converts a memory or storage size from one unit to another | Requires the memory size, its unit and the result unit |
| Storage from data rate and time | Estimates the storage that a steady stream of data fills over a period | Requires the data rate, the duration and the result unit; overhead in percent and a compression ratio are optional |
| Storage from unit count and unit size | Finds the total size of a number of equal items | Requires 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 | Memory size in the result unit |
| bytes | Total size in bytes, from the selected function |
| U | Bytes in one result unit, from the table below |
| Unit | Bytes | Type |
|---|---|---|
| bit | 0.125 | — |
| Byte (B) | 1 | — |
| Kilobyte (kB) | 1,000 | Decimal |
| Kibibyte (KiB) | 1,024 | Binary |
| Megabyte (MB) | 1,000,000 | Decimal |
| Mebibyte (MiB) | 1,048,576 | Binary |
| Gigabyte (GB) | 1,000,000,000 | Decimal |
| Gibibyte (GiB) | 1,073,741,824 | Binary |
| Terabyte (TB) | 1,000,000,000,000 | Decimal |
| Tebibyte (TiB) | 1,099,511,627,776 | Binary |
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
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
(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
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
- NIST, Prefixes for binary multiples: binary prefixes (Ki, Mi, Gi, Ti) as powers of 1,024 and SI prefixes as powers of 1,000
