Academy
Formulas/maths/3d Geometry/Distance from a Point to a Plane

Distance from a Point to a Plane

Perpendicular distance from point P(x₁, y₁, z₁) to plane ax+by+cz+d=0. The formula is the 3D analogue of the 2D point-to-line distance.
Derivation

Let the plane be ax+by+cz+d=0ax+by+cz+d=0 and the point be P(x1,y1,z1)P(x_1,y_1,z_1).

Method: The normal to the plane has direction (a,b,c)(a,b,c). The line through PP perpendicular to the plane:

xx1a=yy1b=zz1c=t\frac{x-x_1}{a} = \frac{y-y_1}{b} = \frac{z-z_1}{c} = t

Parametric point: (x1+at,y1+bt,z1+ct)(x_1+at, y_1+bt, z_1+ct). Substituting into the plane equation:

a(x1+at)+b(y1+bt)+c(z1+ct)+d=0a(x_1+at)+b(y_1+bt)+c(z_1+ct)+d = 0 (ax1+by1+cz1+d)+t(a2+b2+c2)=0(ax_1+by_1+cz_1+d) + t(a^2+b^2+c^2) = 0 t=ax1+by1+cz1+da2+b2+c2t = -\frac{ax_1+by_1+cz_1+d}{a^2+b^2+c^2}

Distance =ta2+b2+c2= |t| \cdot \sqrt{a^2+b^2+c^2}:

d=ax1+by1+cz1+da2+b2+c2d = \frac{|ax_1+by_1+cz_1+d|}{\sqrt{a^2+b^2+c^2}}

Distance between parallel planes ax+by+cz+d1=0ax+by+cz+d_1=0 and ax+by+cz+d2=0ax+by+cz+d_2=0:

d=d1d2a2+b2+c2d = \frac{|d_1-d_2|}{\sqrt{a^2+b^2+c^2}}

(Distance from origin to each plane, then take the difference — or use the above formula with a point from one plane.)