Projection in one line
d = |A x₀ + B y₀ + C z₀ + D| / √(A² + B² + C²) is just a dot-product projection onto the plane’s normal—linear algebra hiding as geometry.
P₁, P₂, P₃ must be non-collinear (not on a single line).
Formula (standard form): d = |A x₀ + B y₀ + C z₀ + D| / √(A² + B² + C²).
Toggle Signed distance to see the sign relative to the plane’s normal.
Simple axonometric view. The blue patch is the plane, the red segment is the perpendicular from the point to the plane, and the teal arrow shows the plane’s normal direction.
In analytic geometry, the shortest distance from a point to a plane is measured along a line
that is perpendicular to the plane. If the plane is written in standard form
A x + B y + C z + D = 0 and the point is P = (x₀, y₀, z₀), the (unsigned) distance is
d = |A x₀ + B y₀ + C z₀ + D| / √(A² + B² + C²)
This formula is scale-invariant: multiplying all plane coefficients by the same nonzero number doesn’t
change d, because numerator and denominator scale together. The sign of
A x₀ + B y₀ + C z₀ + D tells you on which side of the oriented plane the point lies; drop the absolute
value to get the signed distance:
dₛ = (A x₀ + B y₀ + C z₀ + D) / √(A² + B² + C²)
The vector n = (A, B, C) is a normal to the plane. Any point Q on the plane satisfies
A Qₓ + B Qᵧ + C Q_z + D = 0. The displacement from Q to P is
v = P − Q. Projecting v onto n gives the component perpendicular to the plane:
(v · n)/‖n‖. Replace v · n with (P · n) − (Q · n) = A x₀ + B y₀ + C z₀ + D and take
absolute value to get the shortest (unsigned) distance. The same projection also yields the
perpendicular foot (closest point) on the plane:
k = (A x₀ + B y₀ + C z₀ + D) / (A² + B² + C²) F = (x₀ − A k, y₀ − B k, z₀ − C k)
Pₚ and normal n,
set (A,B,C) = n and D = −n · Pₚ, then apply the core formula.P₁, P₂, P₃, compute
n = (P₂ − P₁) × (P₃ − P₁), then D = −n · P₁. Collinear or repeated points are invalid.
Let P = (2, −1, 0.5) and the plane 2x − y + 2z − 3 = 0.
Then n = (2, −1, 2), ‖n‖ = √(4 + 1 + 4) = 3, and the numerator is
|2·2 + (−1)·(−1) + 2·0.5 − 3| = |4 + 1 + 1 − 3| = 3.
Therefore d = 3 / 3 = 1.
The foot uses k = (A x₀ + B y₀ + C z₀ + D)/(A²+B²+C²) = 3/9 = 1/3, so
F = (2 − 2·1/3, −1 − (−1)·1/3, 0.5 − 2·1/3) = (4/3, −2/3, −1/6).
A=B=C=0 or a zero normal vector is invalid.(A,B,C) because the formula divides by
‖n‖ automatically.Point-to-plane distance is everywhere: CAD “snap to surface,” camera pose residuals in computer vision, collision detection and steering behaviors in robotics/games, fitting planes to noisy 3D scans, geospatial offsets to terrain surfaces, and quality checks in manufacturing metrology.
Privacy note: everything on this page runs locally in your browser—no inputs are uploaded.
d = |A x₀ + B y₀ + C z₀ + D| / √(A² + B² + C²) is just a dot-product projection onto the plane’s normal—linear algebra hiding as geometry.
Drop the absolute value and you get a signed distance field (SDF) to a plane—core to smooth text, shaders, and collision buffers.
Any three non-collinear points define a unique plane; the normal is the cross product of two edge vectors. Distance piggybacks on that normal.
Multiply A,B,C,D by any nonzero constant and the distance is unchanged—numerator and denominator scale together.
Point-to-plane residuals drive ICP scan matching and plane constraints in SLAM: a tiny distance term helps robots keep their maps aligned.