A formula to calculate index | ScratchStats