Skip to content
Calcrivo

File Size Calculator

Convert file sizes between bytes, KB, MB, GB and TB with binary or decimal units.

Inputs

Binary base matches how the Linux kernel and most tools (free, du -h) report sizes.

Converted Value

1,024.000000

Conversion

1 GB = 1024 MB

Total Bytes

1,073,741,824

Binary (1024-based) Equivalent

1.00 GiB

Decimal (1000-based) Equivalent

1.07 GB

Step by step

  1. Values used

    Value = 1; From Unit = Gigabytes (GB); To Unit = Megabytes (MB); Unit Base = Binary (1024-based, KiB/MiB/GiB)

  2. Binary conversion

    bytes = value × 1024^n, where n = 0 for B, 1 for KB, 2 for MB, 3 for GB, 4 for TB

  3. Converted Value

    = 1,024.000000

  4. Conversion

    = 1 GB = 1024 MB

  5. Total Bytes

    = 1,073,741,824

  6. Binary (1024-based) Equivalent

    = 1.00 GiB

  7. Decimal (1000-based) Equivalent

    = 1.07 GB

How it works

Linux tools disagree on whether a 'kilobyte' means 1000 or 1024 bytes. Binary units (KiB, MiB, GiB — powers of 1024) are what the kernel, /proc/meminfo, free and most du -h output actually use, even when they print the label 'K', 'M' or 'G'. Decimal units (KB, MB, GB — powers of 1000) are what disk manufacturers print on packaging and what tools like df sometimes use with --si. This calculator converts between any two size units using either base so you can reconcile 'df says 1.8T but the drive box says 2TB'.

Formula

Binary conversion

bytes = value × 1024^n, where n = 0 for B, 1 for KB, 2 for MB, 3 for GB, 4 for TB

v
input value
n
unit power (0=B, 1=KB, 2=MB...)

Frequently Asked Questions

Why does my 1TB drive show as 931GB in Linux?

Drive manufacturers use decimal TB (1,000,000,000,000 bytes). Linux tools like df typically report binary GiB (1024-based) but label it 'G'. 1,000,000,000,000 bytes ÷ 1024³ ≈ 931 GiB, which is why the same drive appears smaller in the OS.

What is the difference between KB and KiB?

KB (kilobyte) technically means 1000 bytes under SI standards, while KiB (kibibyte) unambiguously means 1024 bytes. In practice most Linux tools use 1024-based math but print 'KB' or 'K' as the label, which is the main source of confusion this calculator resolves.

Which base should I use for RAM sizes?

Always binary (1024-based). RAM is physically organized in powers of 2, and /proc/meminfo, free -h and top all report memory using 1024-based KiB/MiB/GiB even when labeled K/M/G.

You might also need