The Short Version
Find the slope using two points, then plug it into point-slope form. That's it. Most people overcomplicate this in class because their teacher makes them memorize five different formulas when two will actually do. Let me walk through how I approach this now that I've graded enough student work to know where everyone trips up.
How To Get An Equation Of A Line From Two Points
Start with two points on the line. I always write them as (x, y) and (x, y) just to keep track. The slope formula is m = (y - y) / (x - x). You subtract y-values from each other and divide by the difference in x-values. Order matters here — if you do y - y you have to also do x - x in the denominator, or your sign flips and you're chasing your tail. Take (3, 7) and (5, 13). Slope is (13 - 7) / (5 - 3) = 6 / 2 = 3. The slope is 3. Now use point-slope form: y - y = m(x - x). Pick whichever point feels easier. Using (3, 7): y - 7 = 3(x - 3). Distribute: y - 7 = 3x - 9. Add 7 to both sides: y = 3x - 2. Done. I used to make students convert everything to slope-intercept form as a final step, but honestly that's mostly tradition at this point. Point-slope form is perfectly valid and often more useful, especially when you're working with real data where the y-intercept doesn't mean anything physically.
What Actually Happens When You Mess Up
I once had a student who kept getting the wrong equation and couldn't figure out why. The problem was subtle. She was given three points and told to find the line of best fit, but she was picking two points at random and calling it a day. She picked (2, 4) and (4, 8) and got y = 2x. Fine line. But the third point was (5, 11), which doesn't sit on that line at all. She was treating a regression problem like a two-point problem. The workaround was just to check every point against the equation you get. Plug each x-value in, see if the y-value matches. If one doesn't, either the line isn't exact (you need least squares) or you made an arithmetic error. In her case it was both. Here's the thing nobody tells you about this: slope-intercept form looks clean but it's actually the most fragile way to write a line equation. If your y-intercept is some ugly decimal like 4.7382, you're going to carry rounding errors through every subsequent calculation. Keep more decimal places or stick with point-slope until the very end. I keep at least four significant figures during intermediate steps and only round at the final answer.
Get the Full Details

When Two Points Aren't Enough
Sometimes you only have one point and a slope, or you have a graph and need to extract both. If you're given a slope and a point, skip the slope formula entirely and go straight to point-slope form. It saves three lines of work and eliminates one place where a sign error can hide. If you're reading a slope off a graph, count the rise over run carefully. Students frequently count the wrong interval — they'll measure between grid lines that aren't actually on the line itself. Mark two clear intersection points on graph paper first, then measure between those. It takes ten extra seconds and prevents about half the errors I see. Vertical lines are the edge case that breaks everything. The slope formula divides by zero when x equals x. There is no slope, no point-slope form, no slope-intercept form. The equation is simply x = that constant x-value. Don't try to force it into y = mx + b. It won't work and anyone who tells you otherwise is either lying or hasn't actually worked with vertical lines in practice.
Advanced Gotcha: Parallel and Perpendicular Lines
Parallel lines have identical slopes. That's straightforward. Perpendicular lines have slopes that are negative reciprocals of each other — multiply them together and you get -1. So if one line has slope 3/4, a perpendicular line has slope -4/3. The trap here is when one slope is zero. A horizontal line (slope 0) is perpendicular to a vertical line (undefined slope). The negative reciprocal rule technically breaks down because you can't take the reciprocal of zero. Just remember the geometric fact directly: horizontal and vertical lines are perpendicular to each other. Don't try to make the algebra work when the algebra refuses to work. I've also seen people confuse perpendicular with parallel when doing word problems. The question will say "a line perpendicular to..." and the student will just copy the same slope. Underline the keyword in the problem. It sounds ridiculous but it cuts down on that specific error by a lot.
Real-World Context
In engineering and data work, you rarely deal with perfect lines. You deal with noisy measurements. The standard approach is linear regression — least squares fitting — which finds the line that minimizes the sum of squared vertical distances from all points. It's not the same as picking two points and connecting them. Picking two points from noisy data can give you a line that looks reasonable but is completely wrong because you happened to pick two points that were both above or both below the true trend. For a quick hand calculation, you can average multiple two-point slopes. Pick several different pairs of points, calculate each slope, then average them. It's not as rigorous as least squares but it's better than arbitrarily choosing two. I used this approach in a lab course when we didn't have spreadsheet software and had to produce fits by hand under time pressure. It took longer than I'd like to admit but the results were acceptable. If you need actual precision with messy data, use a calculator or software. Desmos, GeoGebra, even a basic Excel scatter plot with a trendline will do least squares properly. Don't trust your eyes on a graph to tell you where the line should go. Human pattern recognition is terrible at this without tools.

Quick Reference
Slope formula: m = (y - y) / (x - x) Point-slope form: y - y = m(x - x) Slope-intercept form: y = mx + b
Standard form: Ax + By = C Vertical line: x = a Horizontal line: y = b
Keep these five forms in mind. You don't need to memorize derivations. You need to know which form is useful in which situation. Point-slope is your default. Slope-intercept is what everyone expects to see as a final answer. Standard form matters when you're doing system-of-equations work or when you need integer coefficients. Vertical and horizontal lines are their own category and shouldn't be forced into any of the other forms.