Data
How To Convert Data Sizes
Data sizes use two conventions that differ by about two and a half percent per step. A converter that offers both decimal and binary units shows exactly where the missing space on a drive goes.
Quick Answer
Result = value x from-factor / to-factor
- value
- Amount you start with
- from
- Size of the source unit in bytes
- to
- Size of the target unit in bytes
Every data unit has a fixed size in bytes. Eight bits make a byte, a decimal kilobyte is 1000 bytes while a kibibyte is 1024, so one gibibyte is 1,073,741,824 bytes and a one terabyte drive holds about 0.9094947 tebibytes, which an operating system reports as roughly 931 gigabytes.
What Is How To Convert Data Sizes?
Digital storage is measured in bytes, and a byte is eight bits. Bits are the smallest unit and appear in network speeds, while bytes are the unit of storage capacity.
Two conventions coexist. The decimal convention uses powers of a thousand, so a kilobyte is 1000 bytes, a megabyte is a million and a gigabyte is a billion.
The binary convention uses powers of 1024, which is two to the tenth. A kibibyte is 1024 bytes, a mebibyte is 1,048,576 and a gibibyte is 1,073,741,824.
The gap between the two grows with each step because the ratio 1024 over 1000 compounds. At the kilobyte it is 2.4 percent, at the gigabyte it is about 7.4 percent and at the terabyte it is nearly ten percent.
This is why a drive sold as one terabyte, using decimal units, appears as about 931 gigabytes in an operating system that displays binary units. The capacity has not changed; the unit has.
The International Electrotechnical Commission defined the binary prefixes kibi, mebi, gibi, tebi and pebi to remove the ambiguity. A kibibyte is always 1024 bytes and a kilobyte is always 1000.
The converter expresses every unit as a size in bytes and converts by multiplying the value by the source factor and dividing by the target factor. That keeps every pair consistent, including bits.
The bit to byte conversion is fixed at eight in both conventions. Eight bits make a byte regardless of whether the byte is counted in decimal or binary units.
Network speeds are usually quoted in bits per second, so a one gigabit link moves 1,000,000,000 bits per second, which is 125,000,000 bytes per second, or 125 megabytes per second.
Storage is usually quoted in bytes, so a one terabyte drive is 1,000,000,000,000 bytes in decimal terms, which equals about 0.9095 tebibytes.
A common mistake is to assume the prefixes always mean a power of 1024. Modern standards reserve the SI prefixes for powers of a thousand and the binary prefixes for powers of 1024.
A second trap is to compare a network speed in bits with a storage size in bytes without dividing by eight, which overstates the transfer rate eightfold.
Cloud storage and phone plans are quoted in decimal gigabytes, while the file manager on the same device shows binary units. A 128 gigabyte phone shows about 119 gibibytes of space before the operating system takes its share.
Internet plans are sold in megabits per second, so a 100 megabit connection downloads at about 12.5 megabytes per second. Dividing by eight converts the marketing figure into a file-transfer rate.
Backups and archives are sized in terabytes, and the gap between decimal and binary units grows with each step. A 10 terabyte array holds about 9.09 tebibytes, a difference of nearly a terabyte.
Memory is usually quoted in binary units because it is addressed in powers of two, while storage is quoted in decimal units by convention. Knowing which is which explains most capacity confusion.
Scientific data sets can reach petabytes, where the prefix arithmetic still holds but the numbers are large. One petabyte is a thousand terabytes, or about 0.888 pebibytes.
The calculator models the fixed relationships between the units and nothing more. It does not know which convention a manufacturer used on a label, so check the unit and treat the output as exact arithmetic on the number you entered.
Formula
Result = value x from / to
Each unit is expressed in bytes, so the ratio of factors converts directly.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| v | Value | number | Amount to convert. |
| f | From factor | number | Source unit size in bytes. |
| t | To factor | number | Target unit size in bytes. |
TiB = TB x 10^12 / 2^40
A decimal terabyte is 10 to the twelfth bytes and a tebibyte is 2 to the fortieth bytes.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| TB | Terabytes | number | Capacity in decimal terabytes. |
| TiB | Tebibytes | number | The same capacity in binary tebibytes. |
How To Calculate How To Convert Data Sizes
- 1
Enter the amount
Type the data size you want to convert.
- 2
Pick the source unit
Choose the unit the value is currently in, such as gibibytes.
- 3
Pick the target unit
Choose the unit you want, such as bytes.
- 4
Multiply by the source factor
The value is expressed in bytes using the source unit's size.
- 5
Divide by the target factor
Converting from the base byte into the target unit gives the answer.
Examples
Example 1: 1 gibibyte to bytes
- Amount
- 1
- From unit
- Gibibyte (GiB)
- To unit
- Byte
| Step | Calculation | Result |
|---|---|---|
| Bytes in a mebibyte | 1024 x 1024 | 1048576 |
| Bytes in a gibibyte | 1048576 x 1024 | 1073741824 |
| Bits in a gibibyte | 1073741824 x 8 | 8589934592 |
Result: One gibibyte is 1073741824 bytes, which is 8589934592 bits.
Example 2: 1 terabyte to tebibytes
- Amount
- 1
- From unit
- Terabyte (TB)
- To unit
- Tebibyte (TiB)
| Step | Calculation | Result |
|---|---|---|
| Bytes in a terabyte | 1 x 1000000000000 | 1000000000000 |
| Bytes in a tebibyte | 1099511627776 | 1099511627776 |
| Result in tebibytes | 1000000000000 / 1099511627776 | 0.9094947 |
Result: A decimal terabyte is 1000000000000 bytes, which is 0.9094947 tebibytes, the roughly 931 gigabytes an operating system reports.
Calculator
Converted value
1,073,741,824
- Value in bytes
- 1,073,741,824
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the How To Convert Data Sizes calculator page.
Common Mistakes
Assuming every prefix means 1024
Modern standards use SI prefixes for powers of a thousand and binary prefixes for powers of 1024. A kilobyte is 1000 bytes and a kibibyte is 1024.
Mixing bits and bytes
There are eight bits in a byte. Comparing a network speed in bits with a file size in bytes without dividing by eight overstates the rate eightfold.
Blaming a manufacturer for missing space
A one terabyte drive holds a trillion bytes. The smaller number an operating system shows is the same capacity in binary units, not lost space.
Rounding very small conversions to zero
One byte is about nine times ten to the minus thirteen terabytes. Rounding it to zero loses the entire value.
Forgetting the compounding gap
The 2.4 percent difference at the kilobyte grows to nearly ten percent at the terabyte because the ratio compounds with each step.
Using the wrong prefix for a network link
A gigabit link is a billion bits per second, which is 125 megabytes per second, not a billion bytes per second.
FAQ
How many bits in a byte?
Eight, in both the decimal and the binary convention. The bit to byte conversion is always a factor of eight.
Why is a one terabyte drive about 931 gigabytes?
Manufacturers use decimal terabytes of 10 to the twelfth bytes, while operating systems often display binary units. The same capacity is about 0.9095 tebibytes, which shows as roughly 931 gibibytes.
What is a kibibyte?
1024 bytes, using the binary prefix defined by the International Electrotechnical Commission. A kilobyte is 1000 bytes.
How many megabytes in a gigabyte?
A thousand in decimal units, or 1024 in binary units. The answer depends on the convention.
How do I convert a network speed to a file transfer rate?
Divide the bit rate by eight to get bytes per second. A one gigabit link moves 125 megabytes per second.
Which convention should I use?
Use decimal units for marketing and storage capacity, and binary units when an operating system reports file sizes. The converter offers both so you can compare.
References
- [1]International Electrotechnical Commission, Binary prefixes — https://www.iec.ch/
- [2]National Institute of Standards and Technology, SI prefixes — https://www.nist.gov/pml/owm/metric-si-prefixes
- [3]Encyclopaedia Britannica, Byte — https://www.britannica.com/technology/byte