Blucalculator Open Tool

Gravitational Force Calculator

Calculate the gravitational attraction between two masses using F = Gm₁m₂/r². Includes planetary presets for Earth-Moon, Earth-Sun, and more. Outputs gravitational field strength and acceleration.

e.g. Earth = 5.972e24, Sun = 1.989e30, Moon = 7.342e22

e.g. Earth-Moon = 3.844e8 m, Earth-Sun = 1.496e11 m, Earth radius = 6.371e6 m

Embed This Calculator

Copy the code and paste it into any webpage to embed this calculator.

WordPress users: add a Custom HTML block (not the Embed block) and paste the code there.

More embed options

Free to use. A small "Powered by Blucalculator" credit is appreciated but not required.

How to use this calculator

Enter the two masses and the distance between their centres. All values should be in SI units: kilograms (kg) for mass and metres (m) for distance.

Planetary Preset: Select from preset pairs to auto-fill the inputs. Options include Earth-Moon, Earth-Sun, Earth and a 70 kg person at the surface, and Jupiter-Sun. After selecting a preset you can modify any value.

Mass 1 (kg): The first mass. For planetary calculations, this is typically the larger body. The text box accepts scientific notation: type 5.972e24 for Earth’s mass.

Mass 2 (kg): The second mass. Can be any size, from a proton to a star.

Distance between Centers (m): The straight-line distance between the geometric centres of the two masses, not their surfaces. For Earth-person calculations at the surface, use Earth’s radius (6.371e6 m), not zero.

Results include gravitational force in newtons and kilonewtons, scientific notation, gravitational field strength of mass 1 at the specified distance, and the gravitational acceleration experienced by mass 2.

Example: gravitational force between Earth and Moon

Preset: Earth-Moon

m₁ = 5.972 × 10²⁴ kg (Earth), m₂ = 7.342 × 10²² kg (Moon), r = 3.844 × 10⁸ m

F = (6.674×10⁻¹¹ × 5.972×10²⁴ × 7.342×10²²) / (3.844×10⁸)²

F ≈ 1.982 × 10²⁰ N (about 198.2 exanewtons)

This is the force that keeps the Moon in orbit and drives the ocean tides.

Scientific notation is required for most astronomical masses. Use the format 1.5e30 for 1.5 × 10³⁰. The calculator accepts this format directly in the input fields. For familiar reference: Earth = 5.972e24 kg, Moon = 7.342e22 kg, Sun = 1.989e30 kg, Jupiter = 1.898e27 kg.


Newton’s law of universal gravitation: history and derivation

Isaac Newton published his law of universal gravitation in 1687 in his monumental work Philosophiae Naturalis Principia Mathematica, generally referred to as the Principia. It is one of the most important single publications in the history of science.

Newton did not arrive at the inverse-square law in a vacuum. Johannes Kepler had already established his three empirical laws of planetary motion between 1609 and 1619: planets orbit the Sun in ellipses, a line from Sun to planet sweeps equal areas in equal times, and the square of a planet’s orbital period is proportional to the cube of the semi-major axis of its orbit.

Newton’s crucial insight was that these three purely observational laws could all be derived from a single underlying force law. Working from the assumption that the Sun exerts a centripetal force on each planet and applying circular orbit approximations, he showed that Kepler’s third law requires the force to fall off as 1/r². By further assuming this same force law applied to falling objects near Earth, he could check whether the Moon was held in orbit by the same force that pulled apples from trees: it was.

The resulting law states:

F = G × m₁ × m₂ / r²

Every object with mass attracts every other object with mass. The force is proportional to the product of the masses and inversely proportional to the square of the distance between their centres. G is the universal gravitational constant: 6.674 × 10⁻¹¹ N·m²/kg².


The gravitational constant G and the Cavendish experiment

The gravitational constant G is one of the fundamental constants of physics, alongside the speed of light (c), Planck’s constant (h), and the elementary charge (e). Its value is:

G = 6.674 × 10⁻¹¹ N·m²/kg²

Newton’s law gave the form of gravity but could not predict the absolute magnitude of gravitational force without knowing G. Newton could not measure G directly because the gravitational force between any two objects small enough to work with in a laboratory is extraordinarily small.

Henry Cavendish solved this problem in 1798, over a century after the Principia. He suspended a lightweight horizontal rod (a torsion balance) by a thin wire from the ceiling. Small lead balls were attached to each end of the rod. He then brought large lead balls close to each small ball on alternate sides. The tiny gravitational attraction between large and small balls twisted the wire by a measurable angle. From the angle and the known torsional stiffness of the wire, Cavendish calculated the gravitational force, and from that and the known masses and distance, derived G.

The Cavendish experiment is still considered one of the most technically demanding measurements in physics. Modern versions use laser interferometry to detect the tiny torsion angle and achieve uncertainties of about 20 parts per million. G is one of the least precisely known fundamental constants, in part because gravity is so weak between laboratory-scale masses that systematic errors are difficult to eliminate.

Knowing G allowed Cavendish to calculate Earth’s mass for the first time (he described his experiment as “weighing the Earth”). Using the known gravitational field at Earth’s surface (g = 9.81 m/s²) and Earth’s radius (6.371 × 10⁶ m):

