formula for calculating m30 grade