Parallel and perpendicular line calculator
Enter the original line y = mx + b and a point. You get both equations and the perpendicular distance.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter original slope m, original y-intercept b, point x and point y.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
The parallel line keeps slope m and the perpendicular has slope -1/m. Each intercept is b' = y0 - m'·x0. Distance from the point to the line d = |m·x0 - y0 + b| / √(m² + 1).
Example
Inputs: Original slope m = 2, Original y-intercept b = 1, Point x = 1, Point y = 4. Result: Parallel line: y = 2x + 2; Perpendicular slope: -0.5; Distance from point to original line: 0.4472136.
Limits and caveats
- The original line must be in y = mx + b form, so a vertical original line is not supported.
- Fractional slopes are shown as decimals.
Questions about this tool
How can I tell two lines are perpendicular?
Their slopes multiply to -1, like 2 and -0.5.
What is perpendicular to a horizontal line?
A vertical line x = x0, because a horizontal line has slope 0.
What does a distance of zero mean?
The point lies on the original line, so the parallel line is the original line itself.