M_Earth = g × r² / G = 9.81 × (6.371×10⁶)² / 6.674×10⁻¹¹ ≈ 5.97 × 10²⁴ kg

The inverse-square law: geometric explanation

The inverse-square law is not arbitrary: it has a simple geometric explanation. Consider a gravitational field as consisting of field lines radiating outward from a mass. The number of field lines is fixed (proportional to the source mass). As you move away from the source, the same number of lines is spread over an increasingly large surface area.

A sphere of radius r has surface area 4πr². Double the radius and the area quadruples. The density of field lines (force per unit area) therefore falls as 1/r², and since a test mass intercepts a fixed fraction of lines based on its cross-section, the force on it falls as 1/r².

This geometric argument applies to any force (or field) that propagates isotropically (equally in all directions) from a point source in three-dimensional space. Electric fields from point charges follow the same inverse-square law (Coulomb’s law), as does the intensity of light or sound from a point source.

Practical consequence: Earth-Moon tides

The Moon exerts a gravitational force on Earth. The side of Earth closest to the Moon (at distance r) feels a stronger pull than the side facing away (at distance r + 2R_Earth). This difference in force across Earth’s diameter is the tidal force.

Tidal force ∝ 1/r² difference over diameter 2R, which works out to approximately 2GM×2R/r³. The tidal force falls off as 1/r³, faster than gravity itself. This is why the Sun, despite its far greater mass than the Moon, exerts smaller tides on Earth: its distance is so large that the variation across Earth’s diameter is proportionally less.


Gravitational field strength vs gravitational force

It is useful to distinguish between gravitational force and gravitational field.

Gravitational force is the specific force acting between two particular masses at a specific distance. It requires both masses to be specified.

Gravitational field strength g (or g) at a point in space is defined as the force per unit mass that would be experienced by a small test mass placed at that point:

g = G × M / r²

Where M is the mass creating the field. The gravitational field describes the influence of a mass on surrounding space without reference to any specific second mass. Once g is known at a point, the force on any mass m placed there is simply F = mg.

At Earth’s surface (r = R_Earth = 6.371 × 10⁶ m, M = 5.972 × 10²⁴ kg):

g = 6.674×10⁻¹¹ × 5.972×10²⁴ / (6.371×10⁶)² ≈ 9.82 m/s²

The standard value is 9.81 m/s², with slight variation due to Earth’s oblateness, local geology, and altitude.


Gravity on other planets

The surface gravitational field strength of a planet depends on its mass and radius. A larger mass increases g; a larger radius decreases it.

BodyMass (kg)Radius (km)g (m/s²)g / g_Earth
Mercury3.301×10²³2,4403.700.38
Venus4.869×10²⁴6,0528.870.90
Earth5.972×10²⁴6,3719.811.00
Moon7.342×10²²1,7371.620.17
Mars6.417×10²³3,3903.730.38
Jupiter1.898×10²⁷71,49224.792.53
Saturn5.683×10²⁶60,26810.441.06
Neptune1.024×10²⁶24,62211.151.14

Jupiter has a surprisingly strong surface gravity for a gas giant: despite its enormous radius, its mass is so large that g is 2.5 times Earth’s. On the Moon, weighing 80 kg means experiencing only about 130 N of gravitational force rather than the 785 N at Earth’s surface.


Orbital mechanics from Newton’s law

Planetary and satellite orbits follow directly from Newton’s law of gravitation. For a circular orbit, the gravitational force provides exactly the centripetal force needed to maintain circular motion:

G × M × m / r² = m × v² / r

The mass of the orbiting body (m) cancels, giving orbital speed:

v = √(G × M / r)

This is a remarkable result: orbital speed depends only on the central mass and orbital radius, not on the orbiting body’s mass. A 1 kg satellite and a 1000 kg satellite orbit at exactly the same speed at the same altitude.

For low Earth orbit at an altitude of about 400 km (r ≈ 6.771 × 10⁶ m):

v = √(6.674×10⁻¹¹ × 5.972×10²⁴ / 6.771×10⁶) ≈ 7,670 m/s (7.67 km/s)

This is how fast the International Space Station moves. It completes one orbit every 92 minutes.

Orbital period T follows from circumference / speed:

T = 2πr / v = 2π × √(r³ / (G × M))

Squaring both sides: T² ∝ r³, which is Kepler’s third law. Newton derived Kepler’s empirical discovery from first principles.


Escape velocity

Escape velocity is the minimum speed at which an object at distance r from a mass M can escape that mass’s gravitational influence without any further propulsion. It is derived by setting the object’s kinetic energy equal to the gravitational potential energy that must be overcome:

v_escape = √(2 × G × M / r)

Note that v_escape = √2 × v_orbital at the same radius.

BodyEscape velocity
Moon2.38 km/s
Mars5.03 km/s
Earth11.19 km/s
Jupiter59.5 km/s
Sun617.5 km/s

Earth’s escape velocity of 11.19 km/s is about 33 times the speed of sound. Achieving it requires enormous amounts of energy, which is why rocket fuel is such a significant fraction of spacecraft mass.

