Law of Universal Gravitation Calculator
Solve Newton’s gravitational equation for force, separation distance, or mass between two bodies.
Calculation Steps
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.
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 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 Enter the two known masses in realistic units (kg, g, or lb). Remember: these are total masses, not weights.
- 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 If solving for distance or mass, enter the force value you measured or computed elsewhere and select its units (N, kN, lbf).
- 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 Choose your preferred output units for the main result. The calculator converts internally to SI, then back to your selection.
- 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.
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).
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.
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:
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.
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.
Using surface separation underestimates \(r\) and overestimates \(F\). For spheres: \(r = R_1 + R_2 + \text{gap}\).
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.
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.
\(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}\)
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\)
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.
| Configuration | How to define \(r\) | Typical use case | Pros / Notes |
|---|---|---|---|
| Planet–Satellite | \(r = R_{\text{planet}} + h\) | Orbit mechanics, weight at altitude | Shell theorem makes this very accurate for planets. |
| Two Spheres (close) | \(r = R_1 + R_2 + \text{gap}\) | Lab experiments, ball-to-ball attraction | Point-mass model still holds if densities are uniform. |
| Object Near a Large Flat Structure | Approximate \(r\) to structure COM | Near-field gravitation checks | If distance is small vs structure size, errors increase. |
| Binary Stars / Large Bodies | Center distance from ephemeris | Astrophysics, gravitational binding | Often paired with potential energy \(U\). |
| Test Mass in a Gravity Field | Use field source COM to test mass COM | Compute 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.
