About the Point to Line Distance Calculator
The shortest path from a point to a straight line is the one that meets the line at a right angle. This calculator finds that distance and the point where the perpendicular meets the line. You can describe the line with an equation ax + by + c = 0 or with two points on it, and it tells you which side of the line the point is on. Type the point and the line and the distance from a point to a line appears at once, with a few related figures underneath, and you can copy the result with one tap. The sums run in your browser, so nothing you enter is uploaded.
Updated October 2026
How to use the Point to Line Distance Calculator
- 1Enter the point and the line.
- 2Pick the units or options from the menus if the distance from a point to a line tool offers them.
- 3Read the distance from a point to a line in the large result box.
- 4Look at the extra rows for related figures.
- 5Press Copy result to keep the answer.
When you need the distance from a point to a line
It is used in geometry homework, in design and drawing to place an item a set distance from a wall, in map software and in computer graphics.
A larger distance from a line means a larger absolute value of ax₀ + by₀ + c. The sign of that value, before taking the absolute value, tells the side of the line. Zero means the point sits on the line.
How the distance from a point to a line is worked out
Distance = |a·x₀ + b·y₀ + c| ÷ √(a² + b²). The nearest point is (x₀ − a·s, y₀ − b·s), where s = (a·x₀ + b·y₀ + c) ÷ (a² + b²). For the origin (0, 0) and the line 3x + 4y − 10 = 0, the distance is |−10| ÷ 5 = 2. The nearest point on the line is (1.2, 1.6).
Every answer on this page comes from that one rule, so you can check any result by hand with a calculator. The figures shown underneath, such as other units, are conversions of the same answer.
- Equation or two-point input
- Shows the nearest point
- Tells which side of the line
Mistakes to avoid with distance from a point to a line
The numbers a and b must not both be zero. If you have the line in slope form y = mx + k, rewrite it as mx − y + k = 0 before using the equation mode. Two points must be different.
On phone and computer
On a phone, type into the boxes one after another and read the distance from a point to a line underneath; Copy result puts it on the clipboard for a message or a note. On a computer the inputs sit on the left and the answer on the right, so you can change one figure and watch the distance from a point to a line move. The point to line distance calculator works the same on both.
Checking your distance from a point to a line by hand
A good habit is to test the point to line distance calculator with a case you already know. For the origin (0, 0) and the line 3x + 4y − 10 = 0, the distance is |−10| ÷ 5 = 2. The nearest point on the line is (1.2, 1.6).
If your own figures give a surprising answer, repeat the working yourself: Distance = |a·x₀ + b·y₀ + c| ÷ √(a² + b²). The nearest point is (x₀ − a·s, y₀ − b·s), where s = (a·x₀ + b·y₀ + c) ÷ (a² + b²). Small differences usually come from rounding, from mixing units, or from a typing slip in one of the inputs. Distance to a line is handy next to other geometry tools. Use the Distance Calculator for two points, the Slope Calculator for a line's steepness, and the Line Intersection Calculator for where two lines meet.
Features
- a and b not both zero
- Convert slope form first
- Distance is never negative
- Clear messages when the distance from a point to a line inputs make no sense
- Copy the result with one tap
- Private: nothing is uploaded
Frequently asked questions
How do I calculate distance from a point to a line?
Distance = |a·x₀ + b·y₀ + c| ÷ √(a² + b²). The nearest point is (x₀ − a·s, y₀ − b·s), where s = (a·x₀ + b·y₀ + c) ÷ (a² + b²). For the origin (0, 0) and the line 3x + 4y − 10 = 0, the distance is |−10| ÷ 5 = 2. The nearest point on the line is (1.2, 1.6).
What is the formula for distance from a point to a line?
Distance = |a·x₀ + b·y₀ + c| ÷ √(a² + b²). The nearest point is (x₀ − a·s, y₀ − b·s), where s = (a·x₀ + b·y₀ + c) ÷ (a² + b²). The point to line distance calculator applies it exactly and rounds only the displayed answer to six significant figures.
What if the point is on the line?
Then the distance is 0.
How do I turn y = mx + k into a, b and c?
Use a = m, b = −1 and c = k.
Is this the same as the distance between two points?
No. It is the shortest distance to a whole line, which is always a right-angle path.
Is this point to line distance calculator free and private?
Yes. It is free, needs no account and runs in your browser, so the numbers you type are not uploaded or stored.