Audited ·Last updated 27 Jul 2026·8 citations·Tier 1·0 uses

Gravitational Force Calculator

Free gravitational force calculator — solve Newton's F = G·m₁·m₂/r² for force, mass, or distance. Worked Earth-Moon and Earth-Sun examples.

Gravitational Force Calculator

Solve for
First mass in kilograms. Default is Earth's mass (5.972×10²⁴ kg). Leave blank when solving for m₁.
kg
Second mass in kilograms. Default is the Moon's mass (7.342×10²² kg). Leave blank when solving for m₂.
kg
Centre-to-centre separation in metres. Default is the Earth-Moon mean distance (3.844×10⁸ m). Leave blank when solving for r.
m
Mutual gravitational force in newtons. Only used when solving for one of the masses or distance — leave blank when solving for force.
N
Gravitational force
198,040,321,887,645,200,000
Mutual attractive force F between the two masses in newtons, computed from F = G·m₁·m₂/r² when solving for force and echoed back from the input otherwise.
Mass 1
5,972,000,000,000,000,000,000,000 kg
Mass 2
73,420,000,000,000,000,000,000 kg
Distance
384,400,000 m
Gravitational constant (G)
0 m³·kg⁻¹·s⁻²

Background.

This gravitational force calculator solves Newton's law of universal gravitation — F = G·m₁·m₂/r² — for whichever of the four quantities you do not know, using the CODATA 2018 recommended value of the Newtonian constant of gravitation G = 6.67430×10⁻¹¹ m³·kg⁻¹·s⁻². Pick a 'solve for' mode, type in the three known values, and the tool returns the missing one in SI units (newtons for force, kilograms for mass, metres for distance). The default inputs reproduce the Earth-Moon system: m₁ = 5.972×10²⁴ kg (Earth), m₂ = 7.342×10²² kg (Moon), r = 3.844×10⁸ m (mean centre-to-centre distance), giving a mutual attractive force of about 1.98×10²⁰ N — the same force that holds the Moon in its orbit and raises the ocean tides on Earth.

Newton's law, first published in Book III of the 'Philosophiæ Naturalis Principia Mathematica' in 1687, is one of the most consequential statements in the history of physics. It states that every point mass in the universe attracts every other point mass with a force directed along the line joining them, proportional to the product of their masses and inversely proportional to the square of the distance between them. The proportionality constant G is universal — the same number governs the fall of an apple in Lincolnshire, the orbit of Mars around the Sun, the rotation of binary stars in the Magellanic Clouds, and the dynamics of galaxy clusters at the edge of the observable universe — and it is by far the most poorly measured fundamental constant we have, known only to about four significant figures because gravity is some 10³⁶ times weaker than the electromagnetic force and is extraordinarily difficult to isolate from environmental noise.

The 'big G' that appears in this calculator should not be confused with the 'little g' that everyday physics problems use for the acceleration due to gravity at Earth's surface, g ≈ 9.81 m/s². The former is a universal constant of nature; the latter is a local consequence — g = G·M_Earth / R_Earth² — that varies measurably with altitude, latitude, and the density of rock underfoot.

Newton himself never measured G; he wrote down only the proportionality. The constant was first quantified by Henry Cavendish in 1798, more than a century after the 'Principia' appeared, using a torsion balance of breathtaking ingenuity in which he measured the tiny twist of a wire suspending two small lead balls being pulled toward two large lead balls — a deflection of less than a millimetre that let him 'weigh the world' and derive Earth's mean density to within 1% of the modern value.

Below the widget you will find the inverse-square geometric argument for why the exponent is exactly 2 (the surface area of a sphere grows as r², so a flux of 'gravitational influence' must dilute as 1/r²), the full Cavendish torsion-balance derivation, worked examples for the Earth-Moon and Earth-Sun systems, the connection between Newtonian gravity and Einstein's general relativity (Newton is the weak-field, slow-motion limit of GR), tidal forces and why they fall off as 1/r³ rather than 1/r², orbital mechanics applications including Kepler's third law, and an honest discussion of where Newton's law breaks down — Mercury's perihelion precession, gravitational lensing, the cosmological scale, and any regime where v approaches c or the Schwarzschild radius approaches the system size. The calculator itself is a thin shell over a pure-function solver registered at gravitationalForce.solve; the same code path is exercised by 30 unit tests covering Earth-Moon, Earth-Sun, two protons, two galaxies, and pathological inputs such as zero distance and zero mass, so the answer you read here is the same answer used elsewhere in the Quanta engineering toolset.

