Orbital period calculator
Find how long one lap takes around a heavy central body: 149,597,870,700 m from a body of the Sun's mass gives about 365.25 days. Enter the orbit size in metres and the mass in kilograms. 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
- 149,597,870,700
- Mass
- 1,988,470,000,000,000,000,000,000,000,000
- G
- 0.0000000001
- Mu
- 132,716,453,210,000,000,000
- A cubed
- 3,347,928,975,810,000,000,000,000,000,000,000
- Period
- 31,557,718.873
Kepler's third law links the size of an orbit to how long one revolution takes when a small body moves under the gravity of a much heavier central mass. In Newtonian form the sidereal period is T equals two pi times the square root of a cubed over G times M, where a is the semi-major axis, M is the central mass, and G is the gravitational constant. Non-positive semi-major axis is also rejected because it cannot define a closed Keplerian ellipse.
How Kepler's third law gives the orbital period
Start from Newtonian two-body gravity with a central mass M that dominates the satellite mass, so the reduced-mass correction can be ignored or already folded into M. The vis-viva and harmonic-oscillator structure of the relative orbit yields a mean motion n equal to the square root of G M over a cubed, where a is the semi-major axis of the conic.
The orbital period is then T equals two pi over n, which expands to the closed form T equals two pi times the square root of a cubed over G M. Equivalently, squaring both sides recovers the classical statement that T squared is proportional to a cubed with proportionality constant four pi squared over G M.
Mass M must be a finite positive number of kilograms; 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 imaginary periods. Semi-major axis must likewise be finite and positive so a cubed stays positive and the square root is real. This page intentionally uses the two-body central-mass approximation only; n-body perturbations, atmospheric drag, thrust arcs, and general-relativistic precession are separate search intents and separate landings.
Where orbital period calculators show up in real work
Secondary-school and introductory university astronomy and physics courses assign Kepler drills, Earth-year checks, and satellite period estimates that rearrange the same formula; a single trusted oracle speeds grading and demo setup. CubeSat and amateur radio teams convert target altitudes into rough periods before full numerical propagators and ground-station pass planning. Mission concept studies compare circular parking-orbit periods around Earth, Moon, and Mars from tabulated masses without re-deriving constants each time.
Science communicators and exhibit designers convert semi-major axes of exoplanet systems into human-scale year lengths for public displays. If you later need central mass from a known period and semi-major axis, full two-body reduced-mass periods, Hohmann transfer times, or n-body ephemerides, treat those as separate search intents and landings rather than overloading this orbital period calculator page.
What you can do with it
Homework and exam answer keys
Compute Keplerian period T from semi-major axis a and central mass M so students and auto-graders share one closed-form ground truth in seconds, days, and years.
Satellite and CubeSat sizing
Convert target circular altitude about Earth into a rough orbital period before full propagators and pass-planning tools.
Planetarium and exoplanet demos
Turn tabulated semi-major axes and stellar masses into human-readable orbital years for exhibits and curriculum widgets.
FAQ
What formula does this orbital period 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?
SI: semi-major axis in metres and mass in kilograms. Convert AU and solar masses yourself before calling.
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 timing of true anomaly, not the orbital period itself under this model.
What does it cost?
The browser tool is free and runs locally.
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 \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"semi_major_axis":149597870700,"mass":1.98847e+30}'const res = await fetch("https://api.kit.forhosting.com/astro/orbital-period", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"semi_major_axis": 149597870700,
"mass": 1.98847e+30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/orbital-period",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"semi_major_axis": 149597870700,
"mass": 1.98847e+30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/orbital-period", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"semi_major_axis":149597870700,"mass":1.98847e+30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"semi_major_axis":149597870700,"mass":1.98847e+30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/orbital-period", 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": 149597870700,
"mass": 1.98847e+30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.orbital_period",
"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 Kepler's third law gives the orbital period
The calculator evaluates that closed form in deterministic floating-point arithmetic with the CODATA two thousand eighteen value of G: no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical inputs always produce identical JSON.
What you send and what you get back
Semi-major axis is the orbital size parameter a in metres and must be strictly greater than zero; for Earth about the Sun use roughly one point four nine six times ten to the eleven metres, which is one astronomical unit. Mass is the central body mass M in kilograms and must also be strictly greater than zero; use about one point nine eight eight times ten to the thirty for the Sun or about five point nine seven times ten to the twenty-four for Earth. Classic textbook checks include one AU about solar mass recovering roughly one year, and low-Earth circular orbits of roughly six thousand seven hundred kilometres radius about Earth mass recovering periods near ninety minutes. Keep units consistent: convert kilometres, AU, solar masses, and Earth masses to metres and kilograms before calling so the numeric product matches the SI interpretation your report claims. Send two required finite numbers under the fields semi_major_axis and mass. 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 and mass, exposes G as the fixed CODATA constant, mu as G times M, a_cubed as a to the third power, period as the primary SI result in seconds, period_days as period divided by eighty-six thousand four hundred, period_years as period divided by a Julian year of three hundred sixty-five point two five days, mean_motion as two pi over period in radians per second, includes a units hint object, sets method to kepler_third_law, formula to T equals two pi times the square root of a cubed over G M, and approximation to 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.
Where orbital period 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.