This calculator computes the perpendicular distance from a point (x₀, y₀, z₀) to a plane defined by the equation Ax + By + Cz + D = 0. Enter the plane coefficients and the point coordinates, and you get the exact distance in the same units you used for the coordinates.
Formula
The distance from a point to a plane is given by the absolute value of the plane equation evaluated at the point, divided by the norm (length) of the plane’s normal vector. In symbols:
d = |A·x₀ + B·y₀ + C·z₀ + D| / √(A² + B² + C²)
Where:
- A, B, C – coefficients of the plane’s normal vector (unitless in the equation, but they determine the plane’s orientation)
- D – constant term of the plane equation
- x₀, y₀, z₀ – coordinates of the point (in whatever length unit you are using, e.g., meters, feet, etc.)
- d – the perpendicular distance from the point to the plane (same unit as the coordinates)
Worked Example
Using the default values: plane 1x + 2y − 2z + 5 = 0 and point (3, −1, 2).
- Evaluate the plane equation at the point: 1·3 + 2·(−1) − 2·2 + 5 = 3 − 2 − 4 + 5 = 2
- Take absolute value: |2| = 2
- Compute the normal vector length: √(1² + 2² + (−2)²) = √(1 + 4 + 4) = √9 = 3
- Divide: 2 / 3 = 0.6667
The distance is 0.6667 units. This matches the calculator’s output for the defaults.
Why This Formula Works
The plane equation Ax + By + Cz + D = 0 can be rewritten in vector form as n·r = −D, where n = (A, B, C) is the normal vector and r = (x, y, z) is any point on the plane. The signed distance from a point r₀ to the plane is (n·r₀ + D) / |n|. Taking the absolute value gives the perpendicular distance. Intuitively, you project the vector from any plane point to r₀ onto the normal direction; the length of that projection is the distance.
How to Use the Calculator
- Enter the coefficients A, B, C, and D of your plane equation. Make sure the equation is in the standard form Ax + By + Cz + D = 0. If your equation is Ax + By + Cz = D, move D to the left side: Ax + By + Cz − D = 0, so the D input is −D.
- Enter the coordinates of the point. The units of the distance will match the units of the coordinates (e.g., if you enter meters, the distance is in meters).
- Click calculate. The result is the shortest (perpendicular) distance from the point to the plane.
Common Mistakes and Pitfalls
- Sign of D: The most common error is forgetting to move the constant to the correct side. For the plane 2x + 3y − z = 6, the standard form is 2x + 3y − z − 6 = 0, so D = −6, not 6.
- Forgetting the absolute value: The distance must be non-negative. The formula includes absolute value for a reason.
- Normalizing the normal vector incorrectly: You divide by the length of (A, B, C), not by A, B, or C individually.
- Mixing up coordinates: Ensure you enter x, y, z in the correct order. Swapping y and z will give a wrong distance.
When to Use This Calculation
This distance is used in many fields:
- Computer graphics: Determining if a point is on a particular side of a plane (e.g., for clipping, collision detection).
- Physics: Calculating the distance from a charge to a charged plane, or from an object to a surface.
- Engineering: Finding the clearance between a point and a flat surface.
- Mathematics: Solving geometry problems in 3D space, such as distance between parallel planes (use a point on one plane).
Limitations and Extensions
The formula assumes a plane that extends infinitely. For a finite plane (e.g., a rectangle), the perpendicular distance might not be the actual shortest distance if the perpendicular foot falls outside the bounded region; then you need to compute distance to the edges or vertices. Also, the formula works only for Euclidean space; in other metrics, the distance definition changes.
Frequently Asked Questions
What if my plane is given in a different form, like z = mx + ny + c?
Rewrite it as mx + ny − z + c = 0, so A = m, B = n, C = −1, D = c. Then use the formula.
Can I use this for a point and a line in 2D?
Yes, the 2D version is the same formula but with C = 0 (or z coefficient omitted). The distance from (x₀, y₀) to line Ax + By + D = 0 is |Ax₀ + By₀ + D| / √(A² + B²).
What does a distance of zero mean?
It means the point lies exactly on the plane. The plane equation evaluates to zero at that point.
How do I find the distance between two parallel planes?
Pick any point on one plane (e.g., set x = y = 0 and solve for z) and use the formula with the other plane’s equation. The result is the distance between the planes.
Why do I sometimes see the formula with a negative sign?
Some textbooks write the plane equation as Ax + By + Cz = D, giving the numerator as |Ax₀ + By₀ + Cz₀ − D|. Both forms are equivalent; just be consistent with the sign of D.
Related
Formula used
in A | A (plane) | - | 1 | -1000 | 1000 in B | B (plane) | - | 2 | -1000 | 1000 in C | C (plane) | - | -2 | -1000 | 1000 in D | D (plane) | - | 5 | -10000 | 10000 in x0 | Point x | - | 3 | -10000 | 10000 in y0 | Point y | - | -1 | -10000 | 10000 in z0 | Point z | - | 2 | -10000 | 10000 out dist | Distance | units | abs(A*x0 + B*y0 + C*z0 + D) / sqrt(A^2 + B^2 + C^2) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
- Signal to Noise Ratio Calculator: How to Use It10.00 dB
- Pool Table Room Size Calculator: How Much Space?19.0 ft
- Speed of Sound Calculator: Formula & Examples343.21 m/s
- Distance 3D Calculator: Find 3D Distance7.071 units
- Dart Rate Calculator: How It Works
- Bill Rate Calculator: How to Price Your Time79.56 $/hr