ForHosting KIT · Engineering & construction

Gravitational potential calculator

At 6,371,000 m from the centre of a 5.972 × 10²⁴ kg mass, the size of the Earth, the gravitational potential is −62,563,050.6985 J/kg. Enter any mass and its distance from the centre to get the potential per kilogram. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Mass
5,972,000,000,000,000,000,000,000
Distance
6,371,000
You get
G
0.0000000001 J/kg
Potential
-62,563,050.6985

Gravitational potential is the scalar field that gives the work per unit mass required to bring a test particle from infinity to a chosen distance under Newton’s inverse-square gravity. Students, homework platforms, and orbital notebooks need Phi equals minus G times M over r without hand-calculating scientific notation or confusing potential with potential energy or field strength. This gravitational potential calculator accepts mass in kilograms and distance in metres, multiplies by the fixed CODATA 2018 gravitational constant, divides by r, applies the conventional minus sign, and returns potential in joules per kilogram with the formula and constant echoed for audit. Zero distance is rejected as invalid input because the potential diverges at the singularity of a point mass.

What gravitational potential means and how Φ = −GM/r is applied

In classical mechanics the gravitational potential of an isolated mass M is a scalar field equal to minus G times M divided by the radial distance r from the centre at every exterior point. The potential energy of a test mass m at that location is simply U equals m times Phi, and the gravitational field strength (acceleration) is the negative gradient of Phi, which recovers g equals G M over r squared for a spherical source.

Textbooks introduce the same formula for planetary surface potential when r equals the body radius, and for orbital energy bookkeeping when r is larger than the body. Mass may be zero, which correctly yields zero potential; negative mass is rejected because the model is restricted to ordinary Newtonian sources. Distance must be strictly positive: at r equals zero the expression diverges and physics courses label the point-mass singularity as undefined, not as a huge finite number.

Potential is reported in joules per kilogram, which is dimensionally identical to metres squared per second squared, matching standard SI homework units.

Where the gravitational potential comes in handy

Introductory physics courses ask for potential at a height above a planet or at a distance from a star; tutors need an oracle that fails closed on r equals zero instead of returning Infinity that a buggy grader might accept. Engineering notebooks estimating specific potential energy for orbital budgets, satellite-link calculators comparing well depth at orbital radius, and science content sites ranking for gravitational potential calculator all benefit from a live tool whose free path matches the paid automation path byte-for-byte. Failed validation does not consume balance.

Keep requests small, pin cleaned potential values in tests, and you get reproducible scalars for homework, exams, and edge workers without standing up a symbolic algebra stack of your own. Distinguish this page from gravitational potential energy calculators that return m g h near Earth’s surface, and from field-strength tools that return acceleration: searchers who want Phi in joules per kilogram land here for a reason, and the SEO title and examples stay aligned with that intent.

Classroom and homework checks

Let students enter mass M and distance r and verify Φ = −G·M/r against textbook methods, including Earth-scale and lab-scale numbers.

Orbital energy bookkeeping

Compute specific gravitational potential at centre-to-craft distances for rough orbital energy estimates without a full ephemeris package.

How do I calculate gravitational potential Φ = −GM/r?

Send finite numbers mass (kg, ≥ 0) and distance (m, > 0).

What happens if the distance is zero?

Gravitational potential divides by r, so zero separation is undefined and is not billed.

Is this the same as gravitational potential energy?

No. Potential Φ is energy per unit mass (J/kg). Potential energy is U = m·Φ in joules. Multiply the returned potential by your test mass if you need energy.

Should I enter the altitude or the distance from the centre?

Enter the distance from the centre of the mass, not the height above its surface. For a satellite, add the planet's radius to its altitude first; the altitude alone gives a potential that is far too negative.

How do I turn the potential into energy for a specific object?

Multiply the potential by the object's mass in kilograms. Potential is energy per kilogram, so a body placed at that point has a potential energy in joules equal to its mass times the result.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/mech/gravitational-potential

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/mech/gravitational-potential \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mass":5.972e+24,"distance":6371000}'
{
  "mass": 5.972e+24,
  "distance": 6371000
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "mech.gravitational_potential",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What gravitational potential means and how Φ = −GM/r is applied

This calculator treats the general exterior case: you supply any positive distance, not only a surface radius, so the same endpoint covers Earth-surface estimates, low Earth orbit altitudes measured from Earth’s centre, binary-star separations treated as point masses, and classroom problems with arbitrary M and r.

Input contract, response shape, and error behaviour

Example: mass five point nine seven two times ten to the twenty-four kilograms and distance six point three seven one times ten to the six metres (Earth-scale mean radius) yields potential about minus six point two five times ten to the seven joules per kilogram, matching the order of magnitude of textbook surface potential without claiming a full geoid model. POST a JSON body with two required finite numbers: mass (or aliases m, M) as the source mass in kilograms, non-negative; and distance (or aliases r, R) as the centre-to-point separation in metres, strictly greater than zero. Values may arrive as JSON numbers or as numeric strings; missing fields, empty strings, NaN, and Infinity fail with invalid_input naming the field. On success the body echoes mass and distance after stable twelve-significant-digit cleaning, returns G, potential in J/kg, a unit string, a method tag gravitational_potential, and the short formula Phi equals minus G·M/r. Pair the response with your own multiplication by test mass if you need energy in joules, or with a field-strength calculator if you need acceleration; this endpoint stays pure SI scalar potential so goldens and SDKs stay deterministic. The free browser path and the API path share the same solve module, so a homework check and a batch answer key never disagree on cleaned digits.

Exam and LMS auto-grading

Mark gravitational potential items with a deterministic oracle that rejects zero distance as invalid_input and never returns Infinity.

Which value of G is used?

CODATA 2018: G = 6.67430×10⁻¹¹ m³ kg⁻¹ s⁻². The response echoes G so you can audit the constant used for the result.

What does the gravitational potential calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →