Sphere of influence calculator
Find how far a moon or planet's own gravity dominates: the Moon, 384400 km from Earth, has a sphere of influence of 66170.0117012 km under the classic patched-conic formula. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Orbital distance
- 384,400
- Secondary mass
- 73,420,000,000,000,000,000,000
- Primary mass
- 5,972,000,000,000,000,000,000,000
- Mass ratio
- 0.0122940388
- Mass ratio two fifths
- 0.1721384279
- Sphere of influence
- 66,170.0117012
- Soi over a
- 0.1721384279
The sphere of influence (SOI) is the classical patched-conic boundary around a secondary body—planet, moon, or other mass—inside which that body’s gravity is treated as dominant for trajectory design, and outside which the primary’s gravity takes over. Mission planners, orbital mechanics students, and contest authors need a transparent closed-form radius from orbital distance and the two-fifths power of the secondary-to-primary mass ratio, not a black-box n-body dump. This calculator accepts orbital distance a, secondary mass m, and primary mass M, returns r_SOI equals a times (m over M) to the power two-fifths, and exposes the mass ratio and dimensionless r_SOI over a for audit.
What the patched-conic sphere of influence means
In the patched-conic approximation used throughout interplanetary trajectory design, a spacecraft’s path is stitched from successive two-body conics: heliocentric Keplerian arcs between planets, then planet-centred hyperbolas inside each planet’s sphere of influence. The sphere of influence radius marks where the gravitational perturbation of the secondary relative to the primary is of order unity under a simple Laplace-style scaling. The textbook closed form is r_SOI equals a times the secondary-to-primary mass ratio raised to the two-fifths power: r_SOI = a · (m / M)^(2/5).
Here a is the orbital distance of the secondary about the primary—usually the semi-major axis of the planet about the Sun or of a moon about its planet—m is the secondary mass, and M is the primary mass. The exponent two-fifths is fixed by balancing the primary’s tidal differential against the secondary’s inverse-square pull in the classical derivation; it is not an arbitrary fitting constant.
When m is much smaller than M the mass ratio is much less than one, so (m/M)^(2/5) is still small but larger than m/M itself, and r_SOI sits well inside the secondary’s orbit. Equal masses would push the formal SOI out toward a, which is rarely physical for the patched-conic use case but remains mathematically defined. This page implements only that closed-form SOI: it does not integrate the circular restricted three-body problem, does not compute Hill spheres with different exponents, and does not replace full ephemeris-based gravity models.
Those are separate search intents and separate landings. Use this tool when you need the standard patched-conic SOI number that textbooks, contest keys, and preliminary mission trades still cite by name.
What to enter and how to read the result
Orbital_distance is the semi-major axis or centre-to-centre orbital distance of the secondary about the primary in kilometres, metres, or any single consistent length unit; it must be strictly positive so the length scale of the sphere is well defined. Secondary_mass is the mass of the planet, moon, or other secondary in kilograms or any consistent mass unit and must be strictly positive.
Classic checks include Earth–Moon with a about three hundred eighty-four thousand four hundred kilometres and m/M about one point two three percent, recovering an SOI of order sixty-six thousand kilometres; and a toy equal-mass case with a equals one recovering r_SOI equals one. Wire the free browser form for homework and quick sanity checks, then call the identical contract from scripts when you need bulk answer keys or trajectory scaffolding.
Keep units consistent: convert both masses to the same unit and keep length in one unit before calling so the numeric product matches the interpretation your report claims.
Where sphere-of-influence calculators show up in real work
Introductory orbital-mechanics and spacecraft-design courses assign patched-conic drills that ask for the SOI of Earth about the Sun, of the Moon about Earth, or of Jupiter about the Sun so students can decide where to switch frames in a multi-leg tour. Preliminary mission design teams need a fast SOI radius when sketching transfer legs, flybys, and capture corridors before full n-body optimization. Contest authors and LMS plugins need a deterministic oracle that rejects non-positive primary mass instead of silently returning Infinity or NaN from a bare division.
Science communicators convert mass tables into SOI radii in kilometres so audiences can see that Earth’s SOI around the Sun is still a tiny fraction of one astronomical unit. Game and simulation authors seed gravity-well toy models with closed-form SOI spheres when they want a transparent ground truth without floating-point surprises from ad-hoc constants.
If you later need Roche tidal breakup distances, Newtonian force between two masses, orbital period from semi-major axis, or Hill-sphere variants with different exponents, treat those as separate search intents and landings rather than overloading this sphere of influence calculator page.
What you can do with it
Homework and exam answer keys
Compute patched-conic SOI radii from a, m, and M so students and auto-graders share one closed-form ground truth with audit intermediates.
Preliminary mission design trades
Estimate where to switch from heliocentric to planet-centred conics when sketching interplanetary legs and flybys before full n-body tools.
Curriculum widgets and demos
Turn tabulated planetary masses and orbital distances into SOI radii for lectures, planetarium exhibits, and interactive browser demos.
FAQ
What happens if primary mass is zero or negative?
The patched-conic formula divides by primary mass M, so non-positive M is undefined or non-physical and is not billed.
Is this the same as the Hill sphere?
No. This page implements the classical patched-conic SOI with exponent two-fifths. Hill-sphere radii use a different scaling (typically one-third power of the mass ratio) and are a separate search intent.
Which units should I use for masses and distance?
The SOI radius is returned in that same length unit.
What is the Moon's sphere of influence?
Using the Moon's and Earth's masses and their 384400 km separation, the radius comes out at 66170.0117012 km, a little over a sixth of the distance. Inside it, trajectory sketches treat the Moon's gravity as the one in charge.
Why is the exponent two-fifths?
It comes from balancing the central body's tidal pull against the smaller body's own inverse-square gravity in the classical derivation. It is fixed by that physics rather than fitted to data, which is why textbooks quote the same formula.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/astro/sphere-of-influence \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"orbital_distance":384400,"secondary_mass":7.342e+22,"primary_mass":5.972e+24}'const res = await fetch("https://api.kit.forhosting.com/astro/sphere-of-influence", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"orbital_distance": 384400,
"secondary_mass": 7.342e+22,
"primary_mass": 5.972e+24
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/sphere-of-influence",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"orbital_distance": 384400,
"secondary_mass": 7.342e+22,
"primary_mass": 5.972e+24
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/sphere-of-influence", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"orbital_distance":384400,"secondary_mass":7.342e+22,"primary_mass":5.972e+24}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"orbital_distance":384400,"secondary_mass":7.342e+22,"primary_mass":5.972e+24}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/sphere-of-influence", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"orbital_distance": 384400,
"secondary_mass": 7.342e+22,
"primary_mass": 5.972e+24
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.sphere_of_influence",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Non-positive primary mass fails with invalid_input because the formula divides by M; non-positive secondary mass and orbital distance are likewise rejected.
Input contract, response shape, and validation errors
POST a JSON body with three required finite numbers: orbital_distance (a), secondary_mass (m), and primary_mass (M). Primary_mass is the mass of the central body in the same mass unit as secondary_mass and must be strictly greater than zero: non-positive primary mass is rejected with invalid_input because the mass ratio m/M would be undefined or non-physical. Missing fields, empty strings, NaN, Infinity, and non-numeric types also fail with invalid_input and are not billed. On success the response echoes cleaned orbital_distance, secondary_mass, and primary_mass; exposes mass_ratio as m/M and mass_ratio_two_fifths as (m/M)^(2/5); returns sphere_of_influence as a times that factor in the same length unit as orbital_distance; returns soi_over_a as the dimensionless ratio r_SOI/a (identical to the two-fifths power of the mass ratio); and includes a units hint object, method patched_conic_sphere_of_influence, and the formula string. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where sphere-of-influence calculators show up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Technical questions
How do I calculate the sphere of influence radius?
Send finite positive orbital_distance a, secondary_mass m, and primary_mass M. The API returns r_SOI = a · (m/M)^(2/5) in the same length unit as a, plus the mass ratio and dimensionless r_SOI/a.
What does the sphere of influence calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.