What is gravitational force calculator?

Newton's law of universal gravitation states that any two point masses m₁ and m₂ separated by a distance r attract each other along the line joining them with a force of magnitude F = G·m₁·m₂/r², where G ≈ 6.67430×10⁻¹¹ m³·kg⁻¹·s⁻² is the Newtonian constant of gravitation (also called 'big G'). The law has four features worth committing to memory. First, it is universal: every mass attracts every other mass everywhere in the universe with this same constant of proportionality. Second, it is mutual: the force on m₁ from m₂ is equal in magnitude and opposite in direction to the force on m₂ from m₁ (Newton's third law applied to gravity). Third, it is central: the force vector points along the line joining the two masses, with no tangential component. Fourth, it falls off as the inverse square of distance: doubling the separation reduces the force to a quarter, tripling reduces it to a ninth, and so on — a consequence of the fact that gravitational 'flux' spreads over the surface of a sphere whose area grows as r². The law applies exactly to point masses and, by Newton's shell theorem, to any spherically symmetric mass distribution as if all its mass were concentrated at the centre. That theorem is what justifies treating planets, stars, and (to a good approximation) Earth itself as point masses for orbital calculations. The law is a non-relativistic, action-at-a-distance description; Einstein's general relativity superseded it in 1915 by reframing gravity as the curvature of spacetime, with Newton's formula emerging as the weak-field, slow-motion limit. For everyday and most astronomical problems — orbital mechanics inside the solar system, satellite trajectories, tidal calculations — Newton's law is more than accurate enough, and is the form working scientists actually use. GR corrections matter only when v/c becomes appreciable, when the gravitational potential GM/(rc²) becomes appreciable, or when you need timekeeping accurate to parts in 10¹⁰ (as in GPS satellites).

How to use this calculator.

  1. Choose which quantity you want to compute from the 'Solve for' menu — force, mass 1, mass 2, or distance.
  2. Enter the three known quantities in SI units. Use scientific notation for astronomical masses and distances (5.972e24 means 5.972×10²⁴, 3.844e8 means 3.844×10⁸).
  3. Leave the field for the unknown blank — the calculator ignores it and computes the missing value from the other three plus the CODATA 2018 value of G.
  4. When solving for force, only m₁, m₂, and r are needed; the force input is ignored.
  5. When solving for distance, the calculator returns r = √(G·m₁·m₂/F); negative or zero forces are rejected because the inverse computation would have no real positive root.
  6. Read the primary result and verify the order of magnitude is plausible: the Earth-Moon force is about 2×10²⁰ N, the Earth-Sun force is about 3.5×10²² N, and a 1 kg mass on Earth's surface feels about 9.8 N — a useful sanity check for any astronomical input.

The formula.

F = G × m₁m₂ ⁄ r²

The core relationship and its three inverse forms are:

F = G · m₁ · m₂ / r² (Newton, 1687 — force, given the masses and distance) m₁ = F · r² / (G · m₂) (solve for the first mass) m₂ = F · r² / (G · m₁) (solve for the second mass) r = √(G · m₁ · m₂ / F) (solve for distance)

The constant G is the Newtonian constant of gravitation, with the CODATA 2018 recommended value G = 6.67430(15)×10⁻¹¹ m³·kg⁻¹·s⁻². The five-digit relative uncertainty (2.2×10⁻⁵) is by far the largest of any fundamental constant — for comparison, the elementary charge e is known to a relative uncertainty of about 10⁻¹⁰, and the speed of light c is exact by definition. The reason the exponent in r² is exactly 2 — not 1.97 or 2.03 — is geometric. Imagine gravitational 'influence' (whatever its underlying mechanism) emanating from a point mass and spreading outward through space. By the time it reaches a sphere of radius r, that influence has been diluted over a surface area of 4πr². The force per unit receiving area must therefore scale as 1/(4πr²), which is the inverse-square law. The same geometric argument explains the inverse-square dependence of electrostatic Coulomb forces, light intensity, sound intensity, and radiation flux — all 'three-dimensional flux' phenomena. Three small but important conventions are baked in. First, all quantities are positive scalars — the calculator returns force magnitudes, not vectors, because the direction is always along the line joining the masses and is uninteresting to compute. Second, the calculator refuses to divide by zero: r = 0 (coincident point masses) or F = 0 (when solving inversely) raise an InvalidInputError rather than returning Infinity. Third, the law assumes spherically symmetric mass distributions or genuine point masses; for irregular bodies (asteroids, dumbbell-shaped objects) you need to integrate the inverse-square force over the volume element by element, which this calculator does not do.

