Law of Universal Gravitation Calculator

Solve Newton’s gravitational equation for force, separation distance, or mass between two bodies.

Configuration

Choose what you want to solve for and your preferred output units.

Given Values

Enter the values you know. The calculator converts everything to SI internally.

Results Summary

The main result is shown below, with derived quick stats.

Practical Guide

Law of Universal Gravitation Calculator

Use this guide to confidently apply Newton’s Law of Universal Gravitation in homework, preliminary design, or sanity checks. We’ll walk through the equation, units, dominant variables, realistic worked examples, and the most common pitfalls when interpreting force, distance, and mass results.

6–8 min read Updated 2025 Physics & Engineering

Quick Start

The calculator is built around Newton’s Law of Universal Gravitation: \[ F = \frac{G m_1 m_2}{r^2} \] where \(F\) is gravitational force, \(G\) is the gravitational constant, \(m_1\) and \(m_2\) are masses, and \(r\) is the center-to-center separation distance.

  1. 1 Pick what you want to solve for: Force \(F\), Distance \(r\), or Mass \(m_1\). The solved variable is hidden so you don’t double-enter it.
  2. 2 Enter the two known masses in realistic units (kg, g, or lb). Remember: these are total masses, not weights.
  3. 3 Enter the separation distance between centers of mass (m, km, ft, mi, etc.). For spheres, use center-to-center, not surface-to-surface.
  4. 4 If solving for distance or mass, enter the force value you measured or computed elsewhere and select its units (N, kN, lbf).
  5. 5 Leave \(G\) at its default unless you’re intentionally modeling a different constant (rare). The default is \(6.67430\times10^{-11}\ \text{N·m}^2/\text{kg}^2\).
  6. 6 Choose your preferred output units for the main result. The calculator converts internally to SI, then back to your selection.
  7. 7 Review quick stats (accelerations and potential energy) and open the steps to verify your setup before using results in design or analysis.

Tip: If your result seems wildly large or small, the first suspect is almost always distance squared or a hidden unit mismatch (km vs m, lb vs kg).

Common mistake: Using surface distance instead of center distance. For planets, satellites, or spheres, add radii to get \(r\).

Choosing Your Method

Newton’s law is exact for point masses and a strong approximation for spherically symmetric bodies. In practice, you’ll use one of these approaches depending on geometry and required accuracy.

Method A — Point-Mass Approximation

Treat both bodies as point masses separated by \(r\). This is the standard use of the calculator.

  • Fast and accurate when objects are small compared to \(r\) (e.g., spacecraft to planet).
  • Perfect for classical problems and preliminary engineering checks.
  • Works for any two masses if you use center-to-center distance.
  • Breaks down when bodies are irregular and very close (near-field effects).
  • Doesn’t capture tidal gradients or distributed-mass integration.
Use: \(F = G m_1 m_2 / r^2\)

Method B — Spherical Body / Shell Theorem

For planets and stars, assume spherical symmetry. Outside the body, gravity behaves as if all mass were concentrated at the center.

  • Highly accurate for Earth, Moon, most planets, and stars.
  • Easy to model altitude changes by updating \(r\).
  • Matches the “standard gravitational parameter” approach used in orbit mechanics.
  • Requires the center distance, so you must add radius or altitude.
  • Small errors appear for oblate or non-uniform bodies (e.g., near Earth’s equator).
Outside sphere: same equation, center distance required.

Method C — Distributed Mass / Numerical Integration

For close irregular bodies or complex assemblies (e.g., gravitation of a large structure on a payload), integrate contributions from mass elements: \[ \mathbf{F} = G \int \frac{m_2\, d m_1}{r^2}\,\hat{\mathbf{r}} \]

  • Best for high-precision engineering or near-field gravity.
  • Captures geometry and density variation.
  • Requires modeling software or custom code.
  • Not needed for most student or field applications.
Use when shape matters and \(r\) is small.

