ForHosting KIT · Math

Line plane intersection calculator

A line from the origin heading along (1, 1, 1) hits the horizontal plane at height 1 at the point (1, 1, 1), with t equal to 1. Enter a point, a direction and the plane coefficients to get the hit. 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
X0
0
Y0
0
Z0
0
Dx
1
Dy
1
Dz
1
You get
T
1
X
1
Y
1
Z
1

A line and a plane in three-dimensional space either meet at exactly one point, never meet because they are parallel, or coincide so that every point of the line lies on the plane. The unique-intersection case is the everyday homework, CAD, and game-engine question: given a known point and direction for the line and the general plane equation ax plus by plus cz plus d equals zero, what are the coordinates of the hit? This capability accepts ten numbers—the line origin (x0, y0, z0), the direction (dx, dy, dz), and the plane coefficients a, b, c, d—rejects a zero direction, a zero plane normal, and any parallel configuration, and returns the parametric parameter t together with the intersection point (x, y, z).

What line–plane intersection is and how the formula works

Write the infinite line in parametric form as a point plus a scalar times a direction: P of t equals (x0, y0, z0) plus t times (dx, dy, dz). Write the infinite plane in general Cartesian form as a times x plus b times y plus c times z plus d equals zero, so the normal vector N equals (a, b, c).

Substituting the parametric point into the plane equation yields N dotted with P of t plus d equals zero, which expands to N dotted with the origin point plus t times (N dotted with D) plus d equals zero. Solving for the free parameter gives t equals minus the residual at the origin divided by the normal-direction product N·D. The intersection coordinates are then x equals x0 plus t times dx, and the same pattern for y and z.

When N·D is approximately zero the line direction is orthogonal to the plane normal, so the line is parallel to the plane: either it never meets the plane or it lies entirely inside it. A classic sanity check is the line through the origin with direction (1, 1, 1) against the horizontal plane z equals one (a equals zero, b equals zero, c equals one, d equals minus one): N·D is one, residual is minus one, t is one, and the hit is (1, 1, 1).

Another check is any line whose direction is horizontal against a horizontal plane at a different height: the engine must fail with a parallel message.

Practical tips, limits, related searches, and when not to use this

If your plane is given by three non-collinear points, form two edge vectors, take their cross product to obtain (a, b, c), then set d so that one of the three points satisfies the equation. If your line is given by two distinct points A and B, set the origin to A and the direction to B minus A.

When teaching, prefer paired examples: origin with direction one-one-one against z equals one for the hit at (1, 1, 1); a vertical line against a tilted plane for a non-unit t; and a horizontal direction against a horizontal plane to demonstrate the hard parallel rejection path. This landing targets people searching for a line plane intersection calculator, 3D parametric line meets plane, or find the intersection point of a line and ax plus by plus cz plus d equals zero.

It is not a ray-clipping tool that stops at a triangle, not a segment-only clip that ignores hits outside [0, 1], and not a 2D line–line intersection helper—those are different search intents with different contracts. Prefer this capability when you already have a point-direction line and the general form of an infinite plane in three dimensions.

Round-trip checks are easy: after solving, plug the returned (x, y, z) back into a x plus b y plus c z plus d and confirm the residual is approximately zero, and confirm that (x, y, z) equals (x0, y0, z0) plus t times (dx, dy, dz) within floating tolerance.

Simple ray or line vs floor, wall, or roof plane

Recover where a directed line meets a construction or game floor plane expressed in general form, with a hard error when the line is parallel.

What is the line–plane intersection formula?

The hit is P(t). If the denominator is zero, the line is parallel.

Why does a parallel line error instead of returning null?

When N·D≈0 there is either no intersection or infinitely many (line in the plane).

Does this clip to a ray or segment?

No. It finds the unique intersection of the infinite line with the infinite plane. Restricting t≥0 (ray) or t∈[0,1] (segment) is a separate filter you can apply on the returned t.

Is the line plane intersection calculator free?

The browser tool is free and runs locally.

What happens if the line is parallel to the plane?

When the direction is at right angles to the plane's normal, the line either never meets the plane or lies entirely inside it. Neither case has a single point, so the input is rejected with a message instead of an invented answer.

How do I use a plane given by three points?

Form two edge vectors from the three points and take their cross product: that gives the coefficients a, b and c. Then choose d so that one of the three points satisfies the equation, and enter the four numbers.

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/line-plane-intersection

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/line-plane-intersection \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"x0":0,"y0":0,"z0":0,"dx":1,"dy":1,"dz":1,"a":0,"b":0,"c":1,"d":-1}'
{
  "x0": 0,
  "y0": 0,
  "z0": 0,
  "dx": 1,
  "dy": 1,
  "dz": 1,
  "a": 0,
  "b": 0,
  "c": 1,
  "d": -1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.line_plane_intersection",
  "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 line–plane intersection is and how the formula works

Both parallel cases destroy uniqueness, so this calculator returns invalid_input instead of inventing a single point. Every step is elementary arithmetic—no iteration, no sampling, no dependence on wall-clock time—so students can recompute t by hand for small integers and match the API line by line.

How to call the API and what comes back

Use it from solid-geometry homework pipelines, ray-versus-floor checks in simple engines, CAD clearance scripts, interview-prep sandboxes, or any workflow that needs a reproducible line–plane hit without installing a computer-algebra package on every machine. Send a JSON body with ten numeric fields. Field x0 is the first coordinate of a known point on the line; aliases px, point_x, and ox are accepted. Field y0 is the second coordinate; aliases py, point_y, and oy map to the same meaning. Field z0 is the third coordinate; aliases pz, point_z, and oz work. Fields dx, dy, and dz are the direction components; aliases vx, dir_x and the corresponding y and z names are accepted. Fields a, b, c, and d are the plane coefficients; aliases A, coeff_a, nx and the matching forms for b, c, and d work. On success the response echoes all ten inputs, adds the parameter t, the hit coordinates x, y, and z, sets parallel to false, and sets method to parametric_dot so callers can assert the algorithm in tests. Failed validation—missing a required field, a non-finite number, a value outside published absolute limits, a zero direction vector, a zero plane normal, or a parallel line where N·D vanishes—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item. There is no language model, no external geometry service, and no randomness, so the capacity is safe to pin in continuous-integration checks and reproducible lesson materials that compare full JSON objects byte for byte.

Practical tips, limits, related searches, and when not to use this

Keep coordinates and coefficients inside the published absolute range suitable for ordinary CAD and classroom figures so intermediate products stay finite in IEEE double precision on the Worker and in the browser. Units are whatever you pass—metres, feet, or game units—as long as the line origin, direction components, and plane coefficients are consistent; the API does not convert units for you. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when users type a parallel direction while learning the contract.

Homework and exam checks for line–plane hits

Give students a parametric line and a plane ax+by+cz+d=0; compare their hand-computed intersection point and parameter t against a deterministic API or free browser result.

CAD, robotics, and mesh tooling fixtures

Scripts that seed unit tests or place anchors where a path meets a planar constraint can call a pure intersection oracle instead of reimplementing the parametric solve in every language.

What if the plane normal is zero?

If a=b=c=0 the equation does not define a plane. The calculator returns invalid_input instead of a meaningless hit point.

Read the full KIT documentation →