The acceleration due to gravity (g) on the surface of a planet is given by the formula g = GM/R², where G is the gravitational constant, M is the mass of the planet, and R is its radius.