Counting Bytes: Is My Hard Drive 320GB or 298GB?

By Ashley Toy,

Since we’ve been writing lately about the organization of data on a hard drive and its logical structure, I thought I’d take the opportunity to detour into a related question that comes up once in a while. It’s about how much space is actually available on a hard drive.

Let’s say you go to the store and buy a new 320 GB hard drive for $60 or whatever the latest special is on these now basic-level drives. You plug the USB connection to your laptop, go to disk manager, and see the drive show up as 298 GB. Or maybe it’s 297.44 GB with a 668 MB Western Digital Smartware virtual CD-ROM partition. Either way, the question is: Where did those extra GBs promised on the box go?

The answer is that kilobytes are counted one way by a computer, and another way by people. A Windows operating system relies on binary and counts in base 2, and the marketing conventions are based on familiar base-10 numbers.

Here’s how it works: Hard drives store data with microscopic patches of metal that are either magnetized or not. One patch is a bit, and together eight of them make a byte.

So, one byte is simply eight tiny switches — eight 1s or 0s — resulting in 256 different combinations that can be assigned a value. In ASCII code, for example, the byte “01100101” is the letter “e.”  The number  “1” in the text we read is “00110001” in binary code.

As you can see, bytes are based in binary – the switches are either on or off, electricity is there or not, the pull of a magnetic field exists or it doesn’t. Ones and zeroes.

Operating systems, such as Windows, live in binary. Numbers expand by the power of 2. Under this system, a kilobyte is defined as 2 to the 1oth power (2^10) of bytes, or 1,024 bytes.

The convention for the retail market, on the other hand, is to look at how many bytes there are, divide by a thousand – and bam – there’s the number of kilobytes. The advantage is that people are used to base 10 numbers, and this maintains the traditional definition of kilo. As in, kilo equals one thousand or 10^3.

In the familiar base 10 system, 1 gigabyte = 1,000 megabytes = 1,000,000 kilobytes = 1,000,000,000 bytes. Giga is trillion; mega is million; kilo is thousand.

In the binary counting system, though, 1 gigabyte = 2^10 megabytes = 2^20 kilobytes = 2^30 bytes = 1,073,741,824 bytes.

The difference between these counting systems explains why an operating system reports the capacity differently from how we’d count bytes in a base 10 system.

Let’s go back to our original example — the 320 GB hard drive. The box says that there are 320 GB because there are in fact 320,000,000,000 bytes. But an operating system lives in base 2 and defines 1,073,741,824 bytes to be 1 GB. So if you divide 320,0000,000,000 by 1,073,741,824, you get about 298 GB, which is what Windows shows the drive’s capacity to be.


Marketing Specialist at Gillware Data Recovery and Gillware Online Backup. December 2013 graduate of the University of Wisconsin in Journalism and Spanish. Cheerleading and social media enthusiast.


  Comments: 1

  1. Michael R Glatfelter Jr

    Very good explanation, thank you.

Your feedback