Subtract the first x-coordinate from the second x-coordinate to find the change in horizontal distance. For example, if the first point is (1,2) and the second point is (3,8), subtract 1 from 3 to get 2.
Subtract the first y-coordinate from the second y-coordinate to find the change in vertical distance. For example, if the first point is (1,2) and the second point is (3,8), subtract 2 from 8 to get 6.
Divide the vertical change, sometimes called the rise, by the horizontal change, sometimes called the run, to get the slope. In this example, divide 6 by 2 to find the slope equals 3.
Insert the slope for m in the following equation: y = mx+b. In this example, insert 3 for the slope to get y = 3x + b.
Enter the x- and y-coordinates from one point into the equation and solve for b to find the y-intercept because b is the y-intercept. In this example, plug in 1 for x and 2 for y to get 2 = 3*1 + b. Therefore b must be -1 so the y-intercept equals -1.