Plenty of commands print raw byte counts, and nobody enjoys counting digits. ls -h and du -h can do it for themselves, but numfmt does it for any number.
echo 1610612736 | numfmt --to=iec
numfmt --to=iec-i 1610612736
The first command prints 1.5G. The iec unit scales by 1024 and uses single-letter suffixes such as K, M and G. The second command uses iec-i and prints 1.5Gi, which is the form with the two-letter symbols that the GNU manual says the standard recommends.
It becomes useful in a pipeline. Say a script prints sizes in bytes in the first column of a file. You can convert that column in place:
cat sizes.txt | numfmt --to=iec --field=1
There is also the opposite direction, --from=iec, which reads values like 1.5G back into plain numbers. That is handy before you sort, because sort -h is not always an option inside a larger script.
The caveat is the base. The iec unit means powers of 1024, but disk vendors and many tools use 1000. If you compare with a number from a disk label, use --to=si instead, or a 1 TB drive will look smaller than it is. Also, numfmt is part of GNU coreutils, so a stock macOS shell may not have it unless you install coreutils.
Further reading: GNU coreutils: numfmt, numfmt(1) manual page