If you’re dealing with two spheres (even large ones), Method A and Method B give the same answer as long as you use the correct center distance. Only move to Method C when geometry is non-spherical and you’re close enough that local mass distribution matters.

What Moves the Number the Most

The gravitation equation is simple, but its sensitivity is not evenly distributed. These variables dominate results:

Distance \(r\) (inverse-square)

Force scales with \(1/r^2\). Doubling distance quarters force. A small unit mistake here (e.g., entering 6371 km as 6371 m) changes results by millions.

Mass magnitudes

Force is linear in both masses. If one mass is enormous (planet), it dominates the product, but the math remains linear: 10× mass → 10× force.

Center vs. surface distance

Using surface separation underestimates \(r\) and overestimates \(F\). For spheres: \(r = R_1 + R_2 + \text{gap}\).

Units and conversions

The internal unit system is SI. Any mismatch between lb and kg, or mi and m, produces large errors. Always confirm the unit selectors next to each input.

Applicability of point-mass model

If bodies are unusually shaped and close, the model can be off by several percent (or more). That’s a physics limitation, not a calculator bug.

Gravitational constant \(G\)

\(G\) is known to limited precision and varies only by measurement uncertainty. Changing \(G\) is almost never justified unless you’re doing sensitivity studies.

Worked Examples

Example 1 — Force Between Earth and a 1,000 kg Satellite

  • Mass of Earth: \(m_1 = 5.972\times10^{24}\ \text{kg}\)
  • Satellite mass: \(m_2 = 1.00\times10^3\ \text{kg}\)
  • Earth radius: \(R_E = 6.371\times10^6\ \text{m}\)
  • Altitude: \(h = 400\ \text{km} = 4.00\times10^5\ \text{m}\)
  • Distance: \(r = R_E + h = 6.771\times10^6\ \text{m}\)
  • Constant: \(G = 6.67430\times10^{-11}\)
1
Set center distance: \[ r = 6.371\times10^6 + 4.00\times10^5 = 6.771\times10^6\ \text{m} \]
2
Apply Newton’s law: \[ F = \frac{G m_1 m_2}{r^2} \]
3
Substitute values: \[ F = \frac{(6.67430\times10^{-11})(5.972\times10^{24})(1.0\times10^3)} {(6.771\times10^6)^2} \]
4
Compute: \[ F \approx 8.69\times10^3\ \text{N} = 8.69\ \text{kN} \]

Interpretation: this is the satellite’s gravitational attraction to Earth at 400 km altitude. If you divide by \(m_2\), you get \(a_2 \approx 8.69\ \text{m/s}^2\), which matches the expected reduction from \(9.81\ \text{m/s}^2\) at sea level.

Example 2 — Distance Required for a Target Gravitational Force

  • Mass 1: \(m_1 = 2.00\times10^5\ \text{kg}\) (large structure)
  • Mass 2: \(m_2 = 500\ \text{kg}\) (payload)
  • Desired force: \(F = 0.010\ \text{N}\)
  • Constant: \(G = 6.67430\times10^{-11}\)
  • Unknown: distance \(r\)
1
Rearrange for distance: \[ r = \sqrt{\frac{G m_1 m_2}{F}} \]
2
Substitute values: \[ r = \sqrt{\frac{(6.67430\times10^{-11})(2.00\times10^5)(500)}{0.010}} \]
3
Compute inside the root: \[ \frac{G m_1 m_2}{F} = \frac{(6.67430\times10^{-11})(1.00\times10^8)}{0.010} = 0.66743 \]
4
Final distance: \[ r = \sqrt{0.66743} \approx 0.817\ \text{m} \]

Interpretation: to keep the mutual gravitational pull at or below 0.01 N, the payload should be ~0.82 m away from the structure’s center of mass. If the structure is not spherical and the payload is very close, consider distributed-mass modeling for precision.

Common Layouts & Variations

