Gravitational Force Solver – Solve F = Gm₁m₂/r² for Any Variable
Use this free Gravitational Force Solver to work with Newton's law of universal gravitation in any direction — find the force between two masses, an unknown mass, or the distance between them.
Every mass in the universe pulls on every other mass. The pull is feeble beyond imagination between everyday objects — two people standing a metre apart attract each other with a force of about 2.8 × 10⁻⁷ newtons, roughly the weight of a few cells — yet summed over a planet it becomes the weight that pins you to the ground, the tide that lifts the oceans and the leash that holds the Moon. Newton's law compresses all of it into one line: F = Gm₁m₂/r². This solver works that line in every direction, finding whichever of the four quantities — force, either mass, or distance — you do not know from the three you do.
The solving-for-distance and solving-for-mass modes are the ones with real work to do. Solving for a mass is how planets get weighed: watch a moon orbit, measure the force balance, and the planet's mass falls out of the algebra — no scale required, and no other method exists. Solving for a distance answers questions like "how far away must a satellite be for Earth's pull on it to fall to a given value?" or "at what separation would two asteroids attract as strongly as these two do here?" The force mode, meanwhile, is the reality check on the whole law: it shows the numbers behind the Moon's orbit, the Sun's grip on Earth, and the utter negligibility of gravity between the objects of daily life.
One constant carries the law's humility: G = 6.674 × 10⁻¹¹ N·m²/kg², the weakest and hardest-to-measure of the fundamental constants. Newton never knew its value; Cavendish first measured it in 1798 with a torsion balance so delicate it detected the attraction between lead balls in a shed. Every calculation on this page inherits that smallness — it is why gravity, alone among the forces, needs planet-sized masses before it matters, and why the r in the formula is measured between centres, a detail that decides real accuracy when the bodies are close. The four solving modes below cover every question the law can be asked.
Formula
Newton's law of universal gravitation: F = G m₁ m₂ / r², with G = 6.674 × 10⁻¹¹ N·m²/kg².
Rearranged: m₁ = F r² / (G m₂) · m₂ = F r² / (G m₁) · r = √( G m₁ m₂ / F )
Read the structure before the symbols: the force is proportional to each mass separately — double either one and the force doubles — and inversely proportional to the square of the distance — double the separation and the force quarters. The distance rearrangement carries a square root for the same reason: r appears squared in the law, so isolating it means unsquaring. Units must be strict SI throughout: kilograms, metres, newtons. The solver accepts scientific notation (type 5.972e24 for Earth's mass), which planetary numbers make essential. And r is always centre-to-centre: for two spheres, each body gravitates as if all its mass sat at its centre — Newton's own shell theorem, and the reason a person standing on Earth is 6.37 × 10⁶ m from its mass, not zero metres from the ground.
| Symbol | Meaning | Units |
|---|---|---|
| F | gravitational force of attraction between the two masses | N |
| G | universal gravitational constant, 6.674 × 10⁻¹¹ | N·m²/kg² |
| m₁, m₂ | the two masses | kg |
| r | distance between the centres of the two masses | m |
The inverse-square law: why distance dominates
Of the three inputs, distance is the bully. Masses enter politely, in direct proportion; distance enters squared and inverted, so modest changes in separation swamp large changes in mass. Move a satellite from one Earth radius to two — from the surface to an altitude of one radius — and Earth's pull on it falls to a quarter, even though nothing about either mass changed. This is geometry, not weakening: the influence of a mass spreads over the surface of an expanding sphere whose area grows as r², so the intensity thins as 1/r² — the same dilution that dims light and sound from a point source, and the reason the law's graph is a cliff near the origin and a long, shallow tail far away.
The inverse-square shape also explains gravity's split personality. It is undetectably weak between teacups yet organises the cosmos, because it never switches off and never cancels: mass only ever adds, and the tail, however thin, reaches to infinity. Every star pulls on every other star; the calculation is just usually not worth doing beyond the nearest few. This solver, by letting you solve for any variable, makes the trade-offs tangible — you can watch a doubling of distance demand a quadrupling of mass to hold the same force, or find the exact separation at which two chosen masses attract with a force you specify. It also quietly explains the shape of astronomy's map: because the force thins with distance squared while the number of stars within that distance grows, the universe organises into bound pairs, clusters and hierarchies — moons answer to planets, planets to stars, stars to galaxies — each level held by the same 1/r² thread at a different scale.
How to use
- Choose which quantity you want to find from the drop-down.
- Enter the other three values — you can type big numbers like 5.972e24 for a planet's mass.
- Click "Calculate" to get the missing value.
- Cross-check with a known case first — Earth and Moon should return about 1.98 × 10²⁰ N — to confirm your exponents were typed as intended.
Worked examples
Example 1 — Earth and Moon. The Earth (m₁ = 5.972 × 10²⁴ kg) and the Moon (m₂ = 7.348 × 10²² kg) are r = 3.844 × 10⁸ m apart.
F = 6.674 × 10⁻¹¹ × 5.972 × 10²⁴ × 7.348 × 10²² / (3.844 × 10⁸)² = 1.98 × 10²⁰ N.
That is the pull that keeps the Moon in orbit around the Earth.
Example 2 — Earth and Sun. The same Earth, held by the Sun (m₂ = 1.989 × 10³⁰ kg) at r = 1.496 × 10¹¹ m: F = 3.54 × 10²² N — about 180 times the Moon's pull on us, exerted by a body 400 times further away, because its mass is 27 million times the Moon's. This is the force that bends Earth's path into its yearly ellipse.
Example 3 — two people. Two people of 70 kg and 60 kg standing 1 m apart: F = 6.674 × 10⁻¹¹ × 70 × 60 / 1² = 2.80 × 10⁻⁷ N. Real, but roughly a hundred-millionth of either person's weight — which is why we do not drift towards each other across the room, and why measuring G took Cavendish a shed, a torsion fibre and legendary patience.
Example 4 — solving for distance. How far from Earth's centre must a 1000 kg satellite be for the pull on it to fall to 8000 N? Use distance mode: r = √(G m₁ m₂ / F) = √(6.674 × 10⁻¹¹ × 5.972 × 10²⁴ × 1000 / 8000) = 7.06 × 10⁶ m — about 690 km above the surface, in the heart of low Earth orbit, where gravity is still nearly 82% of its surface strength.
Example 5 — solving for a mass: weighing the Earth. A 100 kg mass at Earth's surface (r = 6.371 × 10⁶ m from the centre) is pulled with F = 981 N. Solve for m₁: m₁ = F r² / (G m₂) = 981 × (6.371 × 10⁶)² / (6.674 × 10⁻¹¹ × 100) = 5.97 × 10²⁴ kg — the mass of the Earth, recovered from a bathroom-scale measurement and a known radius. This is, in essence, how every planet and star with a moon or a companion has been weighed.
Example 6 — the pure constant. Two 1 kg masses 1 m apart attract with F = G itself: 6.674 × 10⁻¹¹ N. And if the Earth–Moon separation doubled, Example 1's force would fall to a quarter: 4.96 × 10¹⁹ N — the inverse-square law in a single gesture.
Gravitation in real life
Weighing planets and stars. The mass-solve mode is astronomy's scale. A moon's orbit gives its planet's mass; a companion star's orbit gives a star's; stars orbiting the galactic centre gave the Milky Way's mass — and the first hard evidence that most of it is invisible.
Tides. The Moon's pull differs across Earth's diameter — nearer water is pulled harder — and that difference, computable from this law at two distances, raises the tides. The Sun contributes a smaller differential despite its larger total force, because tide strength depends on how much the pull changes across the planet.
Satellite engineering. Orbit designers live in the distance-solve: choosing an altitude is choosing a gravitational force, hence an orbital speed and period. Graveyard orbits, station-keeping budgets and re-entry predictions all begin with F = Gm₁m₂/r² evaluated honestly.
Microgravity experiments. Sensitive instruments — torsion balances, atom interferometers, the LISA gravitational-wave mission's test masses — must account for the gravity of nearby objects: a truck parked outside, a person walking past. At 10⁻⁷ N scales, Example 3 stops being a joke and becomes an error budget.
Geophysics and prospecting. Ore bodies and oil-bearing structures are slightly denser than surrounding rock, so they tug slightly harder on a gravimeter at the surface. Mapping those micro-variations in g — variations of this law's output — is a standard survey method before anyone drills.
Escape and capture. Whether a probe escapes a planet or is captured by it turns on the accumulated effect of this force over distance — the integral of Gm₁m₂/r² is the potential energy that escape velocity calculations are built from.
Cavendish: measuring the unmeasurable
For 111 years after Newton published the law, G was unknown — the law predicted ratios beautifully but absolute forces not at all. Henry Cavendish's 1797–98 experiment changed that: two small lead balls on a suspended rod, two large ones beside them, and a mirror-and-light beam to detect the rod's twist as the small balls crept towards the large ones under a force of about 10⁻⁷ N — the scale of Example 3. His result let humanity compute the mass and density of the Earth for the first time ("weighing the world" was his paper's ambition, and it succeeded). Modern measurements have refined G only modestly; it remains the least precisely known of the fundamental constants, disagreeing slightly between laboratories to this day — a standing reminder that the weakest force is also the shyest. Cavendish's apparatus, rebuilt with lasers and vacuum chambers, is still recognisably the instrument at the heart of those modern attempts.
Quick reference: gravitational forces, largest to smallest
| Pair | Distance | Force |
|---|---|---|
| Sun – Earth | 1.496 × 10¹¹ m | 3.54 × 10²² N |
| Earth – Moon | 3.844 × 10⁸ m | 1.98 × 10²⁰ N |
| Earth – 100 kg person (surface) | 6.371 × 10⁶ m | 981 N |
| two people, 1 m apart | 1 m | 2.80 × 10⁻⁷ N |
| two 1 kg masses, 1 m apart | 1 m | 6.674 × 10⁻¹¹ N |
Thirty-three orders of magnitude on one table, all from one line of algebra — that range is the law's real claim to the word "universal".
From force to field: the g hiding inside the law
Divide this page's force by the small mass it acts on and a more portable quantity appears: the gravitational field strength, g = Gm₁/r², the acceleration any object would feel at that distance from m₁, whatever its own mass. It is why all objects fall together — the m₂ that gravity pulls on is the same m₂ that resists acceleration, and the two cancel. The field view turns single calculations into maps: at Earth's surface g = 9.81 m/s²; at the satellite distance of Example 4, g = 6.674 × 10⁻¹¹ × 5.972 × 10²⁴ / (7.06 × 10⁶)² ≈ 8.0 m/s² — which is exactly the 8000 N felt by the 1000 kg satellite, divided by its mass. Astronauts float not because g is small up there (it is over 80% of the surface value) but because they and their craft fall together along the same curve. Whenever a problem asks how strongly a place pulls rather than how hard two named bodies attract, the field form — this solver's force mode with the test mass divided out — is the tool to reach for.
Common mistakes
- Measuring r surface-to-surface. The law wants centre-to-centre. For Earth and a satellite, r is Earth's radius plus the altitude; forgetting the radius understates r and wildly overstates the force.
- Dropping the square. F falls with r², not r. A force that is right at 1 m is a quarter — not a half — at 2 m. The same slip in distance mode forgets the square root.
- Exponent slips in scientific notation. 5.972e24 typed as 5.972e23 quietly shrinks a planet tenfold. Cross-check against the Earth–Moon benchmark (1.98 × 10²⁰ N) before trusting a new calculation.
- Expecting the two forces to differ. The pull of m₁ on m₂ equals the pull of m₂ on m₁ — Newton's third law. The Moon pulls Earth exactly as hard as Earth pulls the Moon; it is the masses, and hence the accelerations, that differ.
- Confusing this force with g. g is the acceleration one specific body (usually Earth) produces at a specific place: g = Gm₁/r². The solver's F is the full two-body force; divide F by the small mass to recover the local g.
FAQ
Why is the force so small between everyday objects?
G is tiny (6.674 × 10⁻¹¹), so the attraction between two people or two cars is far too weak to notice. Only planet-sized masses produce a force we can feel — as weight.
What happens to the force if the distance doubles?
Because r is squared, doubling the distance cuts the force to one quarter — this is called an inverse-square law.
Is r measured from the surfaces or the centres?
From centre to centre. For planets, use the distance between their centres, not the gap between their surfaces.
How was the Earth itself weighed?
Exactly as in Example 5: measure the force on a known mass at a known distance from the centre, then solve the law for Earth's mass. Cavendish's measurement of G in 1798 was the missing ingredient.
Does the law work inside a planet?
Partly — only the mass inside your radius counts (the shell outside cancels, by Newton's shell theorem). At Earth's centre the force falls to zero: you would be pulled equally in all directions and float.
Why doesn't the Moon fall into the Earth if the force is so large?
It is falling — constantly — but it also moves sideways at about 1 km/s, so its fall curves into an orbit. The 1.98 × 10²⁰ N supplies exactly the centripetal force its path requires.
What is G, and why is it so small?
G is the universal constant that sets gravity's strength, 6.674 × 10⁻¹¹ N·m²/kg². Why it has that value is unknown — it is measured, not derived — and its smallness is why gravity is by far the weakest fundamental force between individual particles.
Can gravity be shielded or switched off?
No known material or arrangement blocks it; mass is always positive and the force always attracts. "Weightlessness" in orbit is free fall, not absence of gravity — at station altitude the force is still about 90% of its surface value.
How accurate is Newton's law?
Superb for planets, moons and spacecraft — it navigates probes across the solar system. It fails measurably only in extreme fields (Mercury's orbit precession, light bending near the Sun), where Einstein's general relativity takes over and agrees with Newton everywhere Newton was tested.
Do both masses have to be spherical?
No, but spheres are the easy case: outside a sphere, the law works with r centre-to-centre. For irregular bodies the force is the sum over all their parts — which is why precise work near asteroids, whose lumpy fields defy the simple formula, is genuinely hard.