Isaac Newton compared the acceleration of the moon to the acceleration of objects on earth. Believing that gravitational forces were responsible for each, Newton was able to draw an important conclusion about the dependence of gravity upon distance. This comparison led him to conclude that the force of gravitational attraction between the Earth and other objects is inversely proportional to the distance separating the earth’s center from the object’s center. Consider Newton’s famous equation

F = ma

Newton knew that the force that caused the apple’s acceleration (gravity) must be dependent upon the mass of the apple. And since the force acting to cause the apple’s downward acceleration also causes the earth’s upward acceleration (Newton’s third law), that force must also depend upon the mass of the earth. So for Newton, the force of gravity acting between the earth and any other object is directly proportional to the mass of the earth, directly proportional to the mass of the object, and inversely proportional to the square of the distance that separates the centers of the earth and the object.

where:

represents the force of gravity between two objects;

represents the mass of object 1;

represents the mass of object 2;

represents the distance separating the objects’ centers.

But Newton’s law of universal gravitation extends gravity beyond earth. Newton’s law of universal gravitation is about the universality of gravity. Newton’s place in the Gravity Hall of Fame is not due to his discovery of gravity, but rather due to his discovery that gravitation is universal. ALL objects attract each other with a force of gravitational attraction. Gravity is universal. This force of gravitational attraction is directly dependent upon the masses of both objects and inversely proportional to the square of the distance that separates their centers.
Newton rightly saw this as a confirmation of the “inverse square law”. He proposed that a “universal” force of gravitation F existed between any two masses m and M, directed from each to the other, proportional to each of them and inversely proportional to the square of their separation distance r. In a formula (ignoring for now the vector character of the force):

Suppose M is the mass of the Earth, R its radius and m is the mass of some falling object near the Earth’s surface. Then one may write

From this

The capital G is known as the constant of universal gravitation.