Every mass attracts every other mass with a force F = G·m1·m2 / r2. Drag the two mass sliders and the separation slider below, and watch the force arrows and the plotted curve respond — the pull falls away as the square of the distance, not in step with it.

Two Masses, One Inverse-Square Pull

Set the two masses, then walk them apart. The gold arrows are the pull each mass feels — equal in size, opposite in direction, no matter how lopsided the masses are. The curve underneath is the real F = G·m1·m2 / r2: its guide lines each sit a quarter of the way down from the one above — 64%, then 16%, then 4% of full scale — so every time you double the separation the marker lands on the next line down.

Gravitational force  F = G·m1·m2 / r2
2.670e-6 N
Each mass pulls on the other with this force. The two pulls are equal in size and opposite in direction.
Field strength of m1 at m2  g = G·m1 / r2
2.670e-9 N/kg
Multiply by m2 to get the force back.
Force relative to r = 10 m
4.00×
Same masses, ten metres apart, would feel a quarter of this.
Separation
5.0 m
Mass m11,000 kg
Mass m21,000 kg
Mass m11 t
Mass m21 t
Separation r5.0 m
Gravitational constant G = 6.674e-11 N·m2/kg2. Sliders are in tonnes; the formula uses kilograms, so 1 t feeds in as 1,000 kg. Separation is measured centre to centre.
Arrow length is proportional to the force, on a scale pinned to these masses at r = 10 m — that is the short tick on each arrow track. Changing a mass rescales the whole picture rather than the arrow, which is why the plot's top-of-axis value moves instead. Below about 2.5 m the arrow runs off the canvas and above about 18 m it bottoms out at its minimum drawn length; the canvas says so when it happens, and the numbers above stay exact either way.

Reading the Two Halves of This Simulator

Three sliders drive everything on the canvas. The two mass sliders run from 1 to 500 tonnes and feed the formula in kilograms, so the default pair of one-tonne spheres is the familiar 1,000 kg case; the drawn spheres grow with the cube root of mass, because that is how a real ball's radius relates to how much it weighs. The separation slider runs from 0.5 m to 50 m and walks the marker along the curve in the lower half of the canvas. Nothing on the page moves on its own, so you can park a slider and study one variable at a time.

Pull the spheres apart and watch the gold arrows: they shorten far faster than the gap widens. That mismatch is the entire lesson. The gap grows in proportion to r, while the pull falls away as one over r squared. Move from 5 m to 10 m and the spheres finish twice as far apart, but each arrow finishes a quarter of the length it started with. The short tick on each arrow track marks the pull at 10 m, so you can measure that change against a fixed reference instead of trusting your eye.

Every figure in the panel comes from F = G·m1·m2 / r2 with G = 6.674e-11 N·m2/kg2. The panel also reports the field strength the first mass sets up where the second one sits, g = G·m1 / r2 in newtons per kilogram — multiply that by the second mass and the force comes straight back out. If you would rather type your own figures than drag a slider, the gravitational force calculator solves the same equation for the force, for either mass, or for the separation.

The misconception this lab exists to correct is the assumption that doubling the distance halves the force. It does not. It quarters it, and tripling the distance leaves a ninth. The guide lines across the plot sit at 64%, 16% and 4% of full scale for exactly that reason: press Double the distance and the marker steps from one line to the next, every single time. The same square law governs the electric force between charges, which is why Coulomb's law reads as the identical equation with a different constant, and it is what becomes an orbit once a body is also moving sideways fast enough, as centripetal force explains. For the derivation, the worked problems and the history behind it, read Newton's law of gravitation.

Frequently asked questions

Why does the force quarter when I double the distance?

Because the separation appears squared in the denominator of F = G m1 m2 / r squared. Doubling r makes that denominator four times larger, so the force falls to a quarter of what it was. Tripling r makes it nine times larger and leaves a ninth. The guide lines across the plot sit at exactly those levels, which is why the marker lands on the next line down every time you press Double the distance.

What units does the simulator use for mass?

The two mass sliders are marked in tonnes, from 1 to 500, because whole tonnes are easier to drag than five-digit kilogram values. The formula itself works in kilograms, so each tonne is fed in as 1,000 kg. The panel shows you both at once: the slider reads 1 t while the mass readout underneath it reads 1,000 kg.

Why is the force so small for realistic masses?

Because G is tiny. Two 1,000 kg masses five metres apart attract each other with about 2.67e-6 N, which is a few millionths of a newton, far less than the weight of a grain of sand. Gravity only becomes obvious when one of the two masses is planet-sized, which is why you feel the Earth pulling on you but never notice the building next door.

Does this simulator model orbits?

No. It shows the force law on its own: two masses at a fixed separation, the pull each one feels, and how that pull changes as you move them apart. Orbital motion needs the centripetal condition as well, where the gravitational pull happens to supply exactly the force required to keep a body turning at its orbital speed.

What value of G does it use?

G = 6.674e-11 N m squared per kg squared, the CODATA value rounded to four significant figures. It is fixed rather than adjustable, because G is a constant of nature and not a property of the masses you happen to choose.

References & formula source

  • Halliday, Resnick & Walker — Fundamentals of Physics, Chapter 13 (Gravitation), Newton's law of gravitation and the inverse-square dependence.
  • Young & Freedman — University Physics with Modern Physics, §13.1 (Newton's Law of Gravitation).
  • CODATA 2018 recommended value of the Newtonian constant of gravitation, G = 6.674 30 x 10^-11 m^3 kg^-1 s^-2.
  • Further reading: Newton's law of universal gravitation — Wikipedia