Gravitational force calculator
Enter two masses and the distance, get the force of gravity.
What is Newton's law of universal gravitation?
Every two masses attract with a force F = G × m₁ × m₂ ÷ r², where r is the distance between their centers and G is the gravitational constant.
What is the value of G?
6.67430 × 10⁻¹¹ N·m²/kg², the CODATA 2018 value published by NIST. Unlike the speed of light it is measured, not defined, with an uncertainty of about 22 parts per million.
How strong is gravity between everyday objects?
Tiny: two 1,000 kg masses 1 meter apart attract with 6.67 × 10⁻⁵ newtons — the weight of about 6.8 milligrams on Earth.
What happens if I double the distance?
The force drops to a quarter — it follows the inverse square of the distance.
Which distance do I enter?
Between the centers of the two masses. For a planet, that is its radius plus the height above the surface.
Is the gravitational force the same on both objects?
Yes. The two forces are equal in size and opposite in direction (OpenStax University Physics, Volume 1, section 13.1), but the accelerations are not, because a = F ÷ m. In the Earth–Moon example below the force is 1.98 × 10²⁰ N on each body, which accelerates the Earth by 3.32 × 10⁻⁵ m/s² and the Moon by 2.70 × 10⁻³ m/s².
How is this related to g = 9.8 m/s²?
Dividing the force on a 1 kg object by its mass gives g = GM ÷ r² (OpenStax, section 13.2). With the Earth’s mass and mean radius from NASA this is 9.82 m/s² at the surface and 8.69 m/s² at 400 km altitude, the height of the International Space Station. Measured values at the surface range from about 9.78 to 9.83 m/s² because the Earth rotates and is not a perfect sphere.
The formula and what it assumes
Two masses attract each other with a force F = G·m₁·m₂ ÷ r² (OpenStax University Physics, Volume 1, section 13.1, Eq. 13.1), where G = 6.6743 × 10⁻¹¹ N·m²/kg² and the force is always attractive. The law is stated for point masses and also holds for spherically symmetric bodies, with r measured between their centers; for irregular objects it works well when they are far apart compared with their size. Masses go in kilograms and the distance in meters, and the fields accept scientific notation such as 5.9722e24.
Worked example: the Earth and the Moon
With the NASA values M = 5.9722 × 10²⁴ kg for the Earth, m = 7.346 × 10²² kg for the Moon and a mean distance of 3.844 × 10⁸ m, F = G·M·m ÷ r² = 1.98 × 10²⁰ N. Doubling the distance would cut this to a quarter, and tripling it to a ninth. For a small-scale comparison, OpenStax Example 13.1 finds that two 9,000 kg spacecraft payloads 10.0 m apart attract each other with only 5.4 × 10⁻⁵ N.
Common mistakes
Using the distance between surfaces instead of centers is the most common one: for a spacecraft 400 km above the ground, r is the Earth’s radius plus 400 km, not 400 km. Units come next: a distance in kilometers or a mass in grams makes the answer wrong by large powers of ten, so convert to meters and kilograms first. And the formula does not give the weight of something on the ground unless you also know the planet’s mass and radius; for ordinary problems use W = mg, with the force calculator.
Sources: OpenStax University Physics, Volume 1, section 13.1 (Newton’s law of gravitation, Eq. 13.1; Example 13.1) and section 13.2 (gravitation near the Earth’s surface), with section 3.5 for the range of g; G is the CODATA value published by NIST; masses, radius and distance from the NASA Planetary Fact Sheet (Earth and Moon pages). Related: escape velocity calculator, orbital period calculator, weight on other planets calculator and force calculator.