Skip to content
Omnikalc

Distance from a point to a plane in 3D

Calculate the distance from a point to a plane given by its equation or by three points, with the foot of the perpendicular and the mirror image of the point.

Updated on
Your inputs
Plane given by

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Distance from the point to the plane

4.6667

Shortest distance, measured along the normal
Signed distance (positive on the side the normal points to)
4.6667
Foot of the perpendicular: x
0.8889
Foot of the perpendicular: y
2.5556
Foot of the perpendicular: z
1.8889
Mirror image of the point: x
-2.2222
Mirror image: y
4.1111
Mirror image: z
-1.2222

The shortest way to a plane

In three dimensions, the distance from a point to a plane is the length of the perpendicular dropped from the point onto the plane. It is the shortest of all the distances from the point to points of the plane. This calculation appears in geometry homework, computer graphics, robotics and surveying.

The formula

A plane can be written as ax + by + cz + d = 0, where the vector n = (a, b, c) is perpendicular to the plane. For a point P(x₀, y₀, z₀):

Distance = |ax₀ + by₀ + cz₀ + d| ÷ √(a² + b² + c²)

Without the absolute value, the result is the signed distance: positive on the side the normal vector points to, negative on the other side.

Plane through three points

If the plane is defined by three points P₁, P₂ and P₃, the calculator takes the cross product of P₂ − P₁ and P₃ − P₁ to get a normal vector (a, b, c), then sets d = −(a x₁ + b y₁ + c z₁). If the three points are on one line, the cross product is zero and they do not define a unique plane.

Foot of the perpendicular and reflection

With t = (ax₀ + by₀ + cz₀ + d) ÷ (a² + b² + c²):

  • Foot of the perpendicular (the closest point of the plane): P − t n
  • Mirror image of P through the plane: P − 2t n

Worked example

The plane 2x − y + 2z − 3 = 0 and the point (4, 1, 5):

  • Numerator: 2 × 4 − 1 + 2 × 5 − 3 = 14.
  • Length of the normal: √(4 + 1 + 4) = 3.
  • Distance: 14 ÷ 3 = 4.6667.
  • The signed distance is positive, so the point is on the side the normal (2, −1, 2) points to.
  • t = 14 ÷ 9 = 1.556, so the foot of the perpendicular is (0.8889, 2.5556, 1.8889).
  • The mirror image is (−2.2222, 4.1111, −1.2222).

The same plane passes through (1.5, 0, 0), (0, −3, 0) and (0, 0, 1.5); entering those three points gives the same distance.

Where it is used

  • Computer graphics and games: deciding which side of a wall or clipping plane an object is on, and collision detection.
  • Robotics and CAD: measuring how far a tool or part is from a surface.
  • Surveying and point clouds: fitting a plane to a floor or roof and measuring deviations.
  • Machine learning: the distance from a point to a separating hyperplane is the margin in support vector machines.

In two dimensions the same idea gives the distance from a point to a line, |ax₀ + by₀ + c| ÷ √(a² + b²), available in the point-line distance calculator.

Frequently asked questions

What is the formula for the distance from a point to a plane?

For the plane ax + by + cz + d = 0 and the point (x₀, y₀, z₀): distance = |ax₀ + by₀ + cz₀ + d| ÷ √(a² + b² + c²). The numerator measures how far the point is from satisfying the equation; the denominator normalizes the normal vector.

How do I get the plane from three points?

Take two vectors in the plane, P₂ − P₁ and P₃ − P₁, and compute their cross product to get a normal vector (a, b, c). Then d = −(aX₁ + bY₁ + cZ₁). If the three points are aligned, the cross product is zero and there is no unique plane.

What is the signed distance?

The same value without the absolute value. It is positive if the point is on the side the normal vector points to and negative on the other side. It tells you which side of the plane a point is on.

What are the foot of the perpendicular and the mirror image?

The foot is the point of the plane closest to your point. The mirror image is the reflection of your point through the plane, at the same distance on the other side.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.