Point to Line Distance Calculator

    Find the perpendicular distance from a 2D point to a line, using standard form or two points on the line, with signed distance and closest point.

    Line
    Point

    Point to line distance in 2D

    English calculator intent focuses on the perpendicular distance from a point to a line on the coordinate plane. The most common input is line standard form, but two points on the line are also useful for geometry problems.

    d is distance from point (x0, y0) to line Ax + By + C = 0.

    Closest point and signed distance

    • The ordinary distance is always nonnegative.
    • Signed distance shows which side of the line the point is on for the chosen normal direction.
    • The closest point is the foot of the perpendicular from the point to the line.
    • Vertical and horizontal lines are handled by the same standard-form formula.
    This page calculates distance to an infinite 2D line, not to a finite line segment.

    Examples

    PointLineDistance
    (0, 0)3x + 4y -2
    (2, 5)0
    (3, 1)4

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools