HomePhysics › Gravitational Force Calculator

Gravitational Force Calculator

Computes the attractive gravitational force between two point or spherically symmetric masses at a given centre-to-centre distance with Newton's law and the CODATA 2018 value of G, plus the acceleration each mass experiences.

When to use

You need the gravitational pull between two bodies (planet and satellite, star and planet, two laboratory masses) or the surface gravity of a body from its mass and radius.

Do not use when: You only need weight near Earth's surface (use force with 9.80665 m/s²), or relativistic effects matter (near black holes, precision orbits).

Formula

force_n = G × mass1_kg × mass2_kg / distance_m² with G = 6.67430e-11 m³ kg⁻¹ s⁻²; acceleration_of_mass2 = force_n / mass2_kg; acceleration_of_mass1 = force_n / mass1_kg

Point masses or uniform spheres (shell theorem); inside a body or for irregular shapes the inverse-square law does not apply directly.

Inputs

ParameterTypeUnitRequiredDescription
mass1_kgnumberkgyesFirst mass in kilograms (Earth = 5.972e24, Sun = 1.989e30). Range: > 0
mass2_kgnumberkgyesSecond mass in kilograms (Moon = 7.342e22). Range: > 0
distance_mnumbermyesCentre-to-centre separation in metres (Earth's mean radius = 6.371e6, Earth–Moon = 3.844e8). Range: > 0

Outputs

OutputTypeUnitDescription
force_nnumberNF = G × m1 × m2 / r², attractive along the line joining the centres (rounded to 1e-15 N).
force_micronewtonnumberµNSame force in micronewtons, convenient for laboratory-scale masses.
acceleration_of_mass2_m_s2numberm/s²F / m2 = G × m1 / r²: the gravitational field of mass 1 at that distance (surface gravity when r is the radius).
acceleration_of_mass1_m_s2numberm/s²F / m1 = G × m2 / r² (rounded to 1e-15 m/s²; negligible for planet-sized mass 1).

Example

Earth and 1 kg at Earth's mean radius: {"mass1_kg":5.972e+24,"mass2_kg":1,"distance_m":6371000}{"force_n":9.82,"force_micronewton":9819973,"acceleration_of_mass2_m_s2":9.82}

Two 1000 kg masses 1 m apart: {"mass1_kg":1000,"mass2_kg":1000,"distance_m":1}{"force_n":0.000066743,"force_micronewton":66.743,"acceleration_of_mass1_m_s2":6.6743e-8}

GET https://tttkmbb.com/api/v1/calculate/gravitational-force?mass1_kg=5.972e%2B24&mass2_kg=1&distance_m=6371000

Machine access

Sources

FAQ

Why is the result 9.82 and not 9.81 m/s² for Earth?

The mean radius and mass give the field of a non-rotating uniform sphere; the measured surface value (about 9.80 average) is lowered by Earth's rotation and flattening.

Which distance do I use for planets?

The distance between the centres of mass, not between the surfaces: for surface gravity use the planet's radius.

Related calculators