# Orbital Period Calculator

> Computes the orbital period from the semi-major axis and the central body's gravitational parameter GM with Kepler's third law T = 2π√(a³/GM), plus the circular orbital speed √(GM/a), for the Sun, Earth, Moon, Mars, Jupiter or a custom mass.

- Calculator id: `orbital-period` · Category: Biology, Earth & Space (`science`) · Tool name: `calculate_orbital_period`
- Canonical page: https://tttkmbb.com/science/orbital-period · This document: https://tttkmbb.com/science/orbital-period.md · JSON definition: https://tttkmbb.com/science/orbital-period.json

## Purpose

Computes the orbital period from the semi-major axis and the central body's gravitational parameter GM with Kepler's third law T = 2π√(a³/GM), plus the circular orbital speed √(GM/a), for the Sun, Earth, Moon, Mars, Jupiter or a custom mass.

**Use when:** You need the period or speed of a satellite, moon or planet from its orbit size (e.g. the ISS at 6,791 km from Earth's centre, or 1 AU around the Sun).

**Do not use when:** You need the speed to leave a body (use escape-velocity), a transfer orbit or the position along an elliptical orbit at a given time, or relativistic corrections.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `semi_major_axis` | number |  | required | Orbit size a, measured from the centre of the central body (radius of a circular orbit), in the unit given by axis_unit. (> 0, max 1000000000000000000) |
| `axis_unit` | enum: km \| au \| m |  | optional, default "km" | Unit of semi_major_axis. |
| `central_body` | enum: sun \| earth \| moon \| mars \| jupiter \| custom |  | optional, default "earth" | Body being orbited; its GM is taken from the JPL astrodynamic constants. |
| `central_mass_kg` | number | kg | optional | Mass of the central body, only used when central_body is custom (GM = G × M with G = 6.67430 × 10⁻¹¹). (> 0, max 1e+42) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `period_seconds` | number | s | T = 2π √(a³ / GM). |
| `period_minutes` | number | min | T / 60. |
| `period_hours` | number | h | T / 3600. |
| `period_days` | number | days | T / 86,400. |
| `period_years` | number | years | T / (365.25 × 86,400) (Julian years). |
| `orbital_speed_km_s` | number | km/s | √(GM / a), the speed of a circular orbit of radius a. |
| `semi_major_axis_km` | number | km | The orbit size in kilometres. |
| `gm_m3_s2` | number | m³/s² | Standard gravitational parameter of the central body. |

## Formula

`T = 2π × √(a³ / GM); v_circular = √(GM / a); GM(custom) = 6.67430 × 10⁻¹¹ × central_mass_kg`

Kepler's third law for a body of negligible mass in a two-body orbit. GM values (m³/s²): Sun 1.32712440018 × 10²⁰, Earth 3.986004418 × 10¹⁴, Moon 4.9048695 × 10¹², Mars 4.282837 × 10¹³, Jupiter 1.26686534 × 10¹⁷. For an elliptical orbit the speed output is the circular value at radius a, not the varying true speed.

## Data Sources

- Wikipedia – Orbital period — https://en.wikipedia.org/wiki/Orbital_period (reference, retrieved 2026-09-24)
- Wikipedia – Standard gravitational parameter — https://en.wikipedia.org/wiki/Standard_gravitational_parameter (reference, retrieved 2026-09-24)
- NASA JPL Solar System Dynamics – Astrodynamic parameters (GM of the Sun and planets) — https://ssd.jpl.nasa.gov/astro_par.html (government, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/orbital-period?semi_major_axis=…`
- `POST https://tttkmbb.com/api/v1/calculate/orbital-period` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/orbital-period · OpenAPI operationId `calculate_orbital_period` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "orbital-period", "inputs": {…}}`

## Example

- Earth around the Sun (1 AU): inputs `{"semi_major_axis":1,"axis_unit":"au","central_body":"sun"}` → `{"period_days":365.2569,"period_years":1.00002,"orbital_speed_km_s":29.785,"semi_major_axis_km":149597870.7}`
- ISS: 6,791 km from Earth's centre (about 420 km altitude): inputs `{"semi_major_axis":6791,"axis_unit":"km","central_body":"earth"}` → `{"period_seconds":5569.44,"period_minutes":92.824,"orbital_speed_km_s":7.661}`

```
GET https://tttkmbb.com/api/v1/calculate/orbital-period?semi_major_axis=1&axis_unit=au&central_body=sun
```

## Limitations

You need the speed to leave a body (use escape-velocity), a transfer orbit or the position along an elliptical orbit at a given time, or relativistic corrections. Kepler's third law for a body of negligible mass in a two-body orbit. GM values (m³/s²): Sun 1.32712440018 × 10²⁰, Earth 3.986004418 × 10¹⁴, Moon 4.9048695 × 10¹², Mars 4.282837 × 10¹³, Jupiter 1.26686534 × 10¹⁷. For an elliptical orbit the speed output is the circular value at radius a, not the varying true speed. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Is the semi-major axis the altitude?**

No: it is measured from the centre of the central body, so add the body's radius to the altitude (ISS: 6,371 km + 420 km ≈ 6,791 km). A note is added when a is smaller than the body's radius.

**Does the mass of the orbiting body matter?**

Only when it is not negligible compared with the central body (e.g. binary stars, Pluto–Charon): then GM should be G × (M + m).

**Why is the year 365.26 days rather than 365.24?**

Kepler's law gives the sidereal year (365.256 days, one orbit relative to the stars); the calendar (tropical) year of 365.242 days is shorter because of the precession of the equinoxes.

## Related

- [Escape Velocity Calculator](https://tttkmbb.com/science/escape-velocity.md) — Escape speed and circular orbital speed at the surface of the same bodies.
- [Centripetal Force Calculator](https://tttkmbb.com/physics/centripetal-force.md) — Centripetal force and acceleration of the circular orbit.
- [Gravitational Force Calculator](https://tttkmbb.com/physics/gravitational-force.md) — The gravitational force providing the centripetal acceleration.