Real problems come in recognizable configurations. The same equation applies, but how you define \(r\) and interpret results changes.

ConfigurationHow to define \(r\)Typical use casePros / Notes
Planet–Satellite\(r = R_{\text{planet}} + h\)Orbit mechanics, weight at altitudeShell theorem makes this very accurate for planets.
Two Spheres (close)\(r = R_1 + R_2 + \text{gap}\)Lab experiments, ball-to-ball attractionPoint-mass model still holds if densities are uniform.
Object Near a Large Flat StructureApproximate \(r\) to structure COMNear-field gravitation checksIf distance is small vs structure size, errors increase.
Binary Stars / Large BodiesCenter distance from ephemerisAstrophysics, gravitational bindingOften paired with potential energy \(U\).
Test Mass in a Gravity FieldUse field source COM to test mass COMCompute local gravitational acceleration\(a = F/m\) gives field strength at that location.

Tip: When bodies are very different in size, set the larger body as \(m_1\) and treat the smaller as \(m_2\). It doesn’t change the math, but it helps interpretation of quick stats.

Limit: Newtonian gravitation ignores relativistic corrections. For high-precision GPS or strong gravity near compact objects, use GR models.

Specs, Logistics & Sanity Checks

Before trusting a result, run these practical checks. They catch 95% of setup errors.

Unit Sanity

  • Masses in kg (or properly converted from g/lb)?
  • Distance in meters after conversion?
  • Force in newtons (not kg or “weight”)?
  • Did you pick the right output unit?

Magnitude Feel

  • Human-scale masses at meter-scale distances produce tiny forces (often micro- to milli-newtons).
  • Planetary masses produce kilonewtons or more at orbital distances.
  • If the force is huge for small objects, \(r\) is probably too small or in the wrong unit.

Geometry Assumptions

  • Are both bodies roughly spherical or far apart relative to size?
  • Did you use center-to-center \(r\)?
  • If close and irregular, do you need a distributed model?
  • Are you ignoring nearby masses that might matter?

If you’re using the result for design or operations (like sensitive instruments near large structures), do a quick “what-if” sweep: increase and decrease \(r\) by 5–10% and see how much \(F\) moves. That sensitivity tells you how accurate your geometry must be.

Frequently Asked Questions

What is the Law of Universal Gravitation?
Newton’s Law of Universal Gravitation states that every mass attracts every other mass with a force \[ F = \frac{G m_1 m_2}{r^2}. \] The force acts along the line connecting their centers of mass and follows an inverse-square relationship with distance.
Do I use center-to-center or surface-to-surface distance?
Use center-to-center distance. For spheres, add their radii plus any gap: \(r = R_1 + R_2 + \text{gap}\). Using surface separation will overestimate force.
Can this calculator be used for objects on Earth’s surface?
Yes. Set \(m_1\) to Earth’s mass and \(r\) to Earth’s radius. The result for a small \(m_2\) should match your weight in newtons (\(W \approx m_2 g\)) within normal rounding.
Why are forces between everyday objects so small?
\(G\) is extremely small and force drops with \(1/r^2\). Two 1000-kg objects 1 meter apart attract with only about \(6.7\times10^{-5}\) N—far below what you can feel.
What units should I use for mass and force?
Mass is in kilograms internally. You can enter kg, grams, or pounds; the calculator converts to SI. Force outputs can be N, kN, or lbf. Never enter “weight” in kg—convert weight to newtons first if needed.
Does the law still work if objects are not spherical?
The point-mass equation is accurate when objects are far apart compared to their size. If bodies are close or irregular, the true force requires integrating over their mass distribution; results from the simple law may be off by several percent or more.
How is gravitational potential energy related to this?
The potential energy of two masses is \[ U = -\frac{G m_1 m_2}{r}. \] The calculator shows \(U\) as a quick stat to help with orbit and binding-energy checks.
Scroll to Top