💾 File Size Calculator

🔧 Operation

📝 Convert a single size

📝 Compare multiple sizes

📝 Estimate transfer time

📝 How many items fit?

📤 Result

Bytes
{{ result.bytes }}
Bits
{{ result.bits }}
Best-fit decimal
{{ result.humanDecimal }}
Best-fit binary
{{ result.humanBinary }}
Decimal (SI, 1000ⁿ)
{{ row.unit }} {{ row.value }}
Binary (IEC, 1024ⁿ)
{{ row.unit }} {{ row.value }}
{{ item.label }} {{ item.humanDecimal }} ({{ item.bytes }} B)
{{ item.percentOfMax }}% of largest
Estimated transfer time
{{ result.humanDuration }}
({{ result.seconds }} s)
File size
{{ result.size.value }} {{ result.size.unit }} = {{ result.size.bytes }} B
Link speed
{{ result.speed.value }} {{ result.speed.unit }} = {{ result.speed.bytesPerSecond }} B/s
Items that fit
{{ result.items }}
Remainder
{{ result.remainderBytes }} B
Fill in the inputs and the result will appear here.
⚠️

ℹ️ About File Size Calculator

What this file size calculator measures

A file size is normally the logical byte count of a file: the number of bytes the file contains or transfers. The byte count is exact, but the label used to display it can be ambiguous. This is why the same value may be shown as 1 GB, 0.93 GiB, or 1,000 MB depending on whether the tool uses decimal or binary units.

Use this page as a bytes to KB/MB/GB converter, a KB vs KiB comparison tool, a file transfer time calculator, or a storage fit calculator. It keeps decimal storage units, binary operating-system units, and network bit rates separate so the result is clear instead of guessed.

Unit families

  • SI / decimal (base 10): 1 KB = 10³ B = 1 000 B, 1 MB = 10⁶ B, 1 GB = 10⁹ B, 1 TB = 10¹² B, 1 PB = 10¹⁵ B. Used by SSDs, hard drives, cloud-storage quotas, network gear, and most consumer-facing capacity labels. The strict SI symbol for kilo is lowercase k, but KB is common in software UI and is treated here as decimal kilobytes.
  • IEC / binary (base 2): 1 KiB = 2¹⁰ B = 1 024 B, 1 MiB = 2²⁰ B, 1 GiB = 2³⁰ B, 1 TiB = 2⁴⁰ B, 1 PiB = 2⁵⁰ B. Used where powers of two matter: memory pages, RAM, filesystem block math, and many operating-system size displays.
  • Bits vs bytes: 1 byte = 8 bits. Network throughput is usually quoted in bits per second (Mbps, Gbps), while storage is usually quoted in bytes. A 100 Mbps link is about 12.5 MB/s before protocol overhead, not 100 MB/s.

Why two systems?

Storage vendors usually advertise decimal capacity because SI prefixes are powers of 1000. Operating systems and developer tools often expose binary-sized allocation because computers group memory and blocks in powers of two. That difference is why a 1 TB drive is the same byte count as about 931.3 GiB: nothing disappeared, the display unit changed.

The modern fix is to write binary units with KiB, MiB, GiB, TiB, PiB, and EiB. The current ISO/IEC and IEEE standards keep those binary prefixes separate from SI decimal prefixes such as kilo, mega, giga, tera, and peta.

Use cases

  • Convert bytes to MB, GB, MiB, or GiB: paste a byte count from an API, log file, file picker, or storage report and show it in both decimal and binary units.
  • Explain missing disk space: compare a vendor's 2 TB SSD label with the TiB or GiB value shown by an operating system.
  • Estimate downloads and uploads: calculate how long a 100 GB backup, 4 GiB ISO, or game install takes over a 25 Mbps, 300 Mbps, or 1 Gbps connection.
  • Plan media and backups: work out how many camera clips, database dumps, VM images, or archive parts fit on a card, drive, or cloud quota.
  • Normalize dashboard data: keep RAM, disk, object-store, and bandwidth numbers comparable when different systems report different unit families.

Examples

  • 1 KB = 1 000 B, 1 KiB = 1 024 B.
  • 1 GB = 1 000 000 000 B ≈ 0.9313 GiB.
  • 1 GiB = 1 073 741 824 B ≈ 1.0737 GB.
  • 1.5 GB = 1 500 000 000 B ≈ 1.4 GiB.
  • 700 MiB = 734 003 200 B ≈ 734 MB.
  • 8 bits = 1 byte; 100 Mbps ≈ 12.5 MB/s before overhead.
  • 5 GB over 100 Mbps takes about 6 minutes 40 seconds in ideal conditions.
  • 500 GB / 4.5 GiB-per-item = 103 whole items with a remainder.

Source references

  • ISO/IEC 80000-13:2025 defines quantities and units for information science and includes prefixes for binary multiples.
  • IEEE 1541-2021 standardizes binary-prefix names and symbols for digital electronics and computing.
  • NIST binary prefixes explains the kibi, mebi, gibi, tebi, pebi, and exbi prefixes and gives the 2ⁿ byte values.
  • BIPM SI prefixes lists the decimal SI prefixes such as kilo, mega, giga, tera, peta, and exa.
  • W3C File API defines browser file and blob size reporting as a byte count.

Limits and practical notes

  • Logical file size is not always the same as space used on disk. Filesystem block slack, metadata, snapshots, sparse files, compression, deduplication, RAID parity, and cloud-provider replicas can all change the real capacity consumed.
  • Transfer-time estimates are ideal payload math. TCP/IP overhead, TLS, Wi-Fi retransmits, server throttling, congestion, VPNs, and parallel downloads can make real transfers slower or occasionally faster than a single-link estimate.
  • Calculations run in your browser. Nothing is sent to a server unless you call the API endpoint below, which uses the same shared tool logic with numeric inputs.
  • Integer byte and bit totals use exact arithmetic where possible; fractional unit input such as 1.5 GB is treated as decimal input and displayed with rounded unit conversions.
  • Case matters: B is byte, bit is bit, KB is decimal in this calculator, and KiB is binary.

API Usage Example:

POST /api/tools/file/file-size-calculator
Content-Type: application/json

{
    "operation": "convert",
    "value": 1.5,
    "unit": "GB"
}
Ready