The force of gravity f exerted between two objects is equal to the product of the gravitational constant g the mass of the first object m/1 and the mass of the second object m/2 divided by the square of the distance between their centers d this is often used to determine the gravitational attraction between two massive bodies such as planets in space.