Fragmentation level percentage not accurate

As far as I understand, the fragmentation percentage of a drive is calculated by comparing the fragmented files size to the total files size of a partition. This is:

(size of fragmented files) * (total data size) / 100

I find the above calculation not good enough since it can lead to inaccurate conclusions. To give a simple example, a partition may contain just one fragmented file of 1GB size which is split into 1.000 fragments. Another identical partition with the same files, may also contains just one fragmented file of 1GB size, which is split into just 2 fragments.

Using the above formula, these drives will be considered fragmented exactly at the same level, which is inaccurate.

I believe that a more accurate formula should also take into account the total number of fragments of a partition. Maybe a second rating would also make sense. For example there could be a rating such as "Medium fragmentation @ 11% of size", "Light fragmentation @ 15% of size" or "Heavy fragmentation @ 7% of size". Though it sounds more complicated, it actually gives a more realistic view of the real status of a partition.