Perpendicular Line Calculator: Your Guide to Finding the Equation
ByMuhammad Ali•Founder of KruskalCode
22:00
6 min read

Finding the equation of a perpendicular line is a fundamental skill in algebra and geometry. Whether you're working on homework, preparing for an exam, or just need a quick check, understanding how to derive this equation is crucial. A perpendicular line simply means it crosses another line at a perfect 90-degree angle. This guide, along with our Perpendicular Line Calculator, will walk you through the process step-by-step.
Explanation
Two lines are perpendicular if their slopes are negative reciprocals of each other. For example, if one line has a slope of 'm', the perpendicular line will have a slope of '-1/m'. There are special cases: if a line is horizontal (slope = 0), its perpendicular line is vertical (undefined slope). Conversely, if a line is vertical, its perpendicular is horizontal (slope = 0). Once you have the perpendicular slope and a point the line passes through, you can use the point-slope form (y - y₁ = m(x - x₁)) to find the equation, then convert it to the more common slope-intercept form (y = mx + b).
Formula
To find the equation of a perpendicular line: 1. **Identify the slope of the given line (m).** 2. **Calculate the perpendicular slope (mₚ):** * If m = 0 (horizontal line), mₚ is undefined (vertical line). * If m is undefined (vertical line), mₚ = 0 (horizontal line). * Otherwise, mₚ = -1/m. 3. **Use the point-slope form:** Given a point (x₁, y₁) that the perpendicular line passes through, the equation is: y - y₁ = mₚ(x - x₁). 4. **Convert to slope-intercept form (y = mx + b):** Simplify the point-slope equation to isolate 'y'.
Example
Let's work through an example. Suppose you need to find the equation of a line perpendicular to a line with a slope of -3, and this new line must pass through the point (2, -4). 1. **Given slope (m):** -3 2. **Perpendicular slope (mₚ):** -1/(-3) = 1/3 3. **Using point-slope form with (2, -4) and mₚ = 1/3:** y - (-4) = (1/3)(x - 2) y + 4 = (1/3)x - 2/3 4. **Convert to slope-intercept form:** y = (1/3)x - 2/3 - 4 y = (1/3)x - 2/3 - 12/3 y = (1/3)x - 14/3 So, the equation of the perpendicular line is y = (1/3)x - 14/3.
How to use the related calculator
Using our Perpendicular Line Calculator is straightforward. Simply input the slope of the line you want to be perpendicular to in the 'Slope of the Given Line (m)' field. Then, enter the X and Y coordinates of the point that your new perpendicular line must pass through into the 'X-coordinate of the Point (x₁)' and 'Y-coordinate of the Point (y₁)' fields. Click 'Calculate', and the tool will instantly provide the perpendicular slope and the full equation of the line in slope-intercept form.
Try the related calculator
Open toolFAQ
What's the difference between parallel and perpendicular lines?
Parallel lines never intersect and have the exact same slope. Perpendicular lines intersect at a 90-degree angle, and their slopes are negative reciprocals of each other (unless one is vertical and the other horizontal).
Can I use this for any point and slope?
Yes, this calculator is designed to work for any valid numerical slope and any point in the Cartesian coordinate system. It handles both positive and negative slopes, as well as the special case of a zero slope (horizontal line).
Why do slopes of perpendicular lines multiply to -1?
This property arises from geometric proofs involving right triangles and rotations. When one line is rotated 90 degrees to become perpendicular, its slope changes from 'm' to '-1/m', meaning their product is m * (-1/m) = -1.
Related articles

About the author
Muhammad Ali. Muhammad Ali is a full-stack developer and founder of KruskalCode. He builds SaaS platforms and automation systems with React and Laravel, and helps teams ship fast, scalable tools.
Need a custom calculator, dashboard, or automation workflow? Reach out to KruskalCode.