2026-10-17 · 8 min read
- units
- bytes
- storage
Byte counts are integers. The prefix is a convention you have to name. SI prefixes use powers of 1,000: a kilobyte is 1,000 bytes, a megabyte is 1,000,000, and a gigabyte is 1,000,000,000. IEC prefixes use powers of 1,024: a kibibyte is 1,024 bytes, a mebibyte is 1,048,576, and a gibibyte is 1,073,741,824. Writing MB after a division by 1,024 does not make the result a megabyte.
Flashman's units tool divides by 1,024 and prints B, KB, MB, GB, or TB. It never prints KiB or MiB, and it has no second column for a decimal reading of the same integer. The other input on that page is milliseconds. It divides by 1,000 for seconds and by 60,000 for minutes. A byte count pasted there is not converted as bytes.
Learn the rounding rule with known integers
The tool prints an integer while the unit is still bytes, and two decimals when a larger unit's coefficient is under 10. A coefficient of 10 or more is rounded with no decimals. These inputs show the rule: 1,023 prints 1023 B, 1,024 prints 1.00 KB, 1,536 prints 1.50 KB, and 10,240 prints 10 KB.
1,048,576 prints 1.00 MB and is one mebibyte. 1,000,000 prints 977 KB. 10,485,760 prints 10 MB and is ten mebibytes. 1,000,000,000 prints 954 MB. 1,073,741,824 prints 1.00 GB. 100,000,000,000, which is 100 decimal gigabytes, prints 93 GB. Ordinary JavaScript numbers represent all of these integers exactly.
- Put the raw byte count in the field.
- Copy the labeled line next to it, including the decimals.
- Name the divisor, 1,000 or 1,024, in the same note.
- Leave the milliseconds field for durations.
Match the contract that sold the bytes
Object storage and Content-Length speak in bytes. A plan that says 100 GB may mean 100,000,000,000 bytes or 107,374,182,400 bytes. Those are not close once you are sizing a disk, a quota, or an upload limit. Read the provider's own definition and write it down. The tool can then show how that integer looks on a 1,024 ladder with SI-looking labels.
Memory sizes in operating systems are often the 1,024 ladder with the SI letters. Network speeds are often decimal. A host that reports 93 GB of a 100 GB decimal volume is reporting the binary reading, not a missing 7 GB of disk. Diff the provider's integer with the integer you measured before you open a capacity incident.
Keep encoded payloads on their own budget
Base64 expands bytes. A limit written in megabytes and a body measured after encoding are different numbers, and the prefix confusion makes the gap look even larger. Decode or measure the raw payload, then apply one prefix. Do not run the labeled MB figure through the Base64 tool.
Use the units tool on the raw count, the JSON formatter when the count sits in a response, diff for the bill line against the tool line, and the Base64 tool only when the payload itself is encoded text. The note in the ticket should contain the integer, the divisor, and the word you intend to show a reader.