ForHosting KIT · Developer Utilities

Latus rectum calculator

The latus rectum calculator takes the defining coefficients of a parabola, y = a·x² + b·x + c, or of an ellipse centered at the origin, x²/a² + y²/b² = 1, and returns the length of its latus rectum — the chord through the focus parallel to the directrix.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

For a parabola the answer is |1/a|; for an ellipse it is 2·min(a,b)²/max(a,b). The computation is exact arithmetic with no approximation, and the same code runs free in your browser on this page and through the paid API for automated pipelines.

What the latus rectum is

Every conic section has a focus, and through that focus there is a special chord drawn parallel to the directrix: the latus rectum. Its length is a compact way of describing how wide the curve opens at its focus. For a parabola written as y = a·x² + b·x + c, the focal length is 1/(4a), and the latus rectum is four times that, which simplifies to the absolute value |1/a|. A small coefficient a means a wide, gently opening parabola with a long latus rectum; a large a means a narrow one with a short chord. For an ellipse written as x²/a² + y²/b² = 1, the latus rectum runs through either focus perpendicular to the major axis, and its length is 2·min(a,b)²/max(a,b) — twice the square of the semi-minor axis divided by the semi-major axis. A circle is the special case a = b, where the formula reduces to 2a, the diameter, which is exactly what a chord through the center should be. The latus rectum calculator applies these formulas directly: you send the coefficients and receive the length.

How the computation works

The algorithm is the textbook one, done with exact arithmetic and no external calls. First the input is validated: the curve selector must be 'parabola' or 'ellipse', every required coefficient must be a finite number, and the coefficient that acts as a denominator must not be zero — for a parabola that is the x² coefficient a, since y = b·x + c is a straight line with no focus and no latus rectum, and for an ellipse a zero denominator breaks the equation x²/a² + y²/b² = 1 entirely. Negative ellipse denominators are rejected as well, because a negative sign turns the curve into a hyperbola, a different conic with a different latus rectum formula. Once validated, the parabola branch returns |1/a| and the ellipse branch returns 2·min(a,b)²/max(a,b). Results are rounded to six decimal places so the answer is stable and byte-identical on any machine. The constant term c of the parabola is optional and does not affect the result: translating a parabola up or down moves the latus rectum but never changes its length.

Where the latus rectum shows up

The latus rectum is not just a homework curiosity. In antenna and reflector design, parabolic dishes are specified through their focal geometry, and the latus rectum measures the aperture chord at the focal plane. In orbital mechanics, the semi-latus rectum p of an elliptical orbit is one of the standard orbital elements — the chord through the attracting focus — and the full latus rectum is simply 2p, so converting an ellipse's geometric coefficients into that element is exactly this computation. In ballistics and computer graphics, parabolic trajectories are compared by how sharply they open, which |1/a| captures in a single number. Students use the endpoint to verify hand-worked exercises before moving on to vertices and foci; teachers use it to generate problems with guaranteed answers. The endpoint runs on our global edge, keeps nothing you send, and costs $0.002 per request when you automate it. The identical code runs free in your browser on this page, so you can check one curve by hand and only pay when the same check becomes part of a pipeline.

Check an analytic geometry exercise

Confirm that y = 0.25x² has a latus rectum of 4 before going on to compute its vertex, focus and directrix.

Convert an ellipse into orbital elements

Turn the geometric denominators of x²/a² + y²/b² = 1 into the chord through the focus — the full latus rectum, twice the semi-latus rectum p used in orbit catalogs.

Compare parabolic reflector designs

Rank candidate dish profiles by the width of their focal chord, straight from the coefficient a of each design equation.

What does it cost?

$0.002 per request via the API. It is also free to run in your browser on this page.

What inputs does it accept?

A curve selector ('parabola' or 'ellipse') and the defining coefficients: a, b and optionally c for y = a·x² + b·x + c, or the positive denominators a and b of x²/a² + y²/b² = 1.

What is the formula for a parabola?

The latus rectum of y = a·x² + b·x + c is |1/a|, four times the focal length 1/(4a). Only the x² coefficient matters.

What is the formula for an ellipse?

For x²/a² + y²/b² = 1 it is 2·min(a,b)²/max(a,b): twice the square of the semi-minor axis divided by the semi-major axis. For a circle (a = b) it reduces to 2a, the diameter.

What input is rejected?

A curve selector other than 'parabola' or 'ellipse', any coefficient that is not a finite number, a zero denominator coefficient (a = 0 for a parabola, a = 0 or b = 0 for an ellipse), and negative ellipse denominators, which describe a hyperbola.

Does the constant term of the parabola change the result?

No. Adding c only translates the parabola vertically; the latus rectum moves with it but its length stays |1/a|. The field is optional and defaults to 0.

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/math/latus-rectum

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/math/latus-rectum \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"curve":"parabola","a":2,"b":0}'
{
  "curve": "parabola",
  "a": 2,
  "b": 0
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.latus_rectum",
  "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.

Read the full KIT documentation →