Calculate gravitational force, distance between centers, or either mass from any 3 values using the law of gravitation with selectable units.

Gravitational Force Calculator

Enter any 3 values to calculate the missing variable

Gravitational Force Formula

The calculator uses Newton’s law of universal gravitation. It can solve for gravitational force, either mass, or the distance between the centers of the two masses.

F = G*m1*m2 / r²

Rearranged formulas used when a different value is missing:

m1 = F*r² / (G*m2)
m2 = F*r² / (G*m1)
r = sqrt(G*m1*m2 / F)
  • F = gravitational force between the two masses
  • G = gravitational constant, 6.67430 × 10-11 N·m²/kg²
  • m1 = mass of object 1
  • m2 = mass of object 2
  • r = distance between the centers of the two objects

For force, the calculator multiplies the two masses and the gravitational constant, then divides by the square of the center-to-center distance.

For either mass, it rearranges the same formula so the missing mass is isolated.

For distance, it solves for the separation between centers by taking the square root of the gravitational term divided by force.

All inputs are converted to base SI units before calculation: kilograms for mass, meters for distance, and newtons for force. The result is then converted back to the unit you selected.

Common Units and Base Conversions

These are the unit conversions used before applying the gravitational force formula.

Quantity Unit Base conversion
Mass 1 g 0.001 kg
Mass 1 lb 0.45359237 kg
Mass 1 metric tonne 1000 kg
Distance 1 cm 0.01 m
Distance 1 km 1000 m
Force 1 kN 1000 N
Force 1 lbf 4.448221615 N

Example Calculations

Example 1: Find gravitational force

Suppose two objects have masses of 10 kg and 20 kg, and their centers are 2 m apart.

F = G*m1*m2 / r²
F = (6.67430*10⁻11*10*20) / 2²
F = 3.33715*10⁻9 N

The gravitational force is about 3.3372 × 10-9 N.

Example 2: Find distance

Suppose the masses are 1000 kg and 500 kg, and the gravitational force is 1.0 × 10-6 N.

r = sqrt(G*m1*m2 / F)
r = sqrt((6.67430*10⁻11*1000*500) / (1.0*10⁻6))
r = 5.7872 m

The distance between the centers is about 5.7872 m.

FAQ

Why is the distance measured between centers?

Newton’s law of universal gravitation uses the distance between the centers of mass of the two objects. For simple spherical objects, this is the distance from the center of one sphere to the center of the other. Using surface-to-surface distance will give an incorrect result unless you add the radii to get center-to-center distance.

Why are gravitational force results often very small?

The gravitational constant is very small: 6.67430 × 10-11 N·m²/kg². For everyday objects, this makes the gravitational attraction tiny. Large forces usually require very large masses, very small distances, or both.

Can the distance or mass be zero?

No. A zero distance would require division by zero in the force formula, and a zero mass means there is no gravitational attraction from that object. The calculator requires nonzero values for the known masses, distance, and force when solving the missing variable.