Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I'm working on a web app that will show the size of certain files, and I'm wondering if there's any consensus about how to report the units of bytes. Technically the IEC has weighed in with an official standard, but I'm not sure that's worth much.

Several options:

  • "1 KB" means 1024 bytes (as Windows would report it, traditional usage)
  • "1 KB" means 1000 bytes (as Mac OS would report it, IEC usage)
  • "1 KiB" means 1024 bytes (unambiguous, but perhaps unfamiliar terminology)

Not a huge deal since we're only talking a 2.4% difference for files in the KB range, but for MB the difference is ~5% and for GB it's ~8%.

share|improve this question
15  
Pretty much 0% of non-technical users will know what a KiB is, and the large majority are going to think what Windows reports (1024) is correct (if anything). KiB is more "technically" correct but in reality it's just a great way to confuse your users for no reason. To my knowledge the only non-Mac people to use 1000 bytes as a KB are Hard Drive manufacturers, who of course use the smallest possible definition of a kilobyte. –  Ben Brocka Nov 11 '11 at 3:34
1  
I agree that "KiB" is a little obscure; I'm not crazy about it (although perhaps non-technical user wouldn't think that much about it if they saw an extra "i" in the middle). –  Henry Jackson Nov 11 '11 at 4:23
6  
Quite often a number reported in KB or MB serves as an indication, not as an exact measurement. Unless the difference in reported numbers really, really matters, I wouldn't bother. –  Marjan Venema Nov 11 '11 at 7:20
    
Another option would be to simply show the size in bytes. 123.000.000 bytes for a file is pretty readable but this depends a lot on which kind of sizes you're working with. I'd go for sizes in MB and show a little explanation link –  Barfieldmv Nov 11 '11 at 8:25
    
How important is it for you(r users) to be precise? Also, are the users more Mac or more Windows? I wouldn't bother with KiB (didn't know what it meant until now). Personally, I'd go with 1024. –  GUI Junkie Nov 11 '11 at 9:04

5 Answers 5

up vote 17 down vote accepted

A number of issues factor into the perception of what a kilobyte is and how to word it.

The IEC standard names are useless: As Jeff Atwood notes there is simply no industry acceptance of KiB/MiB/GiB. Hard Drive manufacturers and Macs are the only major players using the 1000 bytes definition and Hard Drive manufacturers have absolutely no incentive to differentiate KiB from KB; it makes their drives sound smaller. Macs and Windows have no incentive to use KiB because it's an unnecessary complication for the user. Note that it's been 12 years since the definitions were created, and they're not being adopted anytime soon.

Windows Vs. Mac: Mac thinks (kilobytes are) different. If detecting the OS is a possibility, display a Kilobyte as what the user's OS would. If you can't, the 1024 byte defintion is a good fallback, seeing as 90% of general users are on Windows. Of course your target market might be different.

Scale: The problem with the binary prefix vs the SI prefix is that as the numbers grow, so does the difference between values. Once you get into the Gigabyte range the difference between GB and GiB is substantial--many Windows users are quite disheartened to find their 1 Terabyte hard drive is only 932 Gibabytes in Windows. In my experience, most of them assume Windows is correct rather than the Hard Drive manufacturer--and they have a point, it is in the Hard Drive manufacturer's benefit to use the smallest possible measure for a kilobyte.

Enterprise or Technical users are a special case. If your app is measuring disk or database usage on a server farm, that 8% difference for a GB is huge, and you should allow the user to specify how you display kilobytes, even including a KiB option. These are probably your only users who would care enough to differentiate.

Finally, let's assume people really do all think 1000 bytes is a kilobyte, in their heart of hearts. Since they know file size from what their OS reports, not from counting the bytes manually, using the uncommon 1000 byte count will add unnecessary complexity and your app will look wrong because it conflicts with what the computer says. Users only know how big a file is because their OS tells them.

share|improve this answer
1  
Another important (but complex) thing to note here is that binary exponents were used for technical and performance reasons, clusters on your hard drive clusters are sized in binary increments, so even if you report 1000 bytes as a kilobyte you're treating the byte differently between OS and user, which isn't always ideal. Decimal notation seldom has a place in computer science, and this is one of the very few times that comes to the surface to the user, so it's a tricky issue. –  Ben Brocka Nov 11 '11 at 15:31
    
