CalculatorSignAll calculators

Finding a Perpendicular Line’s Slope Calculator

Find the slope of a line perpendicular to two entered points and show its equation block through your chosen anchor point.

Finding a Perpendicular Line’s Slope Calculator

Result
—

Use this calculator on your site

Paste the full code, including the CalculatorSign credit, into a Custom HTML block on your site.

Preview widget

Find the slope of a line that meets another line at a right angle. Enter two distinct points on the original line. Then give an anchor point through which the perpendicular line should pass. The calculator shows the perpendicular slope or the vertical case, along with the original slope and the new line's intercept where those values are defined.

The two original points determine direction. The anchor determines where the new line sits. You can place the anchor on the original line or away from it. As long as the original direction stays fixed, changing the anchor moves the perpendicular line while leaving its direction the same.

Rotate the line direction by a right angle

Start by subtracting the first x coordinate from the second x coordinate. Call that the run. Subtract the first y coordinate from the second y coordinate to get the rise. For a line with nonzero run, its slope is rise divided by run.

For an ordinary sloped line with both nonzero rise and run, a perpendicular line has slope equal to negative run divided by rise. This is called the negative reciprocal. The two slopes multiply to negative one. Another way to see the change is to rotate a direction vector by a quarter turn. A vector with components run and rise turns into one with components negative rise and run.

Once the new slope is known, the anchor gives its location. To find the y-intercept, multiply the perpendicular slope by the anchor x and subtract that product from the anchor y. The resulting line can be written in slope-intercept form by multiplying x by the new slope and adding the intercept.

Worked example through a separate anchor point

Take original points at (0, 2) and (4, 5). The run is four and the rise is three, giving slope 3/4, or 0.75. The perpendicular slope is negative 4/3, displayed as approximately negative 1.333333333.

Use the anchor (3, negative 1). Multiplying the new slope by three gives negative four. Subtracting negative four from the anchor y of negative one yields a y-intercept of three. The new line can therefore be written as y equals negative four thirds times x plus three.

Check the anchor directly. At x equal to three, the expression gives negative four plus three, or negative one, as required. The product of 3/4 and negative 4/3 is negative one. Together these checks confirm that the new line passes through the intended point and has a direction perpendicular to the original.

Handle vertical and horizontal original lines

When both original y coordinates match, the line is horizontal. Its perpendicular is vertical, so it has no finite slope. The calculator reports a vertical perpendicular and writes x as the anchor's x coordinate. Every point on that new line has the same x value.

When both original x coordinates match and the y values differ, the original line is vertical. The perpendicular is horizontal and has slope zero. Its y-intercept is the anchor y. This case is valid even though the original slope cannot be expressed as a finite number.

If both coordinates match in both rows, there is only one point. You cannot infer a direction from that alone. You need a different point or an independently stated direction before there can be a perpendicular slope. Reversing the order of two distinct points is fine because both the rise and run switch signs together.

Use consistent coordinate units when interpreting a right angle. A graph drawn with different visual scales can make perpendicular mathematical lines look unlike a right angle on the screen. If coordinates represent physical distances, convert the axes to compatible length units before using the formula for a physical layout.

For a drawing check, move three units right and four units down from the example anchor. That gives another point on the new line. The original line moves four units right and three up over a corresponding direction step, making the two direction changes visibly different.

Frequently asked questions

Does a perpendicular slope have to be negative?

Its sign is opposite the original slope when both directions have finite nonzero slopes. A negative original slope therefore gives a positive perpendicular slope.

Can I move the anchor onto another point after calculating?

Enter the new anchor and recalculate. The direction stays the same, while the intercept or constant x can shift.

Why is the result sometimes given as a long decimal?

A fraction such as four thirds repeats in decimal form. Keep the negative run over the rise in a written answer when a problem asks for the exact fraction.

How can I find the perpendicular through one of the two original points?

Copy that point into the anchor fields while leaving both original points entered. The new line will meet the original there at a right angle.