The force of gravity and the electrostatic force are both inversely proportional to the square of the separation distance between two objects. This relationship is described by Newton's Law of Universal Gravitation and Coulomb's Law, respectively. Mathematically, this can be expressed as:
\[ F \propto \frac{1}{r^2} \]
where \( F \) is the force and \( r \) is the separation distance.