This page explains how to compute the gravitational force between two masses. It uses Newton's universal law of gravitation. The result is the attractive force in newtons (N).

Core formula

Newton's universal law of gravitation:

F = G × (m1 × m2) ÷ r²

Where:

  • F is the gravitational force in newtons (N)
  • G is the gravitational constant, 6.674×10⁻¹¹ N·m²/kg²
  • m1 and m2 are the two masses in kilograms (kg)
  • r is the distance between their centers in metres (m)

How to use

  1. Enter the two masses in kilograms.
  2. Enter the centre-to-centre distance in metres. Use the real separation, not surface distance if objects have size.
  3. Apply F = G × (m1 × m2) ÷ r².
  4. Round the result as needed. Use scientific notation for very large or small numbers.

Worked examples

Example 1 — small masses, nearby

m1 = 1 kg, m2 = 1 kg, r = 1 m.

F = 6.674×10⁻¹¹ × (1×1) ÷ 1² = 6.674×10⁻¹¹ N. Very small force.

Example 2 — Earth and a 1 kg mass at surface

Approximate: m1 = mass of Earth = 5.972×10²⁴ kg, m2 = 1 kg, r ≈ Earth's radius = 6.371×10⁶ m.

F ≈ 6.674×10⁻¹¹ × (5.972×10²⁴ × 1) ÷ (6.371×10⁶)² ≈ 9.81 N. This is weight on Earth.

Example 3 — two 1000 kg masses 2 m apart

m1 = 1000 kg, m2 = 1000 kg, r = 2 m.

F = 6.674×10⁻¹¹ × (1000×1000) ÷ 4 = 1.6685×10⁻⁵ N.

Vector note

Gravitational force acts along the line joining the centers and is attractive. For vector form: F₁₂ = −G × m1 × m2 / r² × r̂, where is the unit vector from mass 1 to mass 2. The sign shows attraction.

Special cases and warnings

  • Do not use r = 0. The formula is not valid at zero separation.
  • For extended bodies (planets, spheres), use centre-to-centre distance or integrate for complex shapes.
  • Use SI units for G as shown. Convert grams to kilograms and centimetres to metres first.
  • When one mass is much larger (like planet), you can use g = G × M / r² and then F = m × g for small mass m.

Practical tips

  • Use scientific notation for very large or very small results. It keeps values readable.
  • If you need weight on a planet, use the planet's mass and radius for r.
  • For multiple bodies, compute pairwise forces and add vectors to get net force on a body.

Common mistakes

  • Using surface-to-surface distance instead of centre-to-centre for large objects.
  • Mixing units (e.g., mm with kg). Always convert to metres and kilograms.
  • Assuming gravitational force is large for small masses. It is usually tiny unless masses are huge.

FAQ

What is the gravitational constant G?

G = 6.674×10⁻¹¹ N·m²/kg². It is a universal constant used with SI units.

Why is gravity so weak between small objects?

G is very small. Unless masses are very large or very close, the force is tiny compared with everyday forces like friction.

How do I get weight from gravitational force?

Weight is the gravitational force on a mass due to a planet. For small mass m near planet M: weight = m × (G×M ÷ r²).

Can I use this for non-spherical objects?

For irregular shapes, you must integrate the contributions from each mass element or use numerical methods. For uniform spheres, treat mass as concentrated at the centre if outside the sphere.

What if the masses move?

If masses move, compute force at each instant using current positions. For dynamics, include gravitational force in Newton's second law to update motion.

Does distance need to be centre-to-centre?

Yes. Use centre-to-centre distance for point masses or spheres. For extended distributions use the appropriate geometry.

Are units important?

Yes. Use kilograms for mass and metres for distance to match G's units. Convert other units before using the formula.

How do I add gravitational forces from several bodies?

Compute the vector force from each body and add them component-wise for the net force on your target mass.

Is gravitational force always attractive?

Yes. In classical gravity, it always attracts masses toward each other.

Can gravity be zero?

Net gravitational force can be zero at certain points when multiple bodies' pulls cancel, but individual pair forces are not zero.

What about relativistic effects?

For very strong gravity or high precision near massive bodies, use general relativity. Newton's law works well for most everyday and engineering cases.

How precise is G?

The value of G is measured experimentally and is known with limited precision compared with other constants. Use the standard value for most calculations.

Can I compute orbital forces with this?

Yes. Use the same law with centripetal force relations to derive orbital velocity and period for simple two-body problems.

What if r is very large?

The force falls off with 1/r². At large distances, gravitational pull becomes negligible for small masses.

How to check my units?

After calculation, check that units reduce to newtons: (N·m²/kg²) × (kg×kg) ÷ m² = N.