File Size Conversion Calculator: How to Use It
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator converts between common file size units — bytes, kilobytes, megabytes, gigabytes, and terabytes — so you can instantly see how many MB are in a GB or how many KB are in a TB. Enter any size in one unit, and you get the equivalent in all the others, using either the decimal (1 KB = 1,000 bytes) or binary (1 KiB = 1,024 bytes) system. The result appears immediately as you type, and the formula below explains exactly how each conversion is done.
Formula
The core formula is a simple power relationship. For a given input value V in the base unit (bytes), the equivalent in a larger unit is:
Larger unit = V / (base)n
where base is 1,000 for the decimal system or 1,024 for the binary system, and n is the step count: 1 for kilobytes, 2 for megabytes, 3 for gigabytes, 4 for terabytes. For example, to convert 5,000,000 bytes to megabytes in the decimal system: 5,000,000 / (1000)2 = 5 MB. In the binary system: 5,000,000 / (1024)2 ≈ 4.77 MiB.
Worked Example
Using the calculator defaults: value = 1, system = Decimal (base 1000).
- Bytes: 1 × (1000)0 = 1 B
- Kilobytes: 1 × (1000)1 = 1,000 KB
- Megabytes: 1 × (1000)2 = 1,000,000 MB
- Gigabytes: 1 × (1000)3 = 1,000,000,000 GB
- Terabytes: 1 × (1000)4 = 1,000,000,000,000 TB
So with the default settings, 1 byte equals 1,000 KB, 1,000,000 MB, 1,000,000,000 GB, and 1,000,000,000,000 TB. The calculator shows these with two decimal places, so you see 1,000.00 KB, 1,000,000.00 MB, etc.
Why Two Systems? Decimal vs. Binary
The confusion arises because hard drive manufacturers use the decimal system (1 GB = 1,000,000,000 bytes), while operating systems like Windows often use the binary system (1 GiB = 1,073,741,824 bytes). That’s why a “500 GB� hard drive shows up as about 465 GB in Windows — it’s actually 500,000,000,000 bytes, which is roughly 465.66 GiB. The International Electrotechnical Commission (IEC) introduced the binary prefixes (kibi, mebi, gibi) to end this ambiguity, but many people still say “GB� when they mean “GiB�. This calculator lets you switch between the two, so you can see both numbers and understand what a device or file size actually represents.
How to Use the Calculator
Using the tool is straightforward:
- Enter a numeric value in the “Value� field. It can be any non-negative number — a file size, a storage capacity, or even a decimal like 0.5.
- Choose the system: Decimal (1000) for marketing specs and most cloud storage, Binary (1024) for Windows and many technical contexts.
- Read the outputs: the calculator shows bytes, KB, MB, GB, and TB simultaneously. The first output (bytes) is the headline answer, but you can look at any row.
For example, to convert 2 GB to MB in the decimal system, enter 2 in the Value field and select Decimal. The MB row will show 2,000.00 MB. To see the binary equivalent, switch to Binary and you’ll get 2,048.00 MiB.
Common Mistakes and Misconceptions
The most common error is mixing up the two bases. If you’re comparing a file size from a Mac (which uses decimal) with a Windows folder (which uses binary), you’ll see different numbers for the same file. Another mistake is rounding too early: converting 1.5 GB to MB in decimal gives 1,500 MB, but if you round 1.5 to 2 first, you’ll get 2,000 MB — a 33% error. Also, remember that “KB� and “KiB� are not the same: 1 KB = 1,000 bytes, 1 KiB = 1,024 bytes. When in doubt, check the unit label: if it says “KiB�, it’s binary; if it says “KB�, it could be either, but the calculator lets you choose.
When to Use Which System
Here’s a practical guide:
- Hard drives, SSDs, USB drives: Manufacturers use decimal. A “1 TB� drive is 1,000,000,000,000 bytes.
- Windows File Explorer: Uses binary (GiB) for display, but labels them as GB. So a 1 TB drive shows as about 931 GB.
- macOS and most Linux file managers: Use decimal (GB) for display, so a 1 TB drive shows as 1 TB.
- Data transfer rates (Mbps, Gbps): Always decimal. 1 Gbps = 1,000,000,000 bits per second.
- RAM and memory: Almost always binary. 8 GB RAM = 8 GiB = 8,589,934,592 bytes.
If you’re not sure, check the context. For network speeds, use decimal. For memory modules, use binary. For file sizes, it depends on the operating system you’re using.
Limitations of the Formula
The formula is purely mathematical and assumes the input is in bytes. If you have a value in KB and want to convert to MB, you must first convert it to bytes (multiply by the base) or use the calculator by entering the value in the appropriate unit — but this calculator takes bytes as the base, so you’d enter the byte count. For example, to convert 500 KB to MB in decimal, enter 500,000 (bytes) as the value. The calculator doesn’t handle compound units like “KB/s� or “MB per second� — those require a time element. Also, the binary system uses 1,024, not 1,000, so the results will differ by about 2.4% for each step (e.g., 1 MB vs 1 MiB).
Frequently Asked Questions
Why does my 1 TB hard drive show only 931 GB in Windows?
Because Windows uses binary (GiB) for display. The drive has 1,000,000,000,000 bytes. Dividing by 1,0243 (1,073,741,824) gives approximately 931.32 GiB. That’s the number you see. It’s not a defect; it’s a unit mismatch.
Is 1 GB equal to 1000 MB or 1024 MB?
Both are correct depending on context. In the decimal system (used by storage manufacturers and most cloud services), 1 GB = 1,000 MB. In the binary system (used by Windows and RAM), 1 GiB = 1,024 MiB. The calculator lets you toggle between them.
What is the difference between KB and KiB?
KB (kilobyte) is 1,000 bytes in the decimal system. KiB (kibibyte) is 1,024 bytes in the binary system. The names were standardized by the IEC to avoid confusion. Many operating systems still use the wrong label, so a file that is 1,024 bytes might be shown as “1 KB� even though it’s actually 1 KiB.
How do I convert MB to GB manually?
Divide the number of MB by 1,000 for decimal, or by 1,024 for binary. For example, 5,000 MB ÷ 1,000 = 5 GB (decimal). 5,000 MiB ÷ 1,024 ≈ 4.88 GiB (binary). You can also use the calculator by entering the byte value: 5,000 MB = 5,000,000 bytes (decimal) or 5,242,880 bytes (binary).
Which system should I use for a file size on a USB drive?
It depends on the operating system. If you’re on Windows, the file properties will show binary (GiB) but label it as GB. If you’re on macOS or Linux, it will show decimal (GB). To compare with the drive’s advertised capacity, use decimal. To match what Windows shows, use binary.
Does this calculator work for bits as well?
No, it only works for bytes. To convert bits, you’d first divide by 8 to get bytes, then use the calculator. For example, 8,000,000 bits = 1,000,000 bytes = 1 MB (decimal). This calculator is specifically for file sizes, which are typically measured in bytes.
Related
Formula used
in value | Value | - | 1 | 0 sel system | System | Decimal (1000)=1000, Binary (1024)=1024 out bytes | Bytes | B | value * pow(sel_system, 0) | 0 out kb | Kilobytes | KB | value * pow(sel_system, 1) | 2 out mb | Megabytes | MB | value * pow(sel_system, 2) | 2 out gb | Gigabytes | GB | value * pow(sel_system, 3) | 2 out tb | Terabytes | TB | value * pow(sel_system, 4) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.