calculation of the percentage scale, comparing and counting