Technology

Decimal vs. Binary Data Storage Units

Distinguish bits, bytes, decimal kB–TB units, and binary KiB–TiB units when reading drive, memory, file, and transfer specifications. This guide explains the reasoning, not just the keystrokes.

Published · Updated · 6 min read

Bits and bytes come first

A bit is a binary digit; a byte contains eight bits. Lowercase b conventionally denotes bit and uppercase B denotes byte. Thus MB and Mb differ by a factor of eight before any prefix issue is considered. Storage capacity and file size are commonly byte-based, while network transfer rates are often bits per second.

A converter that handles bytes does not automatically convert a rate such as Mb/s into MB or predict download time. Protocol overhead, encoding, congestion, and actual throughput also affect transfers.

Decimal prefixes use powers of 1,000

Decimal storage units follow SI-style powers: 1 kB = 1,000 B, 1 MB = 1,000,000 B, 1 GB = 1,000,000,000 B, and 1 TB = 1,000,000,000,000 B. Each step is exactly a factor of 1,000.

Input: 3 GB. Formula: bytes = GB × 1,000,000,000. Calculation: 3 × 1,000,000,000 = 3,000,000,000. Result: 3,000,000,000 B. Interpretation: this uses decimal GB. Reverse check: 3,000,000,000 ÷ 1,000,000,000 = 3 GB.

Binary prefixes use powers of 1,024

IEC binary prefixes make the base explicit: 1 KiB = 1,024 B, 1 MiB = 1,048,576 B, 1 GiB = 1,073,741,824 B, and 1 TiB = 1,099,511,627,776 B. Each adjacent step is exactly 1,024.

Input: 2 GiB. Formula: bytes = GiB × 1,073,741,824. Calculation: 2 × 1,073,741,824 = 2,147,483,648. Result: 2,147,483,648 B. Interpretation: this is larger than 2 decimal GB. Reverse check: divide by 1,073,741,824 to recover 2 GiB.

Convert through bytes

Input: 1 GB. Formula: GiB = 1,000,000,000 ÷ 1,073,741,824. Calculation: 0.9313225746…. Result: about 0.931323 GiB. Interpretation: the byte count is unchanged; the larger binary unit produces a smaller number. Reverse check: 0.9313225746… × 1,073,741,824 = 1,000,000,000 B.

Converting through bytes prevents an ambiguous assumption about whether an unlabeled mega or giga means 1,000-based or 1,024-based scaling.

Why a drive can appear smaller

Drive makers commonly state decimal capacity. Some operating systems or utilities display the same byte count with binary scaling, sometimes using IEC symbols and sometimes an ambiguous decimal-looking label. The numerical value then appears smaller even before formatting, partitions, metadata, recovery space, or file-system overhead are considered.

Unit conversion explains the scaling difference but does not calculate usable capacity. Formatting and system-reserved space are separate deductions from the raw byte total.

Symbols must remain exact

kB uses lowercase k and uppercase B; KiB includes the binary i. MB is megabyte, MiB is mebibyte, and Mb is megabit. Changing capitalization changes meaning. Avoid using KB as a universal label without defining it because software and historical documentation have used it inconsistently.

When a source is ambiguous, preserve its original label and consult its specification. Do not silently “correct” the number by assuming the convention that yields the expected size.

Converter scope

The Data Storage Converter supports byte, kB, MB, GB, TB, KiB, MiB, GiB, and TiB as explicitly defined byte units. It does not support bits, bit rates, compression, file-system allocation, transfer overhead, or download-time estimation.

Zero converts to zero. Negative storage capacity is normally invalid, though signed changes can be meaningful in reports. Very large integer byte counts can exceed exact floating-point representation, so precision-sensitive systems should use integer arithmetic or suitable big-number types.

Exact byte paths and practical storage comparisons

Input: 1 TB. Formula: TiB = 1,000,000,000,000 ÷ 1,099,511,627,776. Calculation: 0.9094947018…. Result: about 0.909495 TiB. Interpretation: the drive still contains the same raw byte count; the binary unit is larger. Reverse check: multiply the unrounded TiB value by 1,099,511,627,776 to recover one trillion bytes.

Input: 16 GiB. Formula: GB = 16 × 1,073,741,824 ÷ 1,000,000,000. Calculation: 17.179869184. Result: exactly 17.179869184 GB. Interpretation: a binary memory quantity produces a larger number of decimal gigabytes because GB is smaller. Reverse check through bytes returns 16 GiB.

Files have logical byte sizes, while storage systems can allocate whole blocks and add metadata. Sparse files, compression, deduplication, snapshots, parity, and reserved system space can further separate a logical file total from consumed or usable capacity. Decimal-binary conversion explains only the unit scale. It should not be offered as a complete explanation for every capacity difference.

A download-time calculation requires a size, a transfer rate, and a consistent bit-byte conversion. For example, bytes multiplied by eight become bits, but advertised network throughput is not guaranteed payload throughput. Headers, retransmissions, congestion, server limits, Wi-Fi conditions, and protocol behavior all matter. The storage converter intentionally stops at byte quantities.

Large byte counts deserve integer-safe handling. JavaScript Number cannot represent every integer above 2^53 exactly. A consumer display may tolerate rounded values, but checksums, file offsets, quotas, and billing can require integer or arbitrary-precision arithmetic. Unit tests should use exact powers, verify capitalization, include zero, and ensure an unsupported bit unit cannot silently enter a byte conversion.

Input: 1 MiB. Formula: MB = 1,048,576 ÷ 1,000,000. Calculation: 1.048576. Result: exactly 1.048576 MB. Interpretation: binary-to-decimal conversion increases the number because MB is smaller. Reverse check: 1.048576 × 1,000,000 = 1,048,576 B = 1 MiB.

Memory and storage marketing should not be conflated automatically. Hardware memory modules often align with powers of two, drives often use decimal capacity, and software interfaces vary in symbols. Virtual memory, caches, cloud quotas, and container limits can introduce their own reporting conventions. Read the product or API contract and keep its original unit in records.

When aggregating files, sum byte counts before converting. Rounding every item to MB or MiB first can make totals drift, especially for many small files. A displayed 0.00 MB file still occupies bytes and possibly one or more allocation blocks. The converter does not estimate directory metadata or allocated blocks.

Symbols are case-sensitive in code and documentation. A schema should reject unknown variants or map them only through explicit documented rules. Treating mb, MB, MiB, and MIB as interchangeable risks both eightfold bit-byte errors and decimal-binary errors. Clear unit identifiers make arithmetic reviewable and preserve interoperability.

Input: 1 kB. Formula: KiB = 1,000 ÷ 1,024. Calculation: 0.9765625. Result: exactly 0.9765625 KiB. Interpretation: the difference begins at the first prefixed unit and grows in relative visibility at larger prefixes. Reverse check: 0.9765625 × 1,024 = 1,000 B.

A byte is treated as eight bits in these information units. This fact does not imply that every character, sample, pixel, or instruction occupies one byte; encodings and formats decide their storage. The converter cannot estimate content size from item counts without those format details.

When documenting an API or database field, specify both unit and semantic basis: bytes of logical content, allocated bytes, compressed bytes, quota bytes, or transfer bytes. A field called sizeMB is still ambiguous unless MB is defined. Prefer exact byte storage plus clearly formatted views. This lets consumers choose decimal or binary display without changing the authoritative quantity and prevents a label migration from rewriting underlying data.

Frequently asked questions

What is the difference between GB and GiB?

GB is exactly 1,000,000,000 bytes; GiB is exactly 1,073,741,824 bytes.

Is MB the same as Mb?

No. MB means megabytes and Mb means megabits; one byte contains eight bits.

Why can a drive appear smaller in an operating system?

Decimal labeling and binary-scaled display can produce different numbers, while formatting and system use can reduce usable space further.

Does the converter handle network speeds?

No. It converts byte-based storage quantities, not bits per second or transfer time.

Are KiB and MiB official binary prefix symbols?

They are IEC binary-prefix symbols for 1,024 bytes and 1,048,576 bytes respectively.

Sources

References used to support definitions and interpretation in this guide.

  1. IEC 80000-13:2025 — Quantities and units, Part 13: Information science and technology
  2. BIPM — The International System of Units (SI Brochure), 9th edition