A worked example.

Example

Compute the gravitational attraction between Earth and the Sun. Enter solveFor = 'force', mass1 = 5.972×10²⁴ kg (Earth), mass2 = 1.989×10³⁰ kg (Sun), and distance = 1.496×10¹¹ m (one astronomical unit, the mean Earth-Sun separation). Newton's law gives F = G·m₁·m₂/r² = (6.67430×10⁻¹¹) × (5.972×10²⁴) × (1.989×10³⁰) / (1.496×10¹¹)² ≈ 3.54×10²² N. That is a staggering number — 35 billion trillion newtons — and it is what holds Earth in its 365.25-day orbit. You can sanity-check it via Kepler's third law: the centripetal acceleration required to keep Earth on a circular orbit at 1 AU is a = v²/r, with v = 2πr/T ≈ 29,785 m/s, giving a ≈ 0.00593 m/s², and the force F = m_Earth × a = 5.972×10²⁴ × 0.00593 ≈ 3.54×10²² N — the two methods agree to three significant figures, which is exactly Newton's point in Book III of the Principia: the same law that makes apples fall also keeps planets in their orbits. For comparison, the Earth-Moon force we computed in the defaults is 1.98×10²⁰ N, about 180 times smaller than the Earth-Sun force despite the Moon being 390 times closer than the Sun — the Sun's mass advantage (×27 million) overwhelms the inverse-square distance penalty (×152,000).

mass15,972,000,000,000,000,000,000,000
mass21,989,000,000,000,000,000,000,000,000,000
distance149,600,000,000
solve Forforce

Frequently asked questions.

What is the formula for gravitational force?
Newton's law of universal gravitation is F = G·m₁·m₂/r², where F is the mutual attractive force in newtons, m₁ and m₂ are the two masses in kilograms, r is the centre-to-centre distance in metres, and G is the Newtonian constant of gravitation, 6.67430×10⁻¹¹ m³·kg⁻¹·s⁻². The force is directed along the line joining the two masses and is the same on each (Newton's third law). The formula applies to point masses and, by Newton's shell theorem, to any spherically symmetric mass distribution as if all its mass were concentrated at the centre — which is why we can treat planets and stars as point masses for orbital calculations.
What is the value of the gravitational constant G?
The CODATA 2018 recommended value is G = 6.67430(15)×10⁻¹¹ m³·kg⁻¹·s⁻², where the (15) denotes a standard uncertainty of 0.00015×10⁻¹¹ in the last two digits — a relative uncertainty of about 2.2 parts in 10⁵, or about four significant figures. This is by far the worst-measured fundamental constant of physics; the elementary charge e is known to ten significant figures, and the speed of light is exact by definition. The reason G is so hard to pin down is that gravity is some 10³⁶ times weaker than electromagnetism, and even the most carefully isolated torsion-balance experiments are perturbed by ambient mass shifts, temperature gradients, and seismic noise. Different precision experiments since 2000 have reported values that disagree at the third significant figure — a long-running embarrassment of metrology that the BIPM and CODATA periodically reassess.
How did Cavendish measure G in 1798?
Henry Cavendish used a torsion balance designed by John Michell: a horizontal wooden rod about 1.8 metres long, suspended at its midpoint by a thin wire, with a small lead ball (about 0.73 kg) at each end. Two much larger lead balls (about 158 kg each) were placed near the small balls but on opposite sides of the rod, so that the gravitational attraction between each large-small pair twisted the rod in the same direction. By measuring the angle of twist (using a telescope and a vernier scale, because the deflection was less than a millimetre) and knowing the torsional stiffness of the wire from its period of oscillation, Cavendish could compute the force between the lead balls — and from that, infer the density of the Earth, which he found to be 5.448 times that of water. The modern value is 5.514, so Cavendish was right to 1.2%. He did not state his result as 'G = …'; that formulation came later, after the gravitational constant was named. The experiment is rightly regarded as one of the greatest single-investigator achievements in the history of experimental physics.
Why is gravity an inverse-square law and not inverse-cube or inverse-linear?
The argument is geometric. Imagine gravitational influence spreading outward from a point mass uniformly in all directions through three-dimensional space. By the time it reaches a sphere of radius r, that influence has been diluted over the surface area of the sphere, which is 4πr². The force per unit receiving area therefore scales as 1/(4πr²) — the inverse-square law. The same geometry explains why electrostatic Coulomb forces, light intensity, sound intensity, and radiation flux all fall off as 1/r²: all are 'flux' phenomena spreading in three dimensions. If we lived in two-dimensional space, gravity would fall off as 1/r (cylindrical geometry); in four-dimensional space, as 1/r³ (hyperspherical geometry). High-precision tests of the inverse-square law have been carried out down to separations of about 50 microns, and the exponent agrees with exactly 2 to about three parts in 10⁵ — there is no evidence of large extra dimensions at scales above 40 μm.
What is the difference between big G and little g?
Big G is the Newtonian constant of gravitation, G = 6.67430×10⁻¹¹ m³·kg⁻¹·s⁻², a universal constant of nature that appears in Newton's law for any pair of masses anywhere in the universe. Little g is the local acceleration due to gravity at the surface of a particular body, expressed in m/s². For Earth at sea level and 45° latitude, g ≈ 9.806 m/s². The two are related by g = G·M_planet / R_planet², so g depends on which planet you are standing on (Earth: 9.81, Moon: 1.62, Mars: 3.71, Jupiter cloud-top: 24.79). On Earth, little g varies measurably with altitude (g decreases by about 0.003 m/s² per kilometre of altitude), latitude (because Earth is flattened and rotates), and local rock density (gravity surveys exploit this to find ore bodies and oil reservoirs). Big G is a constant; little g is a parameter of the planet you happen to be on.
What is the gravitational force between two people standing one metre apart?
Take two adults of mass 70 kg each, centre-to-centre distance about 1 metre. F = (6.67430×10⁻¹¹) × 70 × 70 / 1² ≈ 3.27×10⁻⁷ N — about 0.33 micronewtons, or roughly the weight of a single grain of fine sand. Gravity between everyday objects is utterly negligible compared to electromagnetic, frictional, or muscular forces; it is only because there is no such thing as 'negative mass' (whereas positive and negative electric charges cancel in bulk matter) that gravity dominates at astronomical scales. This 10⁻⁷ N order-of-magnitude is also why Cavendish's measurement was so impressive: he detected forces of similar magnitude between hand-held lead balls in 1798, two centuries before laser interferometry.
What is the Earth-Moon gravitational force?
Using Earth's mass 5.972×10²⁴ kg, the Moon's mass 7.342×10²² kg, and their mean centre-to-centre distance 3.844×10⁸ m, Newton's law gives F = (6.67430×10⁻¹¹) × (5.972×10²⁴) × (7.342×10²²) / (3.844×10⁸)² ≈ 1.98×10²⁰ N. That is the force that holds the Moon in orbit; equivalently, it is the centripetal force required to bend the Moon's velocity vector by enough each second to keep it on a roughly circular path with a 27.3-day period. The same mutual force, acting unequally on the near and far sides of Earth, also raises the ocean tides — though the *tidal* force scales as 1/r³ rather than 1/r², which is why the Moon (closer) produces about twice the tidal range that the Sun (much more massive but much farther) does, even though the gross Earth-Sun gravitational force is some 180 times larger than the gross Earth-Moon gravitational force.
Where does Newton's law of gravity break down?
Three regimes, all anticipated by Einstein in 1915 and confirmed since. First, when the gravitational potential GM/(rc²) becomes large — close to a black hole, or in the orbits of stars around the supermassive black hole at the galactic centre — Newtonian gravity under-predicts the precession of orbits. The classic 19th-century anomaly was Mercury's perihelion advancing by 43 arcseconds per century more than Newton predicted; general relativity nails the exact value. Second, when v/c becomes appreciable — near-light-speed test particles, or the inspiral of binary neutron stars detected by LIGO — gravitational waves carry away orbital energy at a rate Newton's law does not predict. Third, at cosmological scales, the dynamics of galaxies and galaxy clusters require either large amounts of dark matter (within the Newtonian framework) or modified gravity (outside it); current cosmology favours dark matter, but the question is genuinely open. For solar-system mechanics, satellite tracking, and any laboratory experiment, Newton is accurate to roughly one part in 10⁸ — entirely adequate. GR is the formalism you reach for when you need parts-in-10¹⁰ timekeeping (GPS), or when you are within a few Schwarzschild radii of a black hole.
How is gravitational force related to weight?
Your weight is the gravitational force the Earth exerts on you. With your mass m and Earth's mass M_E at Earth's surface radius R_E, Newton's law gives W = G·m·M_E/R_E² = m·g, where g = G·M_E/R_E² ≈ 9.806 m/s² is the local acceleration due to gravity. So a 70 kg person weighs about 70 × 9.806 ≈ 686 N at sea level. On the Moon, with M_Moon/R_Moon² about 6 times smaller than Earth's value, the same person weighs about 113 N — one-sixth their Earth weight. Mass is invariant (it is the same 70 kg everywhere); weight is the local gravitational force and depends on which planet you stand on. The calculator computes weight implicitly when you enter your mass as m₁, the planet's mass as m₂, and the planet's radius as r — the resulting force is your weight on that planet's surface.
Does the gravitational constant G change over time?
Within current measurement precision, no. Lunar laser ranging — bouncing pulsed lasers off retroreflectors left on the Moon by the Apollo astronauts and Soviet Lunokhod missions — has tracked the Earth-Moon distance to millimetre accuracy for over 50 years, and any time-variation in G would show up as a drift in the Moon's orbital period. The current limit is dG/G·dt < 10⁻¹² per year, which is to say G has changed by less than 0.014% over the entire 13.8 billion year age of the universe. Some speculative cosmological models (Dirac's 'large numbers hypothesis', certain scalar-tensor theories) predict a slow drift in G; none have survived the lunar-laser-ranging constraint. For all practical and most theoretical purposes, treat G as a constant of nature.

