We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Free online point to line distance calculator. Quickly calculate the perpendicular distance from a point to a line using two-point or general equation (Ax+By+C=0) forms.
Formulas
d = |A·x₀ + B·y₀ + C| / √(A² + B²)
Foot of Perpendicular Coordinates: x_f = x₀ − A·(A·x₀ + B·y₀ + C)/(A² + B²), y_f similarly
Two-point form can be converted to general form: A = y₂ − y₁, B = −(x₂ − x₁), C = x₂·y₁ − x₁·y₂
3x + 4y − 12 = 0(1.6, 1.8)Overview
Understand what the tool solves, how it works, and the boundaries of its data.
Point-to-line distance is the length of the perpendicular segment from a point to an infinite straight line. For a point P(x₀,y₀) and a line Ax + By + C = 0, the distance is:
The numerator is the absolute value of the line expression at the point. The denominator normalizes by the length of the line's normal vector (A,B). This calculation is for two-dimensional coordinates; it does not measure distance to a 3D line or to a finite line segment.
Use general form when you know A, B, and C. Or define the line with two distinct points (x₁,y₁) and (x₂,y₂); the tool converts them to equivalent coefficients A = y₂ − y₁, B = x₁ − x₂, and C = x₂y₁ − x₁y₂. The result also gives the derived line equation and foot H, where the perpendicular from the target point meets the line. The University of Manitoba's linear algebra text derives this distance from orthogonal projection.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Choose general form for a line equation Ax + By + C = 0, or choose the two-point option if you have two points on the line.
Enter the target point P₀ and the line coefficients or both line points. Use finite numeric values and keep every coordinate in the same coordinate system and unit.
Read the perpendicular distance, converted line equation, and foot H. To check H, substitute its coordinates into the line equation; the left side should be zero apart from display rounding.
Example: P(2,3) and 3x + 4y − 10 = 0 give |6 + 12 − 10|/√(9 + 16) = 8/5 = 1.6 coordinate units. If the coordinates are in feet, the distance is in feet; if they are unitless, the result is unitless.
Use cases
See how the tool fits into real work and everyday tasks.
Enter the point and the line in the form used by the problem, then compare the result with a hand calculation. Pay particular attention to the sign of C before taking the absolute value.
When a baseline is defined by two points, use that mode to see the perpendicular offset and foot. Keep drawing coordinates in one unit, such as inches throughout or millimeters throughout.
A perpendicular foot can lie beyond the two points you entered because those points define an infinite line. If your question is about the nearest point on only the segment between them, this line calculator answers a different geometry problem.
Q&A
Find concise answers to common questions and confusing cases.
Yes. One may be zero for a horizontal or vertical line. They cannot both be zero, because that leaves no line direction for the equation.
One point alone does not determine a unique line. Enter two distinct coordinates or switch to general form.
Multiplying all three coefficients by the same nonzero factor represents the same line. The numerator and denominator scale together, so the distance is unchanged.
Very small floating-point differences can be rounded. The result display uses a tolerance for deciding whether the point lies on the line, so check the original inputs when a near-zero value matters.
Notes
Review scope, result limitations, and important precautions before use.
All inputs must describe one 2D Cartesian coordinate system. The distance inherits the coordinate unit; the calculator cannot reconcile mixed units or infer a real-world scale. Displayed values are rounded to six significant figures, very small and very large values may use scientific notation, and near-zero classification uses a numerical tolerance. For surveying, CAD tolerances, or other consequential measurements, verify coordinates, units, and required precision in the governing workflow.
Related
Discover related tools, collections, and available API capabilities.