File Size Converter
Convert file sizes between bytes, kilobytes, megabytes, gigabytes, and terabytes.
Unit convention: KB, MB, GB and TB selections use binary multiples (1,024 bytes per KB; GB means 1,024³ bytes here, equivalent to GiB). This differs from decimal GB used by some providers.
About the File Size Calculator
File sizes scale from bytes up to terabytes, and converting between them is a frequent need when checking storage space, upload limits, or download sizes. This calculator converts any file size between bytes, kilobytes, megabytes, gigabytes, and terabytes instantly.
How It Works
The calculator converts your input value to bytes using the binary (1024-based) scale that operating systems typically use for file sizes, then converts that byte value into your target unit.
Value (bytes) = Input × 1024^(unit power); Result = Value (bytes) / 1024^(target unit power). 1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB.
Worked example
Scenario: Converting 2.5 GB to megabytes.
- Binary units: 1 GB = 1,024 MB.
- 2.5 × 1,024 = 2,560 MB.
- In bytes: 2.5 × 1,024³ = 2,684,354,560 bytes.
Result: 2.5 GB = 2,560 MB.
Tips and common mistakes
- This calculator uses binary units (sometimes written GiB, MiB), as Windows and most file managers do.
- Drive makers advertise in decimal units, which is why a '1 TB' drive shows about 931 GB.
- Small results are shown to full precision rather than rounded to zero — 500 KB is 0.000477 GB.
Assumptions & Limitations
- Uses the binary (1024-based) definition of kilobyte, megabyte, etc., which matches how Windows, macOS, and most operating systems report file and storage sizes.
- Some contexts (like hard drive marketing) use a decimal 1000-based definition instead, which would produce slightly different numbers.
- Storage device manufacturers often advertise capacity using the decimal (1000-based) standard, which is why a '1TB' drive shows less than 1024 GB of usable space when viewed in most operating systems.
Bits, bytes and binary units
Eight bits make one byte. Decimal storage units commonly use powers of 1,000 (KB, MB, GB), while binary units use powers of 1,024 and are more precisely named KiB, MiB and GiB. Software and device manufacturers may display these conventions differently.
This distinction explains why the capacity shown by an operating system can appear smaller than the number printed on a storage device.