ForHosting KIT · Math

Parabola from focus and directrix

A focus at (0, 1) with a directrix one unit below the origin gives the parabola x² = 4y, with its vertex at the origin and a focal length of 1. Enter any focus and line to get the equation, vertex and axis. 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
Focus x
0
Focus y
1
A
0
B
1
C
1
You get
Directrix equation
y + 1 = 0
Equation
x^2 - 4y = 0
Coeff xx
1
Coeff xy
0

A parabola is the set of all points in the plane that are equidistant from a fixed point called the focus and a fixed line called the directrix. Given those two ingredients you can recover the full Cartesian equation, the vertex (midpoint between the focus and its foot on the line), and the focal length without first guessing a standard form. This parabola from focus and directrix calculator accepts the focus coordinates and the coefficients of the line ax plus by plus c equals zero, expands the equidistance identity into a general conic, and returns a stable equation string plus geometric summaries you can plug into notebooks, LMS auto-graders, or CAD checks.

Definition, equation expansion, and when the construction fails

Writing that identity and squaring both sides (after multiplying through by the squared line normal) yields a quadratic equation in x and y: A x squared plus B x y plus C y squared plus D x plus E y plus F equals zero.

The coefficients have closed forms in the focus and the line: A equals b squared, B equals negative two a b, C equals a squared, and the linear and constant terms involve the product of the squared normal length with the focus coordinates plus cross terms with c. That general conic is always a parabola when the focus is off the line, because the equidistance construction forces eccentricity one.

The vertex is the midpoint of the segment from the focus to its orthogonal projection (foot) on the directrix; the focal length is half the focus-to-line distance; the axis points from the vertex toward the focus along the line normal.

Classroom focus–directrix checks

Let students enter a focus and directrix coefficients and verify the conic equation, vertex, and focal length against textbook expansions.

Optics and mirror design notes

Recover Cartesian coefficients from a prescribed focus and base line in lab notebooks without importing a full computer-algebra library.

What happens if the focus lies on the directrix?

Distance zero means no finite parabola; that case is not billed.

What line form does the directrix use?

Horizontal and vertical directrices are allowed (for example y = −1 as 0·x + 1·y + 1 = 0).

What happens if a and b are both zero?

Then the three numbers do not describe a line, so there is no directrix and no parabola. The calculator rejects that input with a clear message instead of returning an empty equation.

How is the vertex found from the focus and directrix?

The vertex is the midpoint between the focus and the foot of the perpendicular dropped from the focus onto the directrix. The focal length is half the distance from the focus to the line.

Can the directrix be a slanted line?

Yes. Any straight line works, not only horizontal or vertical ones: you give its coefficients a, b and c. A slanted directrix produces a tilted parabola whose equation includes an xy term.

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/geom/parabola-from-focus-directrix

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/geom/parabola-from-focus-directrix \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"focus_x":0,"focus_y":1,"a":0,"b":1,"c":1}'
{
  "focus_x": 0,
  "focus_y": 1,
  "a": 0,
  "b": 1,
  "c": 1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.parabola_from_focus_directrix",
  "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.

When the focus lies on the directrix the distance is zero and no finite parabola exists, so the task fails with invalid_input instead of inventing a degenerate curve.

Definition, equation expansion, and when the construction fails

By definition a point P equals (x, y) belongs to the parabola with focus F equals (focus_x, focus_y) and directrix ax plus by plus c equals zero when the Euclidean distance from P to F equals the perpendicular distance from P to the line. If a and b are both zero the triple (a, b, c) does not define a line and the request is rejected. If the absolute value of a times focus_x plus b times focus_y plus c is zero, the focus lies on the directrix, the focal length collapses, and the capability returns invalid_input with a clear message rather than a hollow equation. Those two failure modes match textbook language and keep API clients from treating a geometric impossibility as a billed success.

Input contract, response fields, and worked examples

Numeric fields are rounded to twelve decimal places for stable goldens across runtimes. Classic check: focus at (0, 1) and directrix y equals negative one, encoded as a equals zero, b equals one, c equals one, produces the parabola x squared minus four y equals zero (equivalent to y equals x squared over four), vertex at the origin, and focal length one. Pair the coefficients with your own plotter if you need a sketch; the capability returns algebra and geometry summaries only. POST a JSON body with five required finite numbers: focus_x and focus_y for the focus, and a, b, c for the directrix written as ax plus by plus c equals zero. Each field may arrive as a JSON number or as a numeric string; missing fields, empty strings, and non-finite values fail with invalid_input naming the field. Aliases such as fx, fy, and coeff_a are accepted so homework parsers and notebooks can reuse existing key names. On success the body echoes the focus and line coefficients, provides directrix_equation and equation as display strings, lists the six general-conic coefficients coeff_xx through coeff_const, and returns vertex_x, vertex_y, focal_length, focus_to_directrix_distance, and a unit axis_direction from the vertex toward the focus. Another useful case is a tilted directrix: any a, b not both zero with the focus off the line yields a non-zero xy term, which this endpoint keeps instead of forcing a rotation into axis-aligned form.

Where a focus–directrix parabola API earns its keep

Analytic geometry courses introduce parabolas through focus and directrix before standard forms, so students often have F and the line first and need the equation second. Keep requests small, pin the rounded coefficients and vertex in tests, and you get reproducible parabola equations for homework checks, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own. Tutoring platforms and exam generators can call this endpoint as a deterministic oracle that rejects the on-line focus case instead of silently returning a singular matrix from a hand-rolled expansion. Engineering and optics notes model parabolic mirrors and satellite dishes from a prescribed focus and base line; a tiny parse API avoids pulling a full computer-algebra system for five coefficients.

Exam and LMS auto-grading

Mark parabola-from-definition items with a deterministic oracle that rejects focus-on-directrix as invalid_input instead of a fake curve.

How do I get a parabola equation from a focus and directrix?

Send finite focus_x, focus_y and directrix coefficients a, b, c for ax+by+c=0. The API returns the general conic equation, vertex, and focal length from the equidistance definition.

What equation form is returned?

A general conic Ax² + Bxy + Cy² + Dx + Ey + F = 0 with coefficients coeff_xx … coeff_const, plus a display equation string. Tilted directrices keep a non-zero xy term.

What does the parabola from focus and directrix calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →