Methodology and Sources

How the calculators work, how they are tested, and where the definitions come from.

Units and definitions

The calculators use two families of units, and the difference matters.

  • Decimal units use powers of 1,000: 1 KB = 1,000 bytes, 1 MB = 1,000,000 bytes, 1 GB = 1,000,000,000 bytes.
  • Binary units use powers of 1,024: 1 KiB = 1,024 bytes, 1 MiB = 1,048,576 bytes, 1 GiB = 1,073,741,824 bytes.

A byte is 8 bits. Network speeds are quoted in bits per second, so 1 Mbps is 1,000,000 bit/s and 1 MB/s is 8,000,000 bit/s. These definitions come from the two NIST pages listed below. The same values are stored, with their sources and the date they were read, in a data file the site publishes at /data/constants.json.

How each result is calculated

Every calculator page shows three things next to the result: the formula, a worked example with the arithmetic written out, and the assumptions. When you change a value, the page also writes the formula again with your numbers filled in, so you can follow each step.

The calculators work in whole bytes and bits and round only for display. They run entirely in your browser. Nothing you type is sent anywhere.

How the calculators are tested

The calculation code has automated tests. The expected answers were worked out by hand before the tests were written. Examples include:

Case Expected result
1 KiB and 1 KB 1,024 bytes and 1,000 bytes
1 TB in GiB 931.32 GiB
1 GB at 100 Mbps 80 seconds
Image of 1,920 x 1,080 pixels at 24 bits 6,220,800 bytes
CD audio: 44,100 Hz, 16 bits, 2 channels 1,411,200 bit/s
Video at 5 Mbps for 10 minutes 375,000,000 bytes
1,920 x 1,080 16:9

The tests also check that invalid input, such as an empty field, a negative number or text, produces a clear message and no result.

Why results are estimates

A calculator can be exact about arithmetic and still produce an estimate. The size of a real file depends on the codec, the content, the container and the encoder settings. The speed of a real network varies from moment to moment. Each calculator page says what it assumes and what it leaves out.

Sources

An article may cite a source only if the page was opened and read, and only for what it says. Accepted sources are standards bodies, specifications, official documentation and academic or government pages. Each article lists its sources with the date they were read. Examples of the kinds of pages we use:

  • NIST, Prefixes for binary multiples and SI prefixes, for unit definitions.
  • IETF RFCs, for protocols and compression formats such as DEFLATE, gzip and Brotli.
  • W3C specifications, for formats such as PNG and SVG.
  • Library of Congress, Digital Formats, for the long-term use of file formats.

Core definitions on this page were read on .

Examples and numbers

An example value is always labeled as an example. We do not publish benchmarks, speed tests or compression results unless we can show how they were calculated. If a claim cannot be supported by a source or a formula, it is left out.

Last updated: