Skip to content
Math

Perpendicular Line Calculator

Enter your original line and the point the perpendicular must pass through. Choose slope-intercept form (y = mx + b), two-point form, or standard form (Ax + By + C = 0) as your input method. The calculator instantly returns the perpendicular slope, the full equation of the new line, the intersection point of the two lines, the distance from your point to the original line, and a step-by-step worked solution.

Your details

Choose how you will describe the original line.
The slope of the original line in y = mx + b.
The y-intercept of the original line.
The perpendicular line will pass through this point.
The perpendicular line will pass through this point.
Perpendicular slope
-0.5

Negative reciprocal of the original slope

Perpendicular line equationy = -0.5x + 2.5
Standard formx+2y - 5 = 0
Original line equationy = 2x + 1
Intersection x0.6
Intersection y2.2
Distance from P to line 12.6833
Original slope2
Original slope2
Perpendicular slope-0.5

Perpendicular line: y = -0.5x + 2.5

  • The original line has slope 2. Its perpendicular slope is the negative reciprocal: -0.5.
  • The two slopes multiply to -1, confirming the lines meet at a 90-degree angle.
  • The two lines intersect at the point (0.6, 2.2).
  • The shortest distance from point P to the original line is 2.6833 units, measured along the perpendicular.

Next stepTo confirm your answer, verify that the two slopes multiply to exactly -1, and that substituting the given point into your perpendicular equation gives the correct y-value.

What is a perpendicular line?

Two lines are perpendicular when they meet at exactly 90 degrees. In coordinate geometry, the key relationship is between their slopes: if line 1 has slope m, the perpendicular line has slope -1/m (the negative reciprocal). This means the product of the two slopes always equals -1, a fact you can use to check any answer. Horizontal lines (slope = 0) are perpendicular to vertical lines (undefined slope), which is the only exception to the -1/m rule.

How to find the equation of a perpendicular line

The process has three steps. First, find the slope of the original line, from its equation or from two points on it. Second, take its negative reciprocal to get the perpendicular slope: flip the fraction and change the sign. Third, substitute the perpendicular slope and the given point (px, py) into point-slope form, then simplify to slope-intercept form y = mx + b. For example, if the original line has slope 2 and the perpendicular must pass through (3, 1), the perpendicular slope is -1/2 and its equation is y = -0.5x + 2.5.

Intersection point and distance from a point to a line

This calculator also finds where the two lines intersect. Setting the two equations equal and solving for x gives the intersection x-coordinate; substituting back gives the y-coordinate. A related quantity is the shortest distance from the given point to the original line. Because the perpendicular is the shortest path between a point and a line, that distance equals the length of the segment from (px, py) to the intersection point, and is given by |m*px - py + b| / sqrt(m^2 + 1) using the point-to-line distance formula.

Input formats supported

The calculator accepts three common ways to describe the original line. Slope-intercept form (y = mx + b) is the most direct: enter m and b. Two-point form lets you describe the line by any two points it passes through, and the calculator derives the slope and intercept for you. Standard form (Ax + By + C = 0) converts to slope-intercept internally using m = -A/B and b = -C/B. All three modes share the same point input for (px, py) and produce the same set of outputs.

Perpendicular slope quick reference

Original slope (m)Perpendicular slope (-1/m)Angle between lines
1-190 deg
2-0.590 deg
3-1/3 (~-0.333)90 deg
0.5-290 deg
0.25-490 deg
-1190 deg
-31/3 (~0.333)90 deg
Vertical (undef.)090 deg
0Vertical (undef.)90 deg

Common slopes and their perpendicular (negative reciprocal) equivalents.

Frequently asked questions

How do I find the slope of a perpendicular line?

Take the negative reciprocal of the original slope. If the original slope is m, the perpendicular slope is -1/m. For example, a slope of 3 gives a perpendicular slope of -1/3, and a slope of -2/5 gives a perpendicular slope of 5/2. You can verify the answer by multiplying the two slopes together: the product must equal -1.

What happens when the original line is horizontal or vertical?

A horizontal line has slope 0 and its perpendicular is vertical (undefined slope). A vertical line has an undefined slope and its perpendicular is horizontal (slope 0). The -1/m rule breaks down in these cases because dividing by zero is undefined, but the geometric relationship still holds: the two lines still meet at 90 degrees.

How do I convert a line from standard form Ax + By + C = 0 to slope-intercept?

Rearrange by moving all terms except the y-term to the right side, then divide through by B. This gives y = (-A/B)x + (-C/B), so the slope is -A/B and the y-intercept is -C/B. For example, 3x - y + 2 = 0 has slope -3/(-1) = 3 and y-intercept -2/(-1) = 2, so the line is y = 3x + 2.

What is the point-to-line distance formula?

The shortest distance from a point (px, py) to the line y = mx + b is |m*px - py + b| divided by the square root of (m^2 + 1). This is equivalent to the distance along the perpendicular from the point to the line. This calculator computes that distance automatically.

Can two perpendicular lines have the same y-intercept?

Yes, if they both cross the y-axis at the same point they share a y-intercept. That happens when the given point P lies on the y-axis (px = 0). In that case the perpendicular line starts at (0, py), and if py also equals the original line's y-intercept b, then b is shared by both lines.

How do I check if two lines are perpendicular?

Multiply their slopes. If the product equals exactly -1 the lines are perpendicular. Alternatively, compare the slopes directly: each should be the negative reciprocal of the other. For near-numeric answers, a product within 0.001 of -1 is usually due to rounding.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…