First, the definition of a megabytes (or gigabytes) is a unit of data storage capacity measured in 1,048,576 bytes (or 1024KB). The larger the numbers, the more apparent the size difference will be when listing the size as megabytes (or gigabytes) versus bytes. Actually, both numbers are correct. The noticeable difference is due to the 1024KB definition of a megabyte. This is why a 298GB hard drive can also be listed as having 320 billion bytes of total space. Just think of it as "round off".
Second, some computers have a non-DOS hard drive partition that is used for features such as Save to Disk, Hibernation, or Recovery. This partition is not normally reported by the operating system, although it can be viewed using a disk partition utility. This is very common on desktops and laptops. NOTE: Partition information will be created or formatted automatically during initial system setup and a system recovery.
Third, by default, all system files are hidden and cannot be seen. This may adversely affect the reporting of available hard drive space. You can set your Folder Options so you view system and hidden files and folders, but do be careful as changes to system files can adversely affect your system.
Fourth, if you turn on Compression for a drive, it will increase reported free space and used space, but since compression is based upon the actual contents, this number is not fixed, but will change as files are added or changed.
Fifth, older operating systems did not support some of today's larger drives, so the total space reported may be much smaller than the drive specifications.
It is also worth noting that bad sectors are corrected by your operating system and can change the total drive space, free space, or used space as well.
So as long as a drive is reporting a value approximately close to the specification value, you can be comfortable that you received the right drive and that you are getting to correct data storage. Of course, tuning of your drive's partitions and options can yield optimal values, but this is not something for the average user to explore.
320,000,000,000/1024/1024/1024 = 298GB