In addition to the size difference the of a
KByte in how the memory is accounted for (1 KB=1000 Bytes vs. 1 KB=1024 Bytes) that JSanchez mentioned, there is a more significant factor.
The apparent "loss" that you observed is about 7.75%
( 4.00 - ( 4.00 * 0.0775 ) ). The effect of the different sized
KBytes accounts for a difference of about 2.5%.
The other factor is in accounting for the difference between "formatted" vs. "unformatted" capacity.
When a storage device is formatted, a portion of the storage space is reserved for the "File Allocation Table", and the "Root Directory". The free space of the device (in your case, 3.7GB) is the amount of available storage space that is left after these spaces are reserved.
The amount of space that is taken up by the "File Allocation Table", and the "Root Directory", depends on the "Cluster size" (actually depends on the number of clusters), and the formatting type such as
NTFS, etc. In your case, this accounts for the remaining difference of about 5.25%.