Byte Conversion Calculator
Convert between bytes, kilobytes, megabytes, gigabytes, terabytes, and their binary equivalents. Understand decimal vs binary storage units.
Byte Conversion Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Decimal: 1 KB = 10^3 B, 1 MB = 10^6 B, 1 GB = 10^9 B | Binary: 1 KiB = 2^10 B, 1 MiB = 2^20 B, 1 GiB = 2^30 B
Worked example โ 2 TB (decimal) = 1.818 TiB (binary), shown as ~1.81 TB in Windows
Formula
Decimal: 1 KB = 10^3 B, 1 MB = 10^6 B, 1 GB = 10^9 B | Binary: 1 KiB = 2^10 B, 1 MiB = 2^20 B, 1 GiB = 2^30 B
Byte conversion uses either decimal (base-10) or binary (base-2) prefixes. Decimal prefixes multiply by 1,000 at each level and follow SI standards. Binary prefixes multiply by 1,024 at each level and follow IEC standards. The choice affects storage calculations, especially at larger scales.
Worked Examples
Example 1: Hard Drive Advertised vs Actual
Problem:A 2 TB external hard drive shows 1.81 TB in Windows. Why?
Solution:Advertised: 2 TB = 2,000,000,000,000 bytes Windows uses binary: 2,000,000,000,000 / 1,073,741,824 = 1,862.645 GiB 1,862.645 / 1,024 = 1.818 TiB Windows displays this as approximately 1.81 TB
Result:2 TB (decimal) = 1.818 TiB (binary), shown as ~1.81 TB in Windows
Example 2: Cloud Storage Comparison
Problem:How many 5 MB photos can fit in 15 GB of cloud storage?
Solution:15 GB = 15,000,000,000 bytes Each photo = 5,000,000 bytes 15,000,000,000 / 5,000,000 = 3,000 photos
Result:15 GB can store approximately 3,000 photos at 5 MB each
Frequently Asked Questions
What is the difference between KB, MB, GB, and TB?
These are progressively larger units of digital storage. A kilobyte (KB) is 1,000 bytes and can store a short text file. A megabyte (MB) is 1,000 KB and holds roughly one high-resolution photo. A gigabyte (GB) is 1,000 MB, enough for about 250 songs. A terabyte (TB) is 1,000 GB, which can store around 250,000 photos or 500 hours of HD video. Each step up multiplies by 1,000 in the decimal (SI) system.
Why does my hard drive show less space than advertised?
This discrepancy occurs because drive manufacturers measure in decimal gigabytes (1 GB = 1,000,000,000 bytes) while operating systems like Windows display storage using binary gibibytes (1 GiB = 1,073,741,824 bytes). A 1 TB drive contains 1,000,000,000,000 bytes, which equals approximately 931.32 GiB when your OS divides by powers of 1,024. Additional space is also used by the file system structure, formatting overhead, and sometimes a hidden recovery partition.
How many bytes are in a kilobyte - 1000 or 1024?
Technically, 1 kilobyte (KB) equals 1,000 bytes according to the SI (International System of Units) standard. The value 1,024 bytes is properly called a kibibyte (KiB), using the IEC binary prefix. Historically, the computing industry used KB to mean 1,024 bytes because it is the nearest power of 2 to 1,000, but this caused confusion. The IEC introduced binary prefixes in 1998 to clarify: KiB (1,024), MiB (1,048,576), GiB (1,073,741,824), etc.
What is a petabyte and how much data can it hold?
A petabyte (PB) equals 1,000 terabytes or approximately 1 quadrillion bytes (10 to the 15th power). To put this in perspective, 1 PB could store about 500 billion pages of text, 3.4 years of continuous 24/7 HD video recording, or roughly 250,000 DVDs worth of data. Major internet companies like Google and Facebook process petabytes of data daily. The entire Library of Congress print collection is estimated at about 10 TB, so 1 PB would hold about 100 copies.
Why do macOS and Windows report different sizes for the same file?
They divide by different bases while using the same labels. Since Snow Leopard, macOS counts storage in decimal units, so a file of 1,000,000,000 bytes reads as 1.0 GB. Windows divides by powers of 1,024 but still writes GB, so the same file reads as 0.93 GB. Nothing about the file changed; only the divisor did. When two tools disagree, compare the raw byte count, which is unambiguous, rather than the prefixed figure.
What is the difference between raw and formatted capacity?
Raw capacity is the total number of addressable bytes on the medium. Formatted capacity is what remains after the filesystem writes its own structures: superblocks, allocation tables or inode maps, a journal, and directory metadata. Some filesystems also reserve a percentage of blocks for privileged processes so the volume stays usable when nearly full. Solid state drives additionally hold back over-provisioned flash for wear leveling that never appears in the user-visible total.
Why do thousands of tiny files consume far more space than their sizes suggest?
Filesystems allocate storage in fixed-size clusters or blocks, and a file always occupies whole units. With a 4 KiB cluster, a single-byte file still consumes 4,096 bytes, wasting the remainder in what is called internal fragmentation or slack space. Ten thousand such files take about 41 MB on disk despite holding 10 kB of data. Choosing a smaller cluster size reduces the waste but increases metadata overhead and can slow sequential throughput on large files.
How do I estimate the storage needed for a media library?
Multiply the file count by the average file size, then add headroom for growth and for the cluster and metadata overhead above. Five thousand photos averaging 4.5 MB come to 22,500 MB, which is 22.5 GB in decimal units or about 20.95 GiB as an operating system would report it. Because averages hide a long tail of unusually large files, sizing to the measured average alone tends to run short; a twenty to thirty percent margin is a practical starting point.
How does RAID or replication change the usable capacity of an array?
Redundancy is paid for in capacity. Mirroring stores every block twice, so usable space is half the raw total. Single-parity schemes give up the equivalent of one member drive, and double-parity two: six 4 TB drives total 24 TB raw, which becomes 20 TB with single parity or 16 TB with double parity, before any filesystem overhead. Distributed storage systems that keep three replicas leave one third of raw capacity usable. Always size an array from the usable figure, not the sticker total.
Why is RAM sized differently from disk storage?
Memory is addressed by binary address lines, so module capacities are manufactured in powers of two and are quoted in binary units throughout the industry. An 8 GB memory module really contains 8 x 2 to the 30th, or 8,589,934,592 bytes. Disk and flash vendors instead sell in decimal units, where 8 GB means 8,000,000,000 bytes. The same prefix therefore means two different quantities depending on whether you are looking at memory or storage, a difference of about 7.4 percent at the gigabyte scale.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎBit to Byte Converter
Calculate bit to byte converter with inputs, formulas, and instant results.
๐งฎAstronomical Unit Calculator
Calculate astronomical unit with inputs, formulas, and instant results.
๐งฎLight Year Conversion
Calculate light year conversion with inputs, formulas, and instant results.
๐งฎCCF to Gallons Conversion
Calculate ccfto gallons conversion with inputs, formulas, and instant results.
๐งฎDrops to mL Conversion
Calculate dropstoml conversion with inputs, formulas, and instant results.
๐งฎPint to Pound Conversion
Calculate pintto pound conversion with inputs, formulas, and instant results.
๐งฎQuarts to Pounds Conversion
Calculate quartsto pounds conversion with inputs, formulas, and instant results.
๐งฎVolume Conversion
Calculate volume conversion with inputs, formulas, and instant results.