Ellipse latus rectum calculator
Enter the two semi-axes of an ellipse and get the chord through a focus: semi-axes of 5 and 3 give a semi-latus rectum of 1.8 and a full latus rectum of 3.6, the minor axis squared over the major. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 5
- B
- 3
- Semi major
- 5
- Semi minor
- 3
- Semi latus rectum
- 1.8
- Latus rectum
- 3.6
The latus rectum of an ellipse is the chord through a focus parallel to the directrix; its full length and the half-length (semi-latus rectum) appear in conic-section textbooks, orbital mechanics notes, and CAD checks for elliptical paths. This ellipse latus rectum calculator accepts two finite non-negative semi-axes, takes the larger as the semi-major axis A and the smaller as the semi-minor axis B, and returns both p equals B squared over A and L equals two B squared over A with a short formula string you can show next to the answer. When the two semi-axes are equal the figure is a circle and L equals the diameter, matching the classical special case.
What the latus rectum means and how p = B²/A scales the ellipse
An ellipse is the set of points whose sum of distances to two foci is constant. The latus rectum is the chord that passes through one focus and is perpendicular to the major axis; its full length is L equals two B squared over A, and the semi-latus rectum p equals half of that chord, B squared over A. Here A is the semi-major axis (the larger of the two input lengths) and B is the semi-minor axis (the smaller).
Because p uses the square of the minor axis over the major axis, stretching the minor axis alone increases p quadratically while stretching the major axis alone decreases p linearly—the same scaling that appears in the polar equation of a conic with parameter p. When A equals B the ellipse is a circle of radius A, p equals A, and L equals two A, which is the diameter through a focus that coincides with the center.
Units are your responsibility: if A and B are metres then p and L are metres; if they are inches the results are inches. Order of the two inputs does not matter for the result—swapping them leaves A, B, p, and L unchanged—though engineering drawings often label the horizontal semi-axis first.
When you need area, perimeter, or eccentricity you use a fuller ellipse tool; here the search intent is the latus rectum alone from the two semi-axes, which matches the common query for an ellipse latus rectum calculator on homework sites and orbital-mechanics helpers.
When the latus rectum comes up
Classrooms and tutoring platforms use a dedicated ellipse latus rectum calculator so learners can check p equals B squared over A and L equals two B squared over A for arbitrary non-negative axes without calculator-mode mistakes or confusing which axis is major. Exam generators and LMS plugins need a deterministic oracle that marks a negative semi-axis as invalid instead of silently taking an absolute value that would hide a student sign error. Failed validation does not consume balance.
Keep both semi-axes finite and non-negative with at least one positive, pin the rounded p and L in tests, and you get reproducible latus rectum values for homework, LMS plugins, and edge workers without a computer-algebra system of your own.
What you can do with it
Exam and LMS auto-grading
Mark latus rectum items with a deterministic oracle that rejects negative semi-axes and never silently flips a sign error.
FAQ
How do I calculate the latus rectum of an ellipse from its semi-axes?
Send two finite non-negative lengths a and b.
What happens if a semi-axis is negative?
A Euclidean ellipse semi-axis cannot be less than zero; those failures are not billed.
Does the order of a and b matter?
No. The larger value is always treated as semi-major and the smaller as semi-minor, so swapping a and b leaves p and L unchanged.
What if a equals b?
The ellipse is a circle of radius a. Then p equals a and L equals 2a (the diameter).
What is the difference between the latus rectum and the semi-latus rectum?
The latus rectum is the whole chord through a focus, perpendicular to the major axis; the semi-latus rectum is half of it. For semi-axes of 5 and 3 they measure 3.6 and 1.8.
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/geom/ellipse-latus-rectum \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":5,"b":3}'const res = await fetch("https://api.kit.forhosting.com/geom/ellipse-latus-rectum", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 5,
"b": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/ellipse-latus-rectum",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 5,
"b": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/ellipse-latus-rectum", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":5,"b":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":5,"b":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/ellipse-latus-rectum", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 5,
"b": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.ellipse_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.
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
A negative semi-axis is rejected with invalid_input because length cannot be negative in Euclidean geometry; both axes zero is also rejected so the formula never divides by zero.
What the latus rectum means and how p = B²/A scales the ellipse
The endpoint never converts units; it only applies the pure geometric map from the two semi-axes to the chord lengths.
Input contract, response shape, and negative semi-axis errors
Zero is accepted on at most one axis and yields a zero latus rectum (the degenerate flat-ellipse limit); both axes zero is rejected because the semi-major axis would be zero and B squared over A is undefined. Example: a equals five and b equals three yields semi-major five, semi-minor three, semi-latus rectum one point eight, and latus rectum three point six. Keep requests tiny—two numbers in, a handful of numbers out—and pin the rounded p and L in automated tests so a future change to rounding would surface immediately without re-deriving the chord by hand. POST a JSON object with two required fields: a and b (aliases semi_axis_a, semi_major, semiAxisA for the first axis and semi_axis_b, semi_minor, semiAxisB for the second). Each value must be a finite number or a numeric string; missing, empty, non-numeric, NaN, and Infinity values fail with invalid_input naming the field. On success the body includes the echoed a and b, the derived semi_major and semi_minor, semi_latus_rectum p, latus_rectum L, and a formula string restating p equals B squared over A and L equals two B squared over A. Pair the response with your own unit labels in the UI; this endpoint does not emit unit strings or multi-step prose beyond the formula field.
Where an ellipse latus rectum API earns its keep
Orbital-mechanics notebooks and astronomy demos often need the semi-latus rectum as the conic parameter in polar form r equals p over one plus e cosine theta; calling a tiny parse API avoids embedding ad-hoc division in every spreadsheet. Fabrication and CAD checks for elliptical arches or guide rails sometimes quote the focal chord length as a construction dimension; a prepaid call returns L without standing up a geometry stack.
Integration use cases
Homework and classroom checks
Students enter two semi-axes and verify p = B²/A and L = 2B²/A against textbook answers without major/minor mix-ups.
Orbital parameter and CAD scripts
Obtain the semi-latus rectum conic parameter or focal chord length from measured semi-axes via a tiny prepaid API call.
Technical questions
What does the ellipse latus rectum calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.