References& sources.

  1. [1]Newton, I. (1687). Philosophiæ Naturalis Principia Mathematica. London: Royal Society. Book III, Propositions I–VIII state and demonstrate the law of universal gravitation F ∝ m₁m₂/r². English translation by Andrew Motte (1729) revised by Florian Cajori (1934) is the standard modern reference; the 1687 first edition is digitised by the Cambridge Digital Library and freely available.
  2. [2]Cavendish, H. (1798). Experiments to determine the density of the Earth. Philosophical Transactions of the Royal Society of London, 88, 469–526. The original publication of the torsion-balance experiment from which the value of G (and equivalently Earth's mean density) was first quantified; freely available in the Royal Society digital archive.
  3. [3]Tiesinga, E., Mohr, P. J., Newell, D. B. & Taylor, B. N. (2021). CODATA recommended values of the fundamental physical constants: 2018. Reviews of Modern Physics, 93(2), 025010. Authoritative peer-reviewed source for G = 6.67430(15)×10⁻¹¹ m³·kg⁻¹·s⁻²; the calculator hard-codes this value.
  4. [4]NIST Reference on Constants, Units, and Uncertainty — Newtonian constant of gravitation. National Institute of Standards and Technology, current CODATA value page. Provides the value, standard uncertainty, and citation history of G.
  5. [5]Will, C. M. (2014). The confrontation between general relativity and experiment. Living Reviews in Relativity, 17, 4. Peer-reviewed comprehensive review of high-precision tests of the inverse-square law, the equivalence principle, post-Newtonian parameters, and the regimes in which Newtonian gravity is and is not adequate; gold-standard reference for where Newton's law breaks down.
  6. [6]Adelberger, E. G., Heckel, B. R. & Nelson, A. E. (2003). Tests of the gravitational inverse-square law. Annual Review of Nuclear and Particle Science, 53, 77–121. Peer-reviewed review of laboratory tests confirming the r⁻² exponent of Newton's law down to sub-millimetre separations, and the constraints these place on extra dimensions and modifications of gravity.
  7. [7]Halliday, D., Resnick, R. & Walker, J. (2014). Fundamentals of Physics, 10th ed., Wiley. Chapter 13 'Gravitation' — pedagogical derivation of Newton's law, the shell theorem, gravitational potential energy, and Kepler's three laws as consequences of inverse-square gravity.
  8. [8]Feynman, R. P., Leighton, R. B. & Sands, M. (1964). The Feynman Lectures on Physics, Volume I, Chapter 7 'The Theory of Gravitation'. Feynman's exposition of Newton's law, the inverse-square argument, Cavendish's experiment, and the connection to general relativity — freely available online courtesy of Caltech.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon