M1 and M2 calculation