Orbital radius from period in days calculator
Turn an orbital period in days into the orbit's size in astronomical units: 365.25 days around one solar mass gives exactly 1 AU. Handy for estimating how far an exoplanet sits from its star. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Period days
- 365.25
- Mass solar
- 1
- Period years
- 1
- Semi major axis au
- 1
- Approximation
- two_body_central_mass
This orbital radius calculator converts an orbital period measured in days into a semi-major axis measured in astronomical units. Supply the central body's mass in solar masses, and the calculator applies the solar-unit form of Kepler's third law after converting days to Julian years. It is useful for estimating exoplanet distances, checking astronomy exercises, and producing repeatable values in data pipelines. The result describes a Keplerian two-body orbit whose smaller body's mass is negligible. It is an orbital semi-major axis, not necessarily the body's instantaneous distance from its star.
How period and stellar mass determine orbital size
Kepler's third law connects an orbit's period to its semi-major axis. In the convenient system used here, distance is measured in astronomical units, time in Julian years, and central mass in solar masses. With the orbiting object's mass treated as negligible, the relation becomes a cubed equals M times P squared.
Rearranging it gives a equals the cube root of M times P squared. An Earth-like period of 365.25 days around a one-solar-mass star therefore returns one AU. The same equation works for elliptical bound orbits because the relevant distance is the semi-major axis, not the instantaneous separation at a particular point.
This is a deterministic closed-form estimate: it makes no network calls, reads no clock, and uses no random values. Identical inputs therefore produce identical output, which makes the result suitable for lessons, automated tests, catalogue enrichment, and quick checks before a more detailed orbital simulation.
Entering values and interpreting the response
Decimal values and numeric strings are accepted, but blank, non-numeric, infinite, zero, and negative values are rejected. Remember that an astronomical unit is a distance scale, while a solar mass is a mass scale; do not enter kilometres, kilograms, Earth masses, or seconds without converting them first. A planet's reported orbital period should normally be its sidereal period rather than a synodic period observed relative to Earth.
The returned semi-major axis describes the size of the orbit measured from the system's focus. For an eccentric orbit, the actual star-to-object distance changes continuously, so this value should not be presented as a fixed radius.
Assumptions, accuracy, and practical applications
The compact solar-unit equation assumes Newtonian two-body motion and that the orbiting body contributes negligibly to the system's total mass. That is an excellent approximation for a planet around a typical star, an asteroid around the Sun, or other systems with a strong mass hierarchy.
For a binary star, a star with a massive companion, or a planet whose mass matters at the precision you need, the total mass of both bodies belongs in the full form of Kepler's law; this calculator intentionally asks only for central mass and does not pretend to solve that different case. It also does not account for gravitational perturbations from additional bodies, relativistic effects, mass loss, drag, or active thrust.
Observational astronomers can use it to turn a detected transit period and estimated stellar mass into a first-pass orbital scale. Teachers can build answer keys without repeatedly handling SI constants. Developers can enrich exoplanet records with consistently rounded AU values, and science writers can compare short-period worlds with Earth's orbit.
What you can do with it
Estimate an exoplanet orbit
Convert a transit period in days and an estimated stellar mass in Suns into a first-pass semi-major axis in AU.
Check astronomy coursework
Verify rearranged Kepler-law exercises with a deterministic result and an explicit conversion from days to Julian years.
Enrich orbital catalogues
Add consistently computed semi-major axes to records that contain period and host-star mass but no orbital distance.
FAQ
What equation does the calculator use?
It uses a = cbrt(M × P²), where a is in AU, M is in solar masses, and P is the period in Julian years. Input days are divided by 365.25.
Why does 365.25 days around one solar mass equal one AU?
Those normalized units define the familiar solar-system form of Kepler's third law: one Julian year and one solar mass produce a semi-major axis of one astronomical unit.
Is semi-major axis the same as current orbital distance?
Only for a circular orbit. In an eccentric orbit, distance changes, while semi-major axis remains the fixed size parameter used by Kepler's third law.
Can I estimate an exoplanet's distance from its star?
Yes. Enter the planet's orbital period in days and the star's mass in solar masses. The result is the semi-major axis in astronomical units, assuming the planet's own mass is negligible.
Does a heavier star change the orbit size for the same period?
Yes. The semi-major axis is the cube root of the mass times the period in years squared, so for the same period a heavier star holds the planet on a larger orbit.
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/orbital-radius-from-period-days \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"period_days":365.25,"mass_solar":1}'const res = await fetch("https://api.kit.forhosting.com/astro/orbital-radius-from-period-days", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"period_days": 365.25,
"mass_solar": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/orbital-radius-from-period-days",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"period_days": 365.25,
"mass_solar": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/orbital-radius-from-period-days", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"period_days":365.25,"mass_solar":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"period_days":365.25,"mass_solar":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/orbital-radius-from-period-days", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"period_days": 365.25,
"mass_solar": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.orbital_radius_from_period_days",
"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
How period and stellar mass determine orbital size
The calculator first divides period_days by 365.25 to obtain P in Julian years, multiplies the square of that value by mass_solar, and takes the real cube root.
Entering values and interpreting the response
Provide period_days as a finite positive number and mass_solar as the finite positive mass of the central object expressed in Suns. The response echoes the normalized period in days, provides the converted period_years value, echoes the mass, and reports semi_major_axis_au as the main result. It also includes the exact symbolic formula used and labels the approximation as two_body_central_mass. Successful API items cost $0.002; the browser version uses the same pure solver for convenient interactive checks.
Assumptions, accuracy, and practical applications
Treat uncertainties honestly: an uncertain stellar mass or period produces an uncertain semi-major axis, even though this endpoint returns one numerical estimate rather than a confidence interval.
Technical questions
What happens when mass is zero or negative?
The request returns invalid_input because a non-positive central mass is not physical for this model and cannot define the requested bound orbit.
How much does an API calculation cost?
A successful API item costs $0.002. You can also run the same deterministic solver in the browser for free.