How is the HSI calculated

Hey guys,

how is the HSI calculated? I know that 1 is good, 2 medium and 4 bad, but how is it calculated.

Thanks
Sarah