Perpendicular Line Calculator
Find the line that crosses another at 90° through a point you choose — in every equation form, with the meeting point and the distance.
Describe the line, then name the point
Give the original line in whichever form you already have it — slope and intercept, standard form, or two points on it — and enter the point the perpendicular has to pass through.
Perpendicular line
Enter a line and a point to find the perpendicular through it.
Perpendicular slope
--
Its y-intercept
--
They meet at
--
Distance to the line
--
Check the perpendicular
Three tests the answer has to pass.
Angle of the given line: --
Log these values
- Given slope m
- --
- Perpendicular slope m⊥
- --
- Product m · m⊥
- --
Step-by-step working
Notes on the method will appear here.
Point-slope form
--
The line straight off the rule, before any rearranging.
Standard form
--
Whole-number coefficients, with no fractions left over.
How the perpendicular line calculator works
A perpendicular line calculator finds the equation of a line perpendicular to another line. Perpendicular lines intersect at a 90° angle, and their slopes are negative reciprocals when both slopes are defined. For a line with slope m, the perpendicular slope is −1/m. A point on the new line determines its equation.
Enter the original line and that point, and the calculator returns the perpendicular slope, the equation in slope-intercept, point-slope and standard form, the coordinates where the two lines cross, and the distance from the point to the line. Exactly one perpendicular passes through any given point, so the answer is always a single line.
Read m from the equation, or from the rise over the run between two points.
The perpendicular slope is −1/m, so 3 becomes −1/3 and −2/5 becomes 5/2.
Put the new slope through (x₁, y₁) and rearrange into the form you need.
The formulas involved
Perpendicular slope
m⊥ = −1 ÷ m, so m × m⊥ = −1
Flip the fraction and change the sign. The rule holds whenever both slopes exist.
Point-slope form
y − y₁ = m⊥(x − x₁)
The most direct way to write the answer, since it uses the point exactly as given.
Slope-intercept form
y = m⊥x + (y₁ − m⊥x₁)
Expanding the point-slope form gives the intercept without any extra work.
Distance to the line
d = |Ax₁ + By₁ − C| ÷ √(A² + B²)
Measured along the perpendicular, which is why it is the shortest distance there is.
Slope-free version: for a line written as Ax + By = C, the perpendicular through (x₁, y₁) is Bx − Ay = Bx₁ − Ay₁. This form never divides by zero, so it handles vertical and horizontal lines without a special case — and it is what this calculator uses internally.
Method reference: OpenStax sets out the parallel and perpendicular slope rules, with worked examples through a given point, in Linear Functions.
Input selection guide
Which form is your line in?
Pick the input that matches what you already have rather than converting by hand first — every conversion is a chance to drop a sign. The calculator reads all three forms and reports the answer in all of them.
| Given as | Original slope | Perpendicular slope | Watch for |
|---|---|---|---|
| y = mx + b | m, read directly | −1/m | The intercept b plays no part in the perpendicular slope. |
| Ax + By = C | −A/B | B/A | The minus sign in −A/B is the most commonly dropped step. |
| Two points | (y₂ − y₁)/(x₂ − x₁) | −(x₂ − x₁)/(y₂ − y₁) | Keep the points in the same order in the numerator and denominator. |
| y = k or x = k | 0, or undefined | Undefined, or 0 | The multiply-to-−1 rule does not apply; the answer is x = x₁ or y = y₁. |
Quick sanity check: a perpendicular slope always has the opposite sign to the original. If your line rises and the answer also rises, a sign went missing somewhere.
Worked examples
Perpendicular line examples
Each row is one of the presets above. Load it to see the working, the intersection point, and the distance from the point to the original line.
| Given line | Through | m → m⊥ | Perpendicular | They meet at |
|---|---|---|---|---|
| y = 2x + 3 | (4, 1) | 2 → −1/2 | y = (−1/2)x + 3 | (0, 3) |
| 3x + 4y = 12 | (2, 5) | −3/4 → 4/3 | y = (4/3)x + 7/3 | (8/25, 69/25) |
| Through (1, 2) and (5, 10) | (3, 7) | 2 → −1/2 | y = (−1/2)x + 17/2 | (17/5, 34/5) |
| y = 4 | (2, −1) | 0 → undefined | x = 2 | (2, 4) |
Cleaner working
How to take a negative reciprocal without slipping
Almost every wrong answer here is a sign or a flip, not a misunderstanding. Three habits catch them before they reach the final line.
1. Write it as a fraction first
A slope of 3 is 3/1, which flips cleanly to 1/3. Whole numbers are where the flip is most often forgotten.
2. Do both operations, not one
Negative reciprocal means flip and change sign. Doing only one leaves you with a parallel line or the wrong steepness.
3. Multiply to test it
The two slopes must multiply to exactly −1. It takes a second and catches every flip-or-sign error at once.
Standard form matters: in Ax + By = C the slope is −A/B, not A/B. For 3x + 4y = 12 the slope is −3/4 and the perpendicular slope is 4/3 — a positive answer from a negative original, exactly as the sign check predicts.
Graphing reference: OpenStax works through writing and graphing perpendicular lines through a given point in Graphs of Linear Functions.
Edge cases
When the slope rule runs out
The negative reciprocal needs a slope to work with, and one family of lines does not have one. These are not exceptions to perpendicularity — only to the shortcut used to describe it.
The line is horizontal
Slope 0. Its perpendicular is vertical, written x = x₁, and has no slope to report.
The line is vertical
No slope exists. The perpendicular is the horizontal line y = y₁, with slope exactly 0.
The point is on the line
Perfectly valid. The perpendicular passes through it, the distance is 0, and the meeting point is the point itself.
Interesting fact
The slope rule is a local accident
Multiplying to −1 feels like the definition of perpendicular, but it is really an artefact of describing lines by slope on a flat coordinate grid — an idea only about four centuries old, arriving with Descartes and the marriage of algebra to geometry. The underlying condition is that two directions have a dot product of zero, and that version survives everywhere the slope version fails: vertical lines, three dimensions, and any number of dimensions beyond. It is also why this calculator works from Ax + By = C internally rather than from m, and never has to divide by zero to answer a perfectly ordinary question.
Source: MacTutor History of Mathematics, René Descartes.
Showing your work
What to record alongside the equation
A bare equation is hard to mark and hard to debug. Recording the two slopes and the anchor point makes the reasoning visible and turns a sign slip into a one-line fix.
Minimum working to show
- The original line and where its slope came from
- The negative reciprocal, and the product check m · m⊥ = −1
- The point-slope line before it is rearranged
- The final equation in the form the question asked for
When the context matters
Perpendiculars carry meaning outside the page: the shortest route from a point to a road, a normal to a surface, a bisector in a construction, a residual in a fitted model. In those settings the intersection point is often the answer you actually want, and the equation is only the route to it — so report the coordinates too.
Example line: given y = 2x + 3, m = 2 · m⊥ = −1/2 · check 2 × (−1/2) = −1 ✓ · through (4, 1): y − 1 = −1/2(x − 4) · so y = (−1/2)x + 3 · meets the original at (0, 3).
Common mistakes to avoid
Flipping without negating. The reciprocal of 2 is 1/2, but the perpendicular slope is −1/2. Half the work is the minus sign.
Reusing the original intercept. The new line rarely shares b. Recompute it from the point, never copy it across.
Reading A/B from standard form. In Ax + By = C the slope is −A/B. Dropping that minus produces a plausible but wrong line.
Assuming the point is on the line. It usually is not, and it does not need to be — the perpendicular still exists and meets the line elsewhere.
Frequently Asked Questions
How do you find the equation of a line perpendicular to another line?
Read the slope of the given line, take its negative reciprocal to get the perpendicular slope, then anchor that slope to the point the new line must pass through. Writing y − y₁ = m⊥(x − x₁) in point-slope form and rearranging with a line of algebra gives the slope-intercept form. In the coordinate plane only one line meets a given line at a right angle through a given point, so this procedure always produces a single line equation.
What is the slope of a line perpendicular to y = 2x + 3?
It is −1/2. The negative reciprocal flips the fraction and changes the sign, so a gradient of 2 becomes −1/2, and the product of the two slopes is −1 as it must be for perpendicular lines. Through the point (4, 1) the perpendicular line is y = (−1/2)x + 3 — sharing the y-intercept of the original here purely by coincidence, though their x-intercepts differ — and the intersection of the two lines falls at (0, 3).
Why do the slopes of perpendicular lines multiply to −1?
Rotating a line by 90° in the plane turns its direction vector (1, m) into (−m, 1), whose slope is −1/m. Multiplying the two slopes gives m × (−1/m) = −1 whenever both are defined. Coordinate geometry can also state the condition without slopes at all: two directions are perpendicular when their dot product is zero, which is the version analytic geometry prefers, since it still works for lines running parallel to the y-axis and in three dimensions.
What is perpendicular to a horizontal or a vertical line?
A horizontal line y = k has slope 0, and the line perpendicular to it through the point (x₁, y₁) is the vertical line x = x₁, fixed by the x-coordinate alone. A vertical line runs parallel to the y-axis and has no defined slope, so its perpendicular through the same point is the horizontal line y = y₁, fixed by the y-coordinate. The multiply-to-−1 rule cannot be applied in either case, because one of the two slopes does not exist — the reason this perpendicular line calculator treats these as separate cases rather than dividing by zero.
How do you find the distance from a point to a line?
Drop a perpendicular from the point to the line and measure the segment to where it lands. That landing spot is the foot of the perpendicular, and the shortest distance from the point to the line is |Ax₁ + By₁ − C| ÷ √(A² + B²), built from the coefficients of the two variables in the standard form Ax + By = C. This calculator reports both the foot and the distance, so the number agrees with what you would measure straight off the graph.
Can a perpendicular line be found from two points instead of an equation?
Yes. Two distinct points determine a line, and its slope is the rise over the run between them: (y₂ − y₁) ÷ (x₂ − x₁). No linear equation is needed first — take the negative reciprocal and pass it through the chosen point exactly as before. If the two points share an x-coordinate the line is vertical, and the perpendicular through the given point is horizontal. It is worth keeping the contrast with parallel lines in mind: those copy the slope unchanged, while a perpendicular flips it and reverses the sign.
Before you submit the answer
- The original slope was read with its correct sign
- The new slope was both flipped and negated
- The two slopes multiply to exactly −1
- The given point satisfies the final equation
- The intercept was recomputed, not carried over
- The answer is in the form the question asked for
Other useful calculators
Stride Length Calculator
Find your step length and turn step counts into distance.
Marathon Pace Calculator
Plan splits and finish times for your target marathon pace.
Bike Gear Calculator
Compare gear ratios, development, and cadence versus speed.
Batting Average Calculator
Work out batting average from hits and official at-bats.
Meeting Cost Calculator
Price the labor and annual cost of a recurring meeting.
Winch Size Calculator
Size a winch from vehicle weight and pulling conditions.
Disclaimer
This calculator works with straight lines in the two-dimensional Cartesian plane. Curves, line segments with endpoints, planes in three dimensions, and lines described in polar or parametric form are outside its scope.
Slopes, intercepts and intersection points are computed in exact rational arithmetic, so they are exact for any rational input. The distance from the point to the line involves a square root and is reported as a rounded decimal.
Perpendicularity as computed here assumes the usual right-angled axes with equal scales. On a graph with stretched or unequal axes, two lines whose slopes multiply to −1 will not appear to meet at 90°, even though they are perpendicular in the coordinate system.
Last updated
Formulas, worked examples, and references checked on this date.