Point to Line Distance
The shortest path meets the line at a right angle. Put the point into the slope-intercept form and divide by √(m²+1), which corrects for how steeply the line leans.
Your numbers
Distance
2.2361
x
4
y
9
Formula
Distance = |Slope × x₁ − y₁ + y-intercept| ÷ √(Slope² + 1)
The extra coordinates are the foot of the perpendicular — the closest point on the line itself.
What to enter
| Input | Default | Accepted range |
|---|---|---|
| x₁The horizontal coordinate of the first point. | 6 | No limit |
| y₁The vertical coordinate of the first point. | 8 | No limit |
| SlopeHow much y rises per 1 of x — the m in y = mx + b. | 2 | No limit |
| y-interceptWhere the line crosses the y axis — the b in y = mx + b. | 1 | No limit |
Step by step
Quick reference table
Results when only x₁ changes and everything else stays put.
| x₁ | Distance | x | y |
|---|---|---|---|
| 3 | 0.4472 | 3.4 | 7.8 |
| 4.5 | 0.8944 | 3.7 | 8.4 |
| 6 | 2.2361 | 4 | 9 |
| 9 | 4.9193 | 4.6 | 10.2 |
| 12 | 7.6026 | 5.2 | 11.4 |
What each result means
| Result | At default values |
|---|---|
| DistanceThe straight-line distance between two points. | 2.2361 |
| xThe horizontal position in Cartesian form. | 4 |
| yThe vertical position in Cartesian form. | 9 |
Common mistakes
The extra coordinates are the foot of the perpendicular — the closest point on the line itself.
Glossary
- x₁
- The horizontal coordinate of the first point.
- y₁
- The vertical coordinate of the first point.
- Slope
- How much y rises per 1 of x — the m in y = mx + b.
- y-intercept
- Where the line crosses the y axis — the b in y = mx + b.
- Distance
- The straight-line distance between two points.
- x
- The horizontal position in Cartesian form.
- y
- The vertical position in Cartesian form.
Frequently asked questions
Q. How is Point to Line Distance calculated?
Distance = |Slope × x₁ − y₁ + y-intercept| ÷ √(Slope² + 1) — The shortest path meets the line at a right angle. Put the point into the slope-intercept form and divide by √(m²+1), which corrects for how steeply the line leans.
Q. Can you walk through an example?
With x₁ 6, y₁ 8, Slope 2, y-intercept 1, the answer is Distance 2.2361.
Q. What do I need to enter?
Enter x₁, y₁, Slope, y-intercept. The result recalculates as you type, and an empty box counts as zero.
Q. How much does the answer move if I change a number?
Changing only x₁ moves the answer to x₁ 3 → Distance 0.4472 and x₁ 12 → Distance 7.6026. The table below lays out five steps.
Q. How are the numbers rounded?
Money is shown to the nearest whole unit, percentages to one decimal place and everything else to two. What you see is rounded; the calculation itself carries the unrounded value forward.
Q. Anything to watch out for?
The extra coordinates are the foot of the perpendicular — the closest point on the line itself.
Related calculators
Keep your length units consistent across inputs — mixing centimetres and metres throws results far off.