2026-10-17 · 6 min read · Rahul Chitturi
- units
- bytes
- storage
A size disagreement is often a label disagreement. The integer in Content-Length, a disk image, or an object store is a count of bytes. SI labels divide by 1,000: a kilobyte is 1,000 bytes and a megabyte is 1,000,000. IEC labels divide by 1,024: a kibibyte is 1,024 bytes and a mebibyte is 1,048,576. Many tools divide by 1,024 and still print KB, MB, and GB.
Flashman's units tool is in that last group. It walks the byte count through 1,024 and prints B, KB, MB, GB, or TB. It does not print KiB or MiB, and it does not show a decimal column beside the binary one. The milliseconds box is a different ladder: it divides by 1,000 for seconds and by 60,000 for minutes.
Read the label the tool actually prints
Paste the raw integer, not a number that is already labeled. 1,048,576 prints 1.00 MB. That is one mebibyte. 1,000,000 prints 977 KB, because 1,000,000 / 1,024 is 976.5625 and a coefficient of 10 or more is rounded with no decimals. 1,000,000,000 prints 954 MB. 1,073,741,824 prints 1.00 GB. A disk sold as 100 decimal gigabytes is 100,000,000,000 bytes and prints 93 GB.
Coefficients under 10, once the unit is no longer bytes, keep two decimals. 1,024 prints 1.00 KB. 1,536 prints 1.50 KB. 10,485,760 is exactly 10 on the binary ladder, so it prints 10 MB with no decimals. 1,023 stays 1023 B because the loop stops before 1,024.
- Store the unscaled byte count in the ticket.
- Write KiB or MiB when the divisor was 1,024.
- Write kB or MB when the divisor was 1,000.
- Do not paste a byte count into the milliseconds box.
Compare one integer, then the two labels
Put the provider's byte count and the tool's labeled line in the same note. If both sides name 1,048,576 bytes, the storage is the same and the word MB was doing two jobs. If the integers differ, the label is no longer the bug. Diff the two counts before you resize a volume or change an upload limit.
The units tool uses ordinary JavaScript numbers. These examples are exact. A full 64-bit identifier is a different problem and does not belong in this box. Use the JSON formatter when the count is buried in an API body, and diff when a bill, a CLI, and the tool each print a different line for one integer.