I also forgot Memory; even if your HDD uses 1000 byte KB, your memory has to use KiB. You're pretty much forced to adopt a second standard because of that. A chip offering 4 gigabytes of RAM can't be 4*10^9. –  Ben Brocka Nov 11 '11 at 15:54
1  
+1 for "Users only know how big a file is because their OS tells them." –  jberger Nov 11 '11 at 17:16

There is a Stack Overflow question on this exact topic. The consensus is:

  • 1 kB = 1000 bytes
  • 1 KiB = 1024 bytes

I would use the more technically correct KiB. In other words, divide the number of bytes by 1024 and show that with KiB as the unit. I doubt it's important if users mistakenly think "20 KiB" is 20,000 bytes rather than 20,480.

share|improve this answer
2  
It's not really a concensus so much as an official standard ... en.wikipedia.org/wiki/Kibibyte –  jcolebrand Nov 11 '11 at 15:37

Make it customizable from a preferences panel. Perhaps use KB as 1024 as the default setting. As Ben Brocka said, KiB is little known.

Further more show the actual size in tooltips, e.g.

Abbreviated label: 42 KB

Tooltip: 43.212 bytes

share|improve this answer
1  
Agreed on KB as default. Keep it simple. –  PhillipW Nov 11 '11 at 10:46

Why k should be used for 1000 and Ki for 1024.

A reviewer we will call "User's Buys Tests" has analyzed external storage drives. All along their test, they mention that all drives have some "60 GB of reserved, user unavailable space" (1), exact values listed in a per drive table so that the readers can make the best buy.

It turns out that the alleged difference is in fact 1.024^3×disk size. That's because those Testers do not know the difference between GiB with which the partitions are measured and GB with which the disk size is measured. They have carved that stupidity for everyone to see in a stone called PDF.

The KiB has been introduced not because of a whim but because some quantities are measured that way and others the kB way, and that it's not convenient to speak of "multiple of 1000 kilometers per hour" and "multiple of 1024 kilobytes". For another example, communication rates (what many erroneously call speed) are measured in kbps = 1000 bps (bits/sec) while one speaks of kBps = 1024 Bps (bytes/sec) where it should be KiBps. One does not multiply KiBps by just 8 to obtain kbps.
The reason why some persons did not notice that communication rates kbps are multiple of 1000 instead of 1024 is that they use k for 1024 in computer science which generally counts by powers of 2.

So, the KiB is not a matter of pedantry or anything, just of knowing exactly what one speaks about. And I'm surprised to see little mention of that duality in this discussion.

The fact is indeed that one usually deals with KiB and that, although it dispenses me to speak of "units of 1024 bytes", it seems a burden to add that "i" to what is used the most for the sake of what is used the least. But how could a disk formating program display its numbers without making the GB/GiB distinction? The annoying thing in the disk size confusion is that those drive manufacturers who are accused of overestimating drive sizes are those who are correctly using the international unit multiplier Giga in GB and that it's the other ones who are to blame for not using GiB. It's in fact much easier than switching to the metric system!

What I notice is that using the GB/GiB distinction make writing about them much easier already.

(1) not even wondering what that space could be used for; in fact, drive manufacturers are so scrupulous about disk sizes (in GB or in 1000000000 byte units if you prefer longer phrases) that the spare sectors used to hold the data of failing regular sectors are in surplus of the exact byte count.

share|improve this answer

Ask any non-technical friend how many bytes are in a kilobyte, and they'll say "1,000", because that's what kilo- means in every other context they're used to. 1,000 grams in a kilogram, 1,000 meters in a kilometer, etc. So don't mislead users by writing "k" when you mean "1024".

In most cases, there's no reason to use multiples of 1024 anyway. It is much more logical to follow the SI standard and describe a 10,000 character ASCII text file as "10.0 kB", than "9.7KB". It's much more logical to describe a 160,041,885,696 byte hard drive as "160.0 GB" or "160,042 MB", rather than "149.1 GB" in one place and "152,628 MB" in another. How is that beneficial to anyone?

Using the non-standard programmer jargon units confuses users when they can't burn 4.7 "GB" on a 4.7 GB DVD, can't fit 100 10 "MB" files on a 1 GB flash drive, etc.

In the one case where powers of 2 actually makes sense (RAM sizes), use "KiB". It's an international standard and anyone not familiar with it can look it up easily.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.