Formula and Method for Distance from a Point to a Plane
In three dimensions, a plane can be written in general (standard) form as Ax + By + Cz + D = 0, where the vector n = (A, B, C) is the plane's normal vector — a vector perpendicular to every line that lies in the plane. Given a point P₀ = (x₀, y₀, z₀) that may or may not sit on the plane, the shortest (perpendicular) distance between P₀ and the plane is:
d = |Ax₀ + By₀ + Cz₀ + D| / √(A² + B² + C²)
The numerator substitutes the point's coordinates into the plane's equation — this is zero exactly when the point lies on the plane. The denominator normalizes that value by the length of the normal vector, converting it from an arbitrary scale into an actual Euclidean distance. This calculator also reports the closest point on the plane (the foot of the perpendicular dropped from P₀) and the signed value of the numerator, which tells you which side of the plane the point falls on.
How the calculation works
Enter the point's x, y, and z coordinates and the four plane coefficients A, B, C, and D from the equation Ax + By + Cz + D = 0. The calculator first evaluates the linear expression A·x₀ + B·y₀ + C·z₀ + D, then divides its absolute value by √(A² + B² + C²) to get the distance. To locate the closest point on the plane, it computes t = (A·x₀ + B·y₀ + C·z₀ + D) / (A² + B² + C²) and then moves from P₀ backward along the normal direction: (x₀ − A·t, y₀ − B·t, z₀ − C·t). That point always satisfies the plane equation exactly and is the unique nearest point to P₀.
Where the formula comes from
Pick any point Q on the plane. The vector from Q to P₀ can be split into a part parallel to the plane and a part parallel to the normal vector n. Only the component along n contributes to the perpendicular distance, and that component is found by projecting (P₀ − Q) onto the unit normal n/|n|. Because Q lies on the plane, AQx + BQy + CQz = −D, and expanding the dot product (P₀ − Q)·n / |n| simplifies directly to (Ax₀ + By₀ + Cz₀ + D) / √(A² + B² + C²) — the Q terms cancel out, which is why you never need to know a specific point on the plane to use the formula.
Common mistakes
- Skipping the normalization: |Ax₀ + By₀ + Cz₀ + D| alone is not the distance unless A² + B² + C² already equals 1 — you must divide by √(A² + B² + C²).
- Starting from three points instead of coefficients: if you only have three points on the plane, first find the normal vector via the cross product of two edge vectors, then derive A, B, C, D before using this formula.
- Sign convention mix-ups: some textbooks write planes as Ax + By + Cz = D instead of Ax + By + Cz + D = 0 — flip the sign of D when converting between the two forms, or the distance and the side-of-plane sign will be wrong.
Real-world applications
- Computer graphics and game engines use point-to-plane distance for clipping planes, camera frustum culling, and collision detection against flat surfaces.
- Robotics and CAD/CAM systems check clearance between a tool tip or sensor and a reference surface modeled as a plane.
- Structural and civil engineering use it to measure how far a survey point deviates from a designed flat surface, such as a foundation or roof plane.
- Geology and mining use it to find the distance from a borehole or sample point to a modeled fault or bedding plane.