ForHosting KIT · Science

Kepler's third law calculator

Scale one known orbit to another: if Earth takes 1 year at 1 AU, a body at 4 AU from the Sun takes 8 years. Enter three of the four values and get the missing period or distance. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
R1
1
P1
1
R2
4
You get
P2
8
Solved
p2
Constant
1
Law
T1^2 / r1^3 = T2^2 / r2^3

Units may be AU and years, kilometers and seconds, or any other consistent pair; the solver does not convert units, it only applies the proportion. Zero orbital radius is rejected because the law divides by the cube of radius and a zero semi-major axis is not a physical orbit for this relation.

What Kepler's third law solves and when it applies

Kepler's third law is the classical period–distance relation for bound orbits about a common central body: the ratio T squared over a cubed is the same for every satellite of that primary when mutual satellite mass is negligible compared with the central mass, or when you compare two test particles in the same gravitational field. In practice you pick one well-known orbit as the reference — Earth at one AU with a one-year period is the usual classroom choice — and scale to another semi-major axis or another period.

Both bodies must share the same central mass; mixing a solar orbit with a lunar orbit without rescaling will not produce a meaningful answer.

Classroom orbits, mission sizing, and automation tips

CubeSat teams can estimate period from planned altitude by converting radius to kilometers, using a known LEO reference period and radius for Earth, and solving for p2 without standing up a full orbital mechanics library. Because the implementation is pure math with no network or clock calls, results are bit-stable for identical inputs and safe to assert in continuous integration. Prefer one unit system end-to-end: convert altitudes to center-to-center radii once at the edge, then call this capability.

When you need Kepler's first or second law geometry, or n-body integrations, use dedicated tools rather than stretching the third-law proportion.

Why is zero orbital radius rejected?

The law divides by the cube of radius.

Do r and p need specific units?

No fixed unit is required, but both radii must share one unit and both periods another. Common pairs are AU with years or kilometers with seconds. The solver does not convert units.

How long does a planet at 4 AU take to orbit the Sun?

About 8 years. With Earth as the reference orbit at 1 AU and 1 year, the period squared stays proportional to the distance cubed, so four times farther means eight times longer.

Can I solve for the distance instead of the period?

Yes. Give the reference distance and period plus either the new period or the new distance, and the calculator returns whichever one is missing. Leave exactly one of the four values empty.

Can I compare an orbit around the Moon with one around the Sun?

No. Both orbits must go around the same central body. Mixing a solar orbit with a lunar one without rescaling gives a number that has no physical meaning.

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.

POSThttps://api.kit.forhosting.com/astro/kepler-third-law

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.

curl -X POST https://api.kit.forhosting.com/astro/kepler-third-law \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"r1":1,"p1":1}'
{
  "r1": 1,
  "p1": 1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "astro.kepler_third_law",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What Kepler's third law solves and when it applies

Use this endpoint when you already know three of the four scalars and need a deterministic fourth for homework checks, mission concept sizing, or quick comparisons of co-orbiting satellites before you open a full numerical propagator.

How to call the calculator and read the result

The response echoes all four numbers, names which field was solved, returns the shared constant p1 squared over r1 cubed for audit, and labels the law string so downstream code does not hard-code documentation. Invalid combinations fail with invalid_input and are not charged: missing both unknowns, providing both unknowns, non-finite numbers, non-positive period, or zero or negative orbital radius. That gate keeps automated pipelines honest — a script that forgets units or passes a zero altitude as if it were a semi-major axis will see a clear error rather than a silently infinite or zero period.

Scale a known orbit to a new radius

Given Earth's AU and year as r1 and p1, supply a target semi-major axis r2 to obtain the Keplerian period p2 for mission concept or homework checks.

Back-calculate semi-major axis from period

When a satellite's period is measured but radius is unknown, supply p2 with a reference orbit to solve for r2 under the same central body.

Automate orbital proportion quizzes

Call the API from a grading script with three known values and compare the solved field to student answers without maintaining a separate formula sheet.

What is Kepler's third law in this calculator?

For the same central body, T1²/r1³ = T2²/r2³. Provide r1, p1, and either r2 or p2; the service returns the missing value and the full set of four quantities plus the shared constant.

Can I send both r2 and p2?

No. Exactly one of the second-body values must be provided so the other can be solved. Sending both or neither returns invalid_input.

How much does the API cost?

Successful calls are billed at $0.002 per item from your prepaid KIT balance. Failed invalid_input requests are not charged. The browser widget runs the same solver free for interactive use.

Read the full KIT documentation →