Orbital period in days calculator
Get an orbit's period in days straight from astronomical units and solar masses: 1 AU around one solar mass gives 365.25 days. No converting to metres or kilograms first, which suits homework and exoplanet checks. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Semi major axis au
- 1
- Mass solar
- 1
- A cubed
- 1
- Period days
- 365.25
- Period years
- 1
- Mean motion rad per day
- 0.0172024238
When you already know an orbit size in astronomical units and a central mass in solar masses, the natural answer is the period in days—not SI seconds that force unit conversions before any classroom or mission check. Kepler's third law in solar units states that the square of the orbital period in years equals the cube of the semi-major axis in AU divided by the central mass in solar masses, so the period in Julian days is three hundred sixty-five point two five times the square root of a cubed over M. Students check Earth-year and Mars-year homework without converting AU and solar masses into metres and kilograms; exoplanet demos need human-scale year lengths from catalogue a and M_star; grading scripts need a deterministic oracle that rejects non-positive mass instead of returning NaN.
How Kepler's third law yields period in days from AU and solar mass
Start from the Newtonian two-body problem with a central mass that dominates the orbiting body, so the reduced-mass correction is already folded into M or can be ignored. When length is measured in astronomical units and mass in solar masses, the gravitational constant and solar mass combine into a unit system where the orbital period in Julian years is simply the square root of a cubed over M.
Equivalently, T squared is proportional to a cubed with proportionality constant one over M when T is in years and a is in AU. Semi-major axis must likewise be finite and positive so a cubed stays positive and the square root is real. Classic checks include a equals one and M equals one recovering exactly three hundred sixty-five point two five days and one Julian year, and Mars-like a about one point five two four AU about one solar mass recovering a period near six hundred eighty-seven days.
This page intentionally uses the two-body solar-unit form only; SI Kepler periods in seconds from metres and kilograms, synodic periods between two orbits, and n-body ephemerides are separate search intents and separate landings.
Where an orbital period in days calculator earns its keep
Secondary-school and introductory university astronomy courses assign Kepler drills that already state a in AU and M in solar masses and ask for the year length in days; a single trusted oracle speeds grading and demo setup without forcing students through SI conversion tables. Exoplanet catalogue tutorials convert published semi-major axes and stellar masses into human-readable orbital periods for lesson slides and public exhibits. Amateur observers and club talks compare approximate periods of Mars, Jupiter, or fictional systems from textbook a values without re-deriving Gaussian constants each time.
Science communicators turn stellar masses and AU separations into day-scale periods that audiences can compare to the familiar three hundred sixty-five day Earth year. If you later need SI periods from metres and kilograms, central mass from a known period and semi-major axis, synodic periods between two planets, or full numerical propagators, treat those as separate search intents and landings rather than overloading this orbital period in days calculator page.
What you can do with it
Homework and exam answer keys in AU units
Compute Keplerian period in days from semi-major axis in AU and central mass in solar masses so students and auto-graders share one closed-form ground truth without SI conversions.
Exoplanet and stellar catalogue demos
Turn tabulated a (AU) and host-star mass (M☉) into human-readable orbital periods in days for slides, exhibits, and curriculum widgets.
Solar-system period sanity checks
Sanity-check Mars, asteroid, or fictional orbit periods from AU and solar-mass inputs before full ephemeris tools.
FAQ
What formula does this orbital period in days calculator use?
The two-body central-mass approximation assumes the satellite mass is negligible or already folded into M.
What happens if mass is zero or negative?
Non-positive central mass is non-physical under Kepler's third law and would make the period undefined or non-real.
What units should I use?
Semi-major axis in astronomical units (AU) and mass in solar masses (M☉).
Does it work for elliptical orbits?
Yes for the sidereal period of a Keplerian ellipse: the period depends only on semi-major axis a and central mass M, not on eccentricity. Eccentricity affects true-anomaly timing, not the orbital period itself under this model.
How many days does an orbit at 1 AU around a Sun-like star take?
365.25 days, one Julian year. In these units the period in years squared equals the orbit size in astronomical units cubed, divided by the central mass in solar masses.
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-period-days \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"semi_major_axis_au":1,"mass_solar":1}'const res = await fetch("https://api.kit.forhosting.com/astro/orbital-period-days", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"semi_major_axis_au": 1,
"mass_solar": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/orbital-period-days",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"semi_major_axis_au": 1,
"mass_solar": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/orbital-period-days", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"semi_major_axis_au":1,"mass_solar":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"semi_major_axis_au":1,"mass_solar":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/orbital-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
{
"semi_major_axis_au": 1,
"mass_solar": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.orbital_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
This orbital period in days calculator accepts semi_major_axis_au and mass_solar, returns period_days as the primary result with period_years and mean motion for audit, and fails with invalid_input when mass is zero or negative.
How Kepler's third law yields period in days from AU and solar mass
Multiplying by three hundred sixty-five point two five days per Julian year converts that result into period_days, the primary field this capability returns. The calculator evaluates that closed form with deterministic floating-point arithmetic: no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical inputs always produce identical JSON. Mass M must be a finite positive number of solar masses; zero and negative values fail with invalid_input because they are non-physical under Kepler's third law and would divide by zero or produce non-real periods.
What you send and what you get back
Semi-major axis is the orbital size parameter a in astronomical units and must be strictly greater than zero; Earth about the Sun is approximately one AU, and many solar-system bodies are tabulated directly in AU. Mass is the central body mass M in solar masses and must also be strictly greater than zero; use one for the Sun, or a stellar mass from a catalogue for exoplanet host stars. Send two required finite numbers under the fields semi_major_axis_au and mass_solar. Missing fields, non-numeric strings, NaN, Infinity, non-positive semi-major axis, and non-positive mass fail with invalid_input and are not charged. On success the response echoes cleaned semi_major_axis_au and mass_solar, exposes a_cubed as a to the third power, period_days as the primary result, period_years as the same period in Julian years of three hundred sixty-five point two five days, mean_motion_rad_per_day as two pi over period_days, days_per_year as the fixed three hundred sixty-five point two five constant, a units hint object, method set to kepler_third_law_solar_units, formula restating P_days equals three hundred sixty-five point two five times the square root of a_AU cubed over M solar, and approximation two_body_central_mass for honest scope. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance. Prefer this solar-unit calculator when your data already live in AU and solar masses; convert to SI and use a metres-and-kilograms period endpoint only when you need G-explicit second-scale results.
Where an orbital period in days calculator earns its keep
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
What does it cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.