A black hole is defined by the fact that its escape velocity exceeds the speed of light. At and within the Schwarzschild radius r_s = 2GM/c², no signal or particle can escape. For Earth’s mass, the Schwarzschild radius would be about 9 mm: if all of Earth’s mass were compressed into a sphere 9 mm in radius, it would form a black hole.


Tidal forces

When a gravitational field varies across an extended body, different parts of the body experience different forces. This differential is a tidal force.

The near side of Earth faces the Moon and is pulled more strongly toward it. The far side faces away from the Moon and is pulled less strongly. Earth’s centre is pulled with intermediate force. The net effect from the reference frame of Earth’s centre is that near-side material is pulled toward the Moon and far-side material is effectively pushed away. This creates two tidal bulges of ocean (and solid Earth, which also deforms slightly), one facing the Moon and one on the opposite side.

Tidal force from body of mass M at distance r on a body of radius R:

F_tidal ∝ G × M × R / r³

The 1/r³ dependence means tides fall off faster than gravity. The Moon is less massive than the Sun but closer, so its tidal force on Earth is about 2.2 times greater than the Sun’s. When Sun, Earth, and Moon align (new and full Moon), the tides combine to give spring tides; when at right angles, they partially cancel for neap tides.

Tidal forces also cause orbital decay. Earth’s tidal bulge is slightly ahead of the Moon-Earth line due to Earth’s rotation. This asymmetry transfers angular momentum from Earth’s rotation to the Moon’s orbit, causing the Moon to slowly spiral outward (currently at about 3.8 cm per year) while Earth’s rotation gradually slows.


General relativity as a refinement

Newton’s law of gravitation is extraordinarily accurate for most practical purposes, but it has known limitations. Einstein’s general theory of relativity (1915) provided a more complete description.

In general relativity, gravity is not a force between masses but a curvature of four-dimensional spacetime caused by mass and energy. Objects follow the straightest possible paths (geodesics) through curved spacetime, which look like curved trajectories in ordinary three-dimensional space.

General relativity differs measurably from Newton in three key ways:

Orbital precession: The perihelion of Mercury’s orbit advances by 43 arcseconds per century more than Newton’s law predicts. General relativity accounts for this exactly.

Gravitational time dilation: Clocks in stronger gravitational fields run more slowly. GPS satellites must correct their onboard clocks by 45 microseconds per day (gravitational effect) minus 7 microseconds per day (kinematic time dilation from orbital speed), net 38 microseconds per day, or position errors would accumulate at about 10 km per day.

Gravitational waves: Accelerating masses radiate gravitational waves: ripples in spacetime. First directly detected in 2015 by LIGO from a binary black hole merger. These waves are predicted by general relativity but have no analogue in Newtonian gravity.

For most engineering and scientific work, including satellite orbit calculations, Newton’s law is adequate. Relativistic corrections are needed only for precise positioning (GPS), strong field environments (neutron stars, black holes), or very precise orbital mechanics over long time scales.

Frequently Asked Questions

What is Newton's law of universal gravitation?

Newton's law states every mass attracts every other mass with F = Gm₁m₂/r². Published in 1687, it explained both falling objects on Earth and planetary orbits simultaneously.

What is the gravitational constant G?

G = 6.674×10⁻¹¹ N·m²/kg², one of the fundamental constants of physics. Its small value explains why gravity between lab-scale objects is imperceptible. First measured by Henry Cavendish in 1798.

Why does gravity decrease with distance?

Gravity follows an inverse-square law: doubling distance reduces force to one-quarter. Gravitational field lines spread over a spherical area proportional to r², so force per unit area falls as 1/r².

How is gravity different from weight?

Gravity is the attractive force between masses. Weight is the gravitational force on a specific object: W = mg. Weight varies with location; mass does not.

Why does the Moon not fall to Earth?

The Moon is continuously falling toward Earth but has enough sideways velocity that it keeps missing. This orbital motion means gravity provides centripetal force rather than causing the Moon to descend.

How was G measured (Cavendish experiment)?

Cavendish in 1798 suspended a dumbbell on a thin wire and brought large lead spheres close to the small balls. The tiny gravitational attraction twisted the wire measurably, allowing calculation of G.

How does gravity affect time?

General relativity shows gravity curves spacetime, causing time to run more slowly in stronger fields. GPS satellites must correct for this relativistic time dilation or position errors would grow by kilometres per day.

What is the gravitational force between everyday objects?

Between two 1 kg masses 1 metre apart, F = 6.674×10⁻¹¹ N — less than one ten-billionth of a newton. Gravity between everyday objects is real but completely imperceptible without sensitive instruments.

What is escape velocity and how does gravity determine it?

Escape velocity is the minimum speed to leave a body's gravitational pull: v = √(2GM/r). For Earth: 11.2 km/s. For the Moon: 2.4 km/s. For a black hole: faster than light within the event horizon.

How do satellites stay in orbit?

A satellite orbits when its tangential velocity balances gravitational pull: v = √(GM/r). For low Earth orbit at 400 km, this is about 7.7 km/s, completing one orbit every 90 minutes.

Related Calculators