Semi-major axis from period calculator
Turn an orbital period into orbit size with Kepler's third law: with μ = 1 and a period of 2π the semi-major axis comes out as exactly 1, a quick check for homework and lecture demos. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Period
- 6.2831853072
- Gravitational parameter
- 1
- Period
- 6.2831853072
- Semi major axis
- 1
- A cubed
- 1
Kepler’s third law ties the square of the orbital period to the cube of the semi-major axis once the central body’s standard gravitational parameter is known. When mission notes, textbook problems, or tracking summaries already quote period T and μ = GM, you do not need mass and G separately—you recover the orbit size by solving a = (μ · T² / (4π²)) to the one-third power.
What Kepler’s third law inversion means for orbit size
Under the two-body Keplerian model a small satellite orbiting a fixed central body obeys T squared equals four pi squared times a cubed over μ, where T is the sidereal orbital period, a is the semi-major axis of the relative orbit, and μ is the standard gravitational parameter GM of the central mass. Solving for size instead of period rearranges the same identity: a cubed equals μ times T squared divided by four pi squared, so a is the real cube root of that quantity.
The result is exact for the ideal Keplerian ellipse (and for the circular limit where a is simply the orbital radius). Units of the inputs must be consistent: with SI choices, T in seconds and μ in cubic metres per second squared yield a in metres. The calculator does not convert altitude above a planetary surface into center-to-body distance, and it does not fold in higher-order perturbations, drag, or third-body effects.
Where it helps in class and where it stops
Call the free in-browser semi-major axis from period calculator for homework checks, lecture demos, and quick concept verification without installing Orekit, GMAT, or a local MATLAB toolbox.
Typical classroom examples include a unit-system check where μ equals one and T equals two pi so a equals one, a low-Earth-orbit sketch with Earth μ about three point nine eight six times ten to the fourteen and a ninety-minute period near five thousand four hundred seconds, and a circular-orbit recovery that matches a known a after you first form T from two pi times the square root of a cubed over μ. Extremely large magnitudes are bounded for isolate safety; stay within the published numeric range for reliable results.
FAQ
What happens if period or μ is zero or negative?
Both period and gravitational parameter must be strictly positive; non-positive values are rejected by product contract and are not charged.
What if a value is not a number?
Only finite numbers (or numeric strings) are accepted.
What units should I use?
Any consistent system. SI uses seconds for T and m³/s² for μ so a is in metres. Convert minutes or hours to seconds before calling; form μ = G·M if you have mass instead of μ.
Is the semi-major axis from period calculator free?
The browser tool runs free on your device.
Can I enter the period in minutes or hours?
Convert it to seconds first when μ is in cubic metres per second squared, because the units must match. A period in minutes with an SI value of μ gives an orbit size that is badly wrong.
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/sma-from-period \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"period":5400,"gravitational_parameter":398600441800000}'const res = await fetch("https://api.kit.forhosting.com/astro/sma-from-period", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"period": 5400,
"gravitational_parameter": 398600441800000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/astro/sma-from-period",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"period": 5400,
"gravitational_parameter": 398600441800000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/astro/sma-from-period", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"period":5400,"gravitational_parameter":398600441800000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"period":5400,"gravitational_parameter":398600441800000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/astro/sma-from-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
{
"period": 5400,
"gravitational_parameter": 398600441800000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "astro.sma_from_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
Non-positive period or μ fail with invalid_input instead of inventing a meaningless radius.
What Kepler’s third law inversion means for orbit size
If your source quotes period in minutes or hours, convert to seconds first; if it quotes mass instead of μ, form μ equals G times M with a fixed G and then call this endpoint. Identical finite positive inputs always produce identical JSON because the path is pure floating-point arithmetic with no network, no random seed, and no wall clock—ideal for pinning goldens in continuous integration and for matching free browser widgets to paid API responses.
Input contract, response shape, and error behaviour
Both values must be strictly greater than zero. POST a JSON body with two required finite numbers: period for the orbital period T, and gravitational_parameter for μ equals GM. Each field may arrive as a JSON number or as a numeric string. Aliases T, orbital_period, and period_s are accepted for period; aliases mu, mu_grav, and GM are accepted for gravitational_parameter. Missing fields, empty strings, NaN, Infinity, and non-numeric types fail with invalid_input messages that name the field. A zero or negative period also fails with invalid_input by product contract, because a non-positive period cannot define a real positive semi-major axis under Kepler’s third law. A zero or negative gravitational parameter likewise fails with invalid_input, because μ is positive for real central bodies and the cube-root expression would not yield a physical orbit size. Those validation failures are not billed after the engine rejects the request. On success the body echoes cleaned period and gravitational_parameter, reports semi_major_axis as the cube root of μ T squared over four pi squared rounded for stable cross-runtime comparison, reports a_cubed as that intermediate product, sets formula to the string a equals open parenthesis μ · T squared over four pi squared close parenthesis to the one-third, and sets method to sma_from_period. Example: period equal to two pi and gravitational_parameter equal to one yields semi-major axis one in the same length unit implied by μ. Pair the result with circular speed or energy tools when the next question needs dynamical scale; this endpoint only recovers a from T and μ.
API usage, pricing, classroom workflows, and practical limits
Use the prepaid API when a tutoring platform, coding-assessment sandbox, curriculum generator, or early mission-design pipeline needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance after rejection. Authors shipping SDKs can map semi_major_axis into tables that recover a from published T and μ pairs, teaching that orbit size follows from period once the central body is fixed—a natural inverse lesson to tools that expand a and mass into period when building multi-step orbital-mechanics lesson flows.
Integration use cases
Homework and exam verification
Students and graders recover semi-major axis from textbook period and μ values and get a clear invalid_input error when period or gravitational parameter is non-positive or non-numeric.
Tutoring and curriculum generators
Lesson builders produce worked Keplerian size-from-period examples with structured JSON for flashcards, step sheets, and auto-graded drills without embedding a full astrodynamics library.
Early mission concept sketches
Lightweight pipelines that already know period and central-body μ call a prepaid endpoint for a instead of reimplementing (μ·T²/(4π²))^(1/3) in every language.
Technical questions
How do I calculate semi-major axis from orbital period?
Send JSON with period (T > 0) and gravitational_parameter (μ = GM > 0) as finite numbers in consistent units. The response includes semi_major_axis equal to (μ·T²/(4π²))^(1/3), plus a_cubed, formula, and method labels.