Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
The shortest distance from a point to a line is always measured perpendicular to the line — not straight to either of its defining points — and finding it requires a specific formula rather than basic distance calculations.
This calculator finds that perpendicular distance from any point to a line defined by two other points, with a full step-by-step solution.
How it works
Enter the coordinates of two points that define the line, plus the coordinates of the point you want to measure from. The calculator applies the standard point-to-line distance formula, which uses the line's direction to find the shortest (perpendicular) distance to the given point.
- Enter line point 1 — x.
- Enter line point 1 — y.
- Enter line point 2 — x.
- Enter line point 2 — y.
- Enter point — x.
- Enter point — y.
- Click Calculate to see your results.
Examples
Distance from (2, 3) to the x-axis
The line through (0, 0) and (4, 0) is the x-axis. The perpendicular distance from the point (2, 3) to this line is exactly 3 — the point's y-coordinate, since the line is horizontal.
Who should use it
- Finding how far a point deviates from a reference line in geometry or physics problems.
- Computing perpendicular offsets in CAD, mapping, or computer graphics applications.
Industry applications
- Geometry and physics education
- CAD, mapping, and computer graphics
Advantages
- Finds the true shortest (perpendicular) distance, not just the distance to one endpoint.
- Includes a complete, formula-based step-by-step solution.
Limitations
- Limited to 2D coordinates — 3D point-to-line distance requires a different formula.
Common mistakes to avoid
- Calculating the distance to one of the line's defining points instead of the true perpendicular distance to the line itself.
- Entering the same point twice for the line, which doesn't define a valid direction.
Best practices
- Double-check that the two points you enter for the line are genuinely distinct and correctly represent the line you intend to measure against.
Tips
- If you already have the line in slope-intercept or standard form rather than two points, pick any two distinct points that satisfy the line's equation to use with this calculator.