Its pretty simple when you format a drive, it needs what`s called a file allocation table.
So much space of the partition or format is taken from the overall size or capacity of the drive.
For example a new raw drive may state 2Tb in side but after formatting to use with windows only 1.8 Tb is usable for data storage. So it should calculate the maximum size of the data partition after formatting.