Law of Universal Gravitation Calculator
Solve for gravitational force, either mass, or center-to-center distance using Newton’s law of universal gravitation.
Calculator is for informational purposes only. Terms and Conditions
Uses the Newtonian point-mass/spherically symmetric-body relationship with center-to-center separation and the CODATA 2022 recommended value of the Newtonian constant of gravitation.
Choose what to solve for
The unknown field is removed from the input list; enter the other three quantities.
Enter the known values
Scientific notation such as 5.9722e24 is accepted. Distance is measured between the objects’ centers of mass.
Fields marked required must be completed. Each quantity must be greater than zero.
Result
The selected unknown appears first, followed by physically useful checks and transparent calculation steps.
Result details
- Check—
Show calculation steps Review unit conversions, rearrangement, substitution, and reverse checks
- Enter valid values to see the complete calculation.
Center-to-Center Gravitational Force
The force acts along the line joining the centers. Each body experiences the same force magnitude in the opposite direction.
Method, Sources, and Assumptions
The governing relationship, constant source, model scope, and interpretation limits.
Calculations use Newton’s law of universal gravitation and G = 6.67430 × 10⁻¹¹ m³·kg⁻¹·s⁻², the 2022 CODATA recommended Newtonian constant of gravitation reported by NIST.
- Use center-to-center separation. Surface gap is not the r term unless body radii are included separately to determine center distance.
- The equation is exact within the Newtonian point-mass model and also applies externally to spherically symmetric bodies.
- The displayed force is magnitude. The two bodies experience equal-magnitude forces in opposite directions.
Calculator guide
Understanding Your Gravitation Result
The Law of Universal Gravitation Calculator solves Newton’s two-body gravity relationship for gravitational force, either object’s mass, or the center-to-center distance between the objects. Choose the unknown, enter the other three quantities, and the calculator converts the selected units before solving in SI units.
The primary result is a positive magnitude. For force calculations, that magnitude describes the attraction each body exerts on the other; the forces point in opposite directions along the line joining their centers. The most important input detail is distance: the variable \(r\) is center-to-center separation, not merely the empty gap between two surfaces.
- Solves for
- Force, Object 1 mass, Object 2 mass, or center-to-center distance
- Core relationship
- Force is proportional to both masses and inversely proportional to distance squared
- Key input rule
- Use mass units for the objects and center-to-center distance for \(r\)
How to Use the Calculator Correctly
The calculator has four solve modes, individual unit selectors, three unit presets, and advanced display controls. A reliable result starts with selecting the correct unknown and defining the distance consistently.
-
Choose the unknown
Use Solve For to select gravitational force \(F\), Object 1 mass \(m_1\), Object 2 mass \(m_2\), or center-to-center distance \(r\). The unknown field is removed from the input list so only the three known quantities remain.
-
Enter the known physical quantities
Enter positive values for the active fields. Scientific notation is accepted, so a mass such as \(5.9722\times10^{24}\text{ kg}\) may be entered as
5.9722e24. For distance, measure from one center of mass to the other. -
Select units without manually converting first
The calculator supports mixed SI, U.S. customary, and astronomy-friendly units. The SI / Scientific, Astronomy, and U.S. Customary presets change display units while preserving the underlying physical quantities; individual unit selectors can still be changed afterward. Earth-mass, solar-mass, and Earth-radius options use the reference values shown by the calculator as convenient conversions, not exact defining constants.
-
Use Advanced Options only for the answer display
Answer Units changes with the solve mode. Displayed Precision controls shown significant figures, while Number Format can use automatic, scientific, engineering, or decimal presentation. These controls change how the answer is displayed, not the underlying equation.
Calculation Method and Solve Modes
The calculator uses Newton’s law of universal gravitation, an exact closed-form relationship within the Newtonian point-mass model. For external gravity, the same relationship also applies to spherically symmetric bodies when \(r\) is measured between their centers.
Gravitational force
In plain language: multiply the two masses and the universal gravitational constant, then divide by the square of the center-to-center distance.
The calculator uses \(G=6.67430\times10^{-11}\ \mathrm{m}^{3}\,\mathrm{kg}^{-1}\,\mathrm{s}^{-2}\), the 2022 CODATA recommended value reported by NIST.
The units reduce to newtons, providing a quick dimensional check that the force equation is being used with compatible mass and distance dimensions.
Rearrangements used by the other solve modes
The calculator uses the same physical law in every mode; selecting a different unknown changes only the algebraic rearrangement and the available answer units.
- \(F\)
- Magnitude of gravitational attraction, with SI unit newton (N).
- \(G\)
- Universal gravitational constant, \(6.67430\times10^{-11}\ \mathrm{m}^{3}\,\mathrm{kg}^{-1}\,\mathrm{s}^{-2}\).
- \(m_1\)
- Total mass of Object 1, with canonical SI unit kilogram (kg).
- \(m_2\)
- Total mass of Object 2, with canonical SI unit kilogram (kg).
- \(r\)
- Center-to-center separation, with canonical SI unit meter (m).
Because distance is squared, gravity follows an inverse-square relationship. Holding both masses constant, doubling \(r\) reduces the force to one quarter; tripling \(r\) reduces it to one ninth. Holding distance and the other mass constant, doubling either mass doubles the force. For a deeper treatment of the equation itself, see the Law of Universal Gravitation equation guide.
Worked Example: A 70 kg Person on Earth
Consider a 70 kg object whose center of mass is modeled 6371 km from Earth’s center, approximately Earth’s mean radius. Using the same rounded Earth reference values available to the calculator’s astronomy-friendly units provides a useful check on familiar near-surface gravity.
Convert the distance to meters
Substitute the values
Result
\(F\approx687.42\text{ N}\)
In this simplified spherical-Earth model, the object and Earth exert equal-magnitude gravitational forces on one another. Their accelerations are very different because their masses are vastly different. The result is gravitational attraction; an actual scale reading is a normal force and can differ when the object and scale are accelerating.
Connection to the familiar weight equation
For a small mass \(m\) near a much larger spherical body of mass \(M\), define the local gravitational acceleration as \(g=GM/r^2\). Substituting that definition into universal gravitation gives the familiar weight relationship:
This is why the Earth example produces a force close to the object’s familiar weight near Earth’s surface. Lowercase \(g\) varies with location; uppercase \(G\) is the universal gravitational constant.
How to Interpret the Results
The primary answer is the selected unknown, but the result details help determine whether that answer makes physical sense. The calculator also reports a force check, the acceleration of each object, and gravitational potential energy for the reconstructed two-body state.
Equal force does not mean equal acceleration
The two bodies experience the same force magnitude in opposite directions. Since \(a=F/m\), the less massive body has the greater acceleration whenever the masses are unequal.
Distance has squared sensitivity
Holding both masses constant, a 10% increase in center distance changes the force by the factor \(1/1.1^2\approx0.826\), a decrease of about 17.4%. A 10% decrease changes it by \(1/0.9^2\approx1.235\), an increase of about 23.5%.
Use the force check as a reverse test
When solving for a mass or distance, substitute the solved value back into \(F=Gm_1m_2/r^2\). The reconstructed force should agree with the force entered for that solve mode, apart from display rounding.
Common Gravitation Calculation Mistakes
Most incorrect answers come from defining the inputs incorrectly rather than from the algebra. These checks are especially important because astronomical quantities often span many orders of magnitude.
Using surface gap instead of center distance
The \(r\) term is center-to-center separation. For a small object at altitude \(h\) above a spherical body of radius \(R\), the relevant distance is approximately \(r=R+h\), not \(h\) alone.
Confusing mass with weight
The equation requires masses for \(m_1\) and \(m_2\). Pounds-mass and kilograms are mass units; pounds-force and newtons are force units. Select the unit that represents the physical quantity you actually know.
Confusing \(G\) with lowercase \(g\)
\(G\) is the universal gravitational constant. Lowercase \(g\) is a local gravitational acceleration and depends on the attracting body’s mass and the distance from its center: \(g=GM/r^2\).
Forgetting the square on distance
The denominator is \(r^2\), so a distance error can strongly change the result. If distance doubles while the masses stay fixed, the force becomes one quarter of its original value.
Misreading scientific notation
A value such as \(5.9722\times10^{24}\) can be entered as 5.9722e24. Moving the exponent by even one power of ten changes the mass—and therefore the force—by a factor of ten.
Assuming the heavier body feels more force
Newton’s third law requires equal force magnitudes on the two bodies. The heavier body generally accelerates less because the same force acts on a larger mass.
Assumptions and Model Limits
Newton’s law is extremely useful, but the simple scalar calculator represents a two-body Newtonian model. The meaning of the result depends on whether the real system can reasonably be represented that way.
Point masses and spherical symmetry
The equation applies directly to point masses and, for external gravity, to spherically symmetric bodies using center-to-center distance. For irregular bodies, it is a useful approximation when separation is large compared with body size; close irregular geometries can require integrating over the actual mass distribution.
Force magnitude, not a full vector simulation
The calculator reports positive force magnitude. Direction is attractive along the line joining the centers, with equal and opposite force vectors. It does not propagate positions or velocities through time.
Two-body relationship
Other masses are not included automatically. In a system where several bodies exert meaningful gravitational forces, calculate vector contributions or use an appropriate many-body dynamics model.
Newtonian gravity
For ordinary classroom, engineering, and many astronomical calculations, Newtonian gravity is highly useful. Situations requiring relativistic precision or involving sufficiently strong gravitational fields require a general-relativistic treatment instead.
Sources and Calculation Checks
The calculator and this guide use authoritative constants and physics references, while the worked example is independently checked through gravitational acceleration.
- NIST Fundamental Physical Constants — source for the 2022 CODATA recommended Newtonian constant of gravitation used by the calculator.
- OpenStax University Physics: Newton’s Law of Universal Gravitation — supports the inverse-square relationship, equal-and-opposite force directions, center-to-center distance, and the point-mass/spherical-symmetry scope.
- NASA Science: Compare Earth and the Moon — provides current Earth mass and radius reference data used to check the rounded Earth values in the calculator and worked example.
The worked example was recomputed directly from \(F=Gm_1m_2/r^2\) and independently checked by dividing the resulting force by 70 kg to recover approximately \(9.82\ \mathrm{m/s^2}\). NASA Science’s current Earth comparison data reports an Earth mass of about \(5.97219\times10^{24}\text{ kg}\) and a 6371 km radius reference, consistent with the rounded values used here.