ForHosting KIT · Science

Apoapsis and periapsis calculator

An orbit with a semi-major axis of 7000 km and an eccentricity of 0.05 swings out to 7350 km and in to 6650 km. Enter both elements and get the two turning points of the ellipse in your own unit. 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
Semi major axis
7,000
Orbital eccentricity e
0.05
You get
Apoapsis
7,350
Periapsis
6,650

Apoapsis and periapsis are the farthest and nearest radial distances of a body on a Keplerian two-body orbit around a central mass. Units of a carry through to the returned distances, so kilometers stay kilometers and meters stay meters.

What apoapsis and periapsis tell you about an orbit

Every closed orbit around a central body is an ellipse with two turning points. Apoapsis is the moment the body is farthest from the center of the central mass, and periapsis is the moment it comes closest. Two numbers fix both: the semi-major axis, which sets the overall size of the ellipse, and the eccentricity, which says how stretched it is. The farthest distance is the semi-major axis times one plus the eccentricity, and the nearest is the semi-major axis times one minus the eccentricity. With an eccentricity of zero the orbit is a circle and both distances equal the semi-major axis. As the eccentricity approaches one, the nearest point shrinks toward zero while the farthest grows toward twice the semi-major axis.

Common mistakes when reading the result

The most frequent slip is mixing distance from the center with height above a surface. Both results are measured from the center of the central body, so if your source quotes an altitude above Earth, add the planet's radius first. Units are never converted: kilometres in give kilometres out, metres in give metres out. Eccentricity cannot be negative, and the semi-major axis must be positive.

What apoapsis and periapsis mean and how to choose a and e

Under the two-body Keplerian model every elliptical or circular path is fully described by a positive semi-major axis a and a non-negative eccentricity e less than one for a closed ellipse, or e equal to zero for a perfect circle. The apoapsis radius is the greatest center-to-body distance on that path and equals a times one plus e; the periapsis radius is the least distance and equals a times one minus e. When e is zero both extremes collapse to a itself, recovering circular radius.

When e approaches one from below the periapsis shrinks toward zero while the apoapsis grows toward two a, matching the highly elongated ellipses used in transfer sketches and comet-like examples. Both must be finite. Semi-major axis must be strictly positive because a non-positive a does not define the usual positive-distance ellipse convention this product implements.

The calculator does not convert altitude above a planetary surface into center-to-body radius; if your source quotes height above Earth, add the planetary radius first to obtain the radial distances you want to compare, or treat a and the returned extremes as consistent center-to-body lengths.

How do I calculate apoapsis and periapsis from a and e?

The response includes apoapsis equal to a(1+e) and periapsis equal to a(1-e), plus formula and method labels.

What happens if eccentricity is negative?

Eccentricity must be non-negative; a negative value is rejected by product contract and is not charged.

What units should I use for semi-major axis?

Any consistent length unit. The returned apoapsis and periapsis use the same unit as a. The calculator does not convert between kilometers and meters for you.

What if eccentricity is zero?

The orbit is circular: apoapsis and periapsis both equal the semi-major axis a.

Is the apoapsis periapsis calculator free?

The browser tool runs free on your device.

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/apoapsis-periapsis

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/apoapsis-periapsis \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"semi_major_axis":7000,"eccentricity":0.05}'
{
  "semi_major_axis": 7000,
  "eccentricity": 0.05
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "astro.apoapsis_periapsis",
  "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.

Once you know the semi-major axis a and the dimensionless eccentricity e, those extremes follow from the simple closed forms r_a equals a times one plus e and r_p equals a times one minus e, with no need for numerical integration or ephemeris tables. This capability evaluates both distances deterministically from finite numeric inputs, rejects negative eccentricity with a clear invalid input error, and returns structured JSON that homework checkers, mission concept tools, and lightweight astrodynamics pipelines can pin in continuous integration without installing a full orbital mechanics stack.

What apoapsis and periapsis mean and how to choose a and e

Send the required field semi_major_axis as a JSON number or numeric string for a; aliases a and sma are accepted. Send the required field eccentricity for e; aliases e and ecc are accepted. Eccentricity must be non-negative: a negative e is invalid_input by product contract and by physics, since eccentricity is defined as a non-negative shape parameter. Identical inputs always produce identical JSON because the path is pure floating-point arithmetic with no network, no random seed, and no wall clock.

Reading the response fields and unit consistency

Units are your responsibility and must be consistent: whatever length unit you use for a is the unit of both returned distances. The engine does not assume kilometers or meters; it multiplies pure numbers. Use apoapsis alone when a dashboard only needs the far turning point; use periapsis when sizing atmospheric interface or minimum approach; keep formula and method when documenting the geometry step for students or when logging which algorithm produced a mission sketch. On success the response echoes semi_major_axis and eccentricity, then reports apoapsis as r_a equals a times one plus e and periapsis as r_p equals a times one minus e. The formula field is always the string r_a equals a open parenthesis one plus e close parenthesis semicolon r_p equals a open parenthesis one minus e close parenthesis, and method is always kepler_apoapsis_periapsis so downstream code can branch without sniffing shapes. Missing semi_major_axis, missing eccentricity, non-positive a, negative e, and non-finite numbers all fail with invalid_input and are not charged after the engine rejects the request. Pair this endpoint with an orbital velocity or energy tool when the next question is speed or binding energy at those radii, remembering that a and e fix the shape while masses and gravitational constant fix the dynamical scale.

API usage, pricing, classroom workflows, and practical limits

Call the free in-browser apoapsis periapsis calculator for homework checks, lecture demos, and quick concept verification without installing Orekit, GMAT, or a local MATLAB toolbox. Typical classroom examples include a low-Earth-orbit ellipse with a near seven thousand kilometers and e of a few hundredths, a transfer ellipse with larger e, and a circular case with e exactly zero where apoapsis equals periapsis equals a. Extremely large or tiny magnitudes are bounded for isolate safety; stay within the published numeric range for reliable results. Send a JSON body with required positive semi_major_axis and required non-negative eccentricity. 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 apoapsis and periapsis into tables that compare turning points across eccentricity while holding a fixed, teaching how the difference r_a minus r_p equals two a e and how circularization drives that difference to zero—a companion lesson to period and velocity formulas when building multi-step orbital-mechanics lesson flows.

Homework and exam verification

Students and graders compute apoapsis and periapsis from semi-major axis and eccentricity, compare against textbook answers, and get a clear invalid_input error when eccentricity is negative by mistake.

Tutoring and curriculum generators

Lesson builders produce worked Keplerian extreme-radius 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 need stable r_a and r_p from a and e call a prepaid endpoint instead of reimplementing a(1±e) in every language.

Read the full KIT documentation →