>>10968174

r^2 is squared distance from Earth's center, not the surface. Newton's formula for gravitational force only really works straight out of the box for point masses. To properly calculate the gravitational field of an object with nonzero size, you need to integrate Newton's formula over the whole volume of the object, replacing the mass with density. However, Newton used calculus to prove the shell theorem, which says that if you're outside of a spherical symmetric mass (like the earth), you can treat it as a point mass located at the center of mass. That's why r^2 is the square of the radius of the earth, not distance to the surface.