New function: calculate G from MI