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
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.
- Choose which quantity you want to compute from the 'Solve for' menu — force, mass 1, mass 2, or distance.
- 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⁸).
- 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.
- When solving for force, only m₁, m₂, and r are needed; the force input is ignored.
- 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.
- 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.
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.
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).
Frequently asked questions.
What is the formula for gravitational force?
What is the value of the gravitational constant G?
How did Cavendish measure G in 1798?
Why is gravity an inverse-square law and not inverse-cube or inverse-linear?
What is the difference between big G and little g?
What is the gravitational force between two people standing one metre apart?
What is the Earth-Moon gravitational force?
Where does Newton's law of gravity break down?
How is gravitational force related to weight?
Does the gravitational constant G change over time?
References& sources.
- [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]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]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]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]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]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]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]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