Data Storage Unit Converter
Convert data storage between bits, bytes, KB, MB, GB, TB, PB and binary units (KiB, MiB, GiB).
Converted value
—
Bytes (B)
—
Kilobytes (KB)
—
Megabytes (MB)
—
Gigabytes (GB)
—
Gibibytes (GiB)
—
Terabytes (TB)
—
Calculation Details
Embed This Calculator
Copy the code and paste it into any webpage to embed this calculator.
WordPress users: add a Custom HTML block (not the Embed block) and paste the code there.
Free to use. A small "Powered by Blucalculator" credit is appreciated but not required.
How to use this calculator
Three inputs, one result.
Value is the number you’re converting. Type it in. Large numbers, decimals, and scientific notation all work.
From unit is the unit your number is currently in. The dropdown includes every standard unit: Bit (b), Byte (B), Kilobit (kb), Kilobyte (KB), Kibibyte (KiB), Megabit (Mb), Megabyte (MB), Mebibyte (MiB), Gigabit (Gb), Gigabyte (GB), Gibibyte (GiB), Terabyte (TB), Tebibyte (TiB), Petabyte (PB), Pebibyte (PiB), and more.
To unit is your target. Same list. Select whatever format you need.
Click Calculate and the result appears instantly with the converted value and the conversion factor used.
Example: converting 1 GB to bytes
Value: 1 / From unit: Gigabyte (GB) / To unit: Byte (B)
Result: 1,000,000,000 bytes (decimal definition)
Now convert 1 GiB to bytes instead: Result: 1,073,741,824 bytes (binary definition)
That 7.4% difference is why Windows and macOS report the same file at different sizes.
If you’re converting storage shown by an operating system (Windows, macOS, Linux), use binary units (KiB, MiB, GiB, TiB). If you’re converting storage advertised by a hard drive or SSD manufacturer, or data from your internet plan, use decimal units (KB, MB, GB, TB).
The decimal vs binary problem: explained once clearly
This is the one thing worth understanding before using any data storage calculator.
Decimal units (the SI standard): 1 KB = 1,000 bytes. 1 MB = 1,000,000 bytes. 1 GB = 1,000,000,000 bytes. Powers of 10. Clean round numbers. Used by hard drive manufacturers, SSD makers, network providers, and most consumer marketing.
Binary units (how computers actually address memory): 1 KiB = 1,024 bytes. 1 MiB = 1,048,576 bytes. 1 GiB = 1,073,741,824 bytes. Powers of 2. Used internally by operating systems, compilers, and low-level software.
The problem started because early computer scientists used “kilobyte” to mean 1,024 bytes (conveniently close to 1,000) and the habit stuck. Decades later, hard drive manufacturers started using the strict SI definition (1,000) because it made their drives sound bigger. A “500 GB” hard drive holds 500,000,000,000 bytes in decimal. An operating system that counts in binary reports this as 465.66 GiB.
In 1998, the IEC introduced the binary prefixes (kibi, mebi, gibi, tebi) to end the ambiguity. Most technical documentation now uses them correctly. Consumer products still mostly don’t.
The gap between a "1 TB" hard drive and what your OS reports is not a bug. It's 931 GiB: the same number of bytes, counted two different ways.
The formulas
All conversions go through bits as the base unit.
Decimal chain (powers of 10):
Binary chain (powers of 2):
To convert between any two units: convert both to bits using their factor, then divide. That’s what the calculator does internally.
Mixing decimal and binary in the same calculation gives wrong results. If you’re calculating how many GB of files fit on a 500 GB (decimal) drive, use decimal GB throughout. If your OS reports file sizes in GiB, use GiB throughout. The calculator keeps them separate; you need to choose the right system for your question before you start.
Decimal storage units: full conversion table
| Unit | Symbol | Bytes | Bits |
|---|---|---|---|
| Bit | b | 0.125 | 1 |
| Byte | B | 1 | 8 |
| Kilobyte | KB | 1,000 | 8,000 |
| Megabyte | MB | 1,000,000 | 8,000,000 |
| Gigabyte | GB | 1,000,000,000 | 8,000,000,000 |
| Terabyte | TB | 1,000,000,000,000 | 8,000,000,000,000 |
| Petabyte | PB | 1,000,000,000,000,000 | 8 × 10¹⁵ |
| Exabyte | EB | 1,000,000,000,000,000,000 | 8 × 10¹⁸ |
| Zettabyte | ZB | 1,000,000,000,000,000,000,000 | 8 × 10²¹ |
Binary storage units: full conversion table
| Unit | Symbol | Bytes | Exact bytes |
|---|---|---|---|
| Kibibyte | KiB | 2¹⁰ | 1,024 |
| Mebibyte | MiB | 2²⁰ | 1,048,576 |
| Gibibyte | GiB | 2³⁰ | 1,073,741,824 |
| Tebibyte | TiB | 2⁴⁰ | 1,099,511,627,776 |
| Pebibyte | PiB | 2⁵⁰ | 1,125,899,906,842,624 |
| Exbibyte | EiB | 2⁶⁰ | 1,152,921,504,606,846,976 |
GB vs GiB: the gap at every storage size
This is the table that explains every “why does my hard drive show less space than advertised” conversation.
| Advertised (decimal GB) | OS reports (binary GiB) | Difference | % gap |
|---|---|---|---|
| 8 GB | 7.45 GiB | 0.55 GiB | 6.9% |
| 16 GB | 14.90 GiB | 1.10 GiB | 6.9% |
| 32 GB | 29.80 GiB | 2.20 GiB | 6.9% |
| 64 GB | 59.60 GiB | 4.40 GiB | 6.9% |
| 128 GB | 119.21 GiB | 8.79 GiB | 6.9% |
| 256 GB | 238.42 GiB | 17.58 GiB | 6.9% |
| 512 GB | 476.84 GiB | 35.16 GiB | 6.9% |
| 1 TB (1,000 GB) | 931.32 GiB | 68.68 GiB | 6.9% |
| 2 TB | 1,862.65 GiB | 137.35 GiB | 6.9% |
| 4 TB | 3,725.29 GiB | 274.71 GiB | 6.9% |
| 8 TB | 7,450.58 GiB | 549.42 GiB | 6.9% |
The gap is always exactly 6.87%, because 1,000³ / 1,024³ = 0.9313. So a 1 TB drive (1 × 10¹² bytes) contains 0.9313 × 2³⁰ × 2³⁰ gibibytes = 931.32 GiB. This never changes regardless of drive size. The percentage gap is constant.
Common conversions: quick reference
Bits to bytes and back
| Bits | Bytes | Kilobytes | Megabytes |
|---|---|---|---|
| 1 | 0.125 | 0.000125 | 0.000000125 |
| 8 | 1 | 0.001 | 0.000001 |
| 1,000 | 125 | 0.125 | 0.000125 |
| 8,000 | 1,000 | 1 | 0.001 |
| 1,000,000 | 125,000 | 125 | 0.125 |
| 8,000,000 | 1,000,000 | 1,000 | 1 |
Megabytes to gigabytes
| MB | GB (decimal) | GiB (binary) |
|---|---|---|
| 100 | 0.1 | 0.0954 |
| 500 | 0.5 | 0.4768 |
| 1,000 | 1.0 | 0.9537 |
| 1,500 | 1.5 | 1.4305 |
| 2,000 | 2.0 | 1.9073 |
| 4,000 | 4.0 | 3.8147 |
| 8,000 | 8.0 | 7.6294 |
| 16,000 | 16.0 | 15.2588 |
Gigabytes to terabytes
| GB | TB (decimal) | TiB (binary) |
|---|---|---|
| 100 | 0.1 | 0.0909 |
| 250 | 0.25 | 0.2274 |
| 500 | 0.5 | 0.4547 |
| 750 | 0.75 | 0.6821 |
| 1,000 | 1.0 | 0.9095 |
| 2,000 | 2.0 | 1.8190 |
| 5,000 | 5.0 | 4.5475 |
| 10,000 | 10.0 | 9.0949 |
How much storage common things actually take
A reference point for when a converted number doesn’t feel intuitive.
| Item | Approximate size | In megabytes | In gigabytes |
|---|---|---|---|
| Plain text email | ~20 KB | 0.02 MB | 0.00002 GB |
| Word document (10 pages, no images) | ~50-100 KB | 0.05-0.1 MB | ~0.0001 GB |
| Compressed JPEG photo (smartphone) | 3-5 MB | 3-5 MB | 0.003-0.005 GB |
| RAW photo (full-frame DSLR) | 25-50 MB | 25-50 MB | 0.025-0.05 GB |
| 3-minute MP3 (128 kbps) | ~3 MB | 3 MB | 0.003 GB |
| 3-minute FLAC (lossless audio) | ~20-30 MB | 20-30 MB | 0.02-0.03 GB |
| 1 hour video (1080p, compressed) | 1-4 GB | 1,000-4,000 MB | 1-4 GB |
| 1 hour video (4K RAW) | 50-200 GB | 50,000-200,000 MB | 50-200 GB |
| Typical smartphone app | 50-500 MB | 50-500 MB | 0.05-0.5 GB |
| PC game (modern, large) | 50-150 GB | 50,000-150,000 MB | 50-150 GB |
| Feature film (4K Blu-ray) | 50-100 GB | 50,000-100,000 MB | 50-100 GB |
| OS install (Windows 11) | ~20-30 GB | 20,000-30,000 MB | ~20-30 GB |
Real-world examples
Why your 512 GB phone shows less free space
You buy a 512 GB iPhone. Out of the box, Settings shows around 488 GB available (before the OS). Where did 24 GB go?
Advertised vs available storage breakdown
Advertised: 512 GB = 512,000,000,000 bytes (decimal)
OS reports in GiB: 512,000,000,000 / 1,073,741,824 = 476.84 GiB
iOS displays this as roughly 477 GB (it uses decimal labels but binary counting, adding to the confusion). The OS itself takes roughly 15-20 GB of that, leaving approximately 457-462 GB usable.
No bytes are missing. The counting method changed.
Estimating how many photos fit on a memory card
A 64 GB SD card, JPEG photos averaging 8 MB each.
Photo capacity on a 64 GB card
Card actual bytes: 64,000,000,000 bytes JPEG size: 8,000,000 bytes (8 MB)
Photos that fit: 64,000,000,000 / 8,000,000 = 8,000 photos
In practice, slightly fewer because the card’s file system reserves some space (typically 1-5%). Realistic estimate: 7,600-7,900 photos.
Calculating download time
A game is 85 GB. Your internet connection is 500 Mbps (megabits per second). How long to download?
Download time calculation
File size: 85 GB = 85,000,000,000 bytes = 680,000,000,000 bits = 680,000 Mb
Connection speed: 500 Mbps
Time = 680,000 Mb / 500 Mbps = 1,360 seconds = 22.7 minutes
In practice, real-world download speeds are 60-80% of advertised maximum, so budget 28-38 minutes.
Key step: convert GB (bytes) to Mb (megabits) before dividing by the connection speed in Mbps. 1 byte = 8 bits, so multiply GB by 8,000 to get Mb.
Cloud storage planning
You have 47,000 photos averaging 4.5 MB each and 320 videos averaging 800 MB each. Will they fit in a 200 GB cloud plan?
Total storage needed
Photos: 47,000 × 4.5 MB = 211,500 MB = 211.5 GB Videos: 320 × 800 MB = 256,000 MB = 256 GB
Total: 211.5 + 256 = 467.5 GB
You need at least a 500 GB or 1 TB plan. The 200 GB plan won’t cover it.
Common mistakes people make
Mixing decimal and binary in one calculation. If you’re working out how many GiB of files fit on a drive reported in GiB by your OS, keep everything in binary. If you’re comparing drive specs, keep everything in decimal GB. Switching between the two midway gives numbers that are off by up to 7% at the GB level and compound at TB scale.
Confusing megabits and megabytes for download speeds. Internet speeds are almost always quoted in megabits per second (Mbps). File sizes are almost always in megabytes (MB). 1 MB = 8 Mb. A 100 Mbps connection downloads at 12.5 MB/s, not 100 MB/s. This is the most widespread data unit error in everyday use.
Assuming “KB” always means 1,024 bytes. In most modern technical contexts, 1 KB = 1,000 bytes (decimal). The binary version is KiB. But old software, legacy systems, and many casual references still use KB to mean 1,024. When precision matters, check which definition the source is using.
Treating storage capacity as usable space. A 1 TB drive has 931 GiB of raw space. Of that, the file system (NTFS, APFS, ext4) reserves additional space for its own overhead: typically 5-10% depending on the format and cluster size. Actual usable space on a “1 TB” drive is closer to 850-900 GiB for a freshly formatted drive.
Using network transfer rates to estimate physical copy speed. USB 3.0 has a rated max of 5 Gbps. A fast SSD reads at 3,500 MB/s = 28,000 Mbps. In practice, USB 3.0 real-world copy speeds are 300-400 MB/s because of protocol overhead, file system bottlenecks, and small file penalties. Never trust theoretical maximums for real-world transfer estimates.
When working with RAM, always use binary units. RAM is addressed in powers of 2 by hardware design. A “16 GB” stick of RAM contains exactly 16 GiB = 17,179,869,184 bytes. This is one case where the industry correctly uses binary counting even while writing “GB” on the packaging.
Where each unit is actually used
Not every unit shows up in everyday life. Here’s where you’ll actually encounter each one.
| Unit | Where you see it |
|---|---|
| Bit (b) | Network speeds (100 Mbps internet), serial data rates |
| Byte (B) | File system sectors, low-level programming |
| KB / KiB | Small files, email attachments, config files |
| MB / MiB | Photos, songs, app downloads, RAM in older devices |
| GB / GiB | Phone storage, SSD capacity, RAM in modern devices, game sizes |
| TB / TiB | Hard drives, NAS systems, cloud backup, data centre disks |
| PB / PiB | Data centre storage, enterprise backup archives, big data systems |
| EB and above | Hyperscale cloud providers (Google, Amazon), global internet traffic statistics |
Most people never need anything above TB in day-to-day life. PB starts appearing in professional data engineering. EB and ZB are used mainly in industry reports about total global data volumes.
As of 2024, estimates put total global data storage at roughly 120 zettabytes. The entire internet’s indexed content is roughly 4-5 petabytes. A typical hospital PACS (medical imaging) system holds 10-50 terabytes. A modern smartphone holds 128-512 gigabytes. These reference points help calibrate whether a converted number makes intuitive sense.
The bottom line
Data storage units look simple until you hit the decimal-versus-binary divide, and then they’re genuinely confusing for good reason. Two definitions of “gigabyte” exist simultaneously and neither is going away.
The rule of thumb: hard drive manufacturers use decimal (1 GB = 1,000,000,000 bytes). Operating systems use binary (1 GiB = 1,073,741,824 bytes). Internet speeds use bits. Everything else uses bytes. Keep those four contexts straight and the calculator handles the arithmetic.
Enter your value, pick your units, and read the result. If the number looks wrong, check whether you need the decimal or binary version of the unit you selected.
Frequently Asked Questions
What is the difference between GB and GiB?
1 GB (Gigabyte) = 1,000,000,000 bytes (decimal system). 1 GiB (Gibibyte) = 1,073,741,824 bytes (binary system). Hard drive manufacturers use GB (smaller number looks larger), while operating systems often report in GiB — which is why a "1 TB" drive shows ~931 GiB in Windows.
How many bytes in a gigabyte?
1 GB (decimal) = 1,000,000,000 bytes = 10⁹ bytes. 1 GiB (binary) = 1,073,741,824 bytes = 2³⁰ bytes. The difference is about 7.4% — small for single files but significant at terabyte scale.
How big is a typical photo, video, or game?
JPEG photo: 2–6 MB. RAW photo: 20–40 MB. 4K video (1 min): ~400 MB. Blu-ray movie: 25–50 GB. Modern AAA game: 50–150 GB. 4K Blu-ray: 66–100 GB.
How many MB in a GB?
1 GB = 1,000 MB (decimal). 1 GiB = 1,024 MiB (binary). For practical purposes most people use 1 GB ≈ 1,000 MB, which is the decimal standard used by storage manufacturers.
What is a petabyte?
1 PB = 1,000 TB = 1,000,000 GB. Facebook generates about 4 PB of data per day. The entire printed collection of the US Library of Congress is estimated at about 10 TB — so 1 PB holds 100 Library of Congress collections.
Why does my 1TB hard drive show less space than expected?
Drive manufacturers use decimal GB (1 TB = 1,000,000,000,000 bytes). Windows reports in binary GiB: 1,000,000,000,000 ÷ 1,073,741,824 ≈ 931 GiB. macOS switched to decimal GB in 10.6+ so it shows the full 1,000 GB.