Use y=mx+b to calculate the equation of the line, where m represents the slope and b represents the y-intercept. To calculate the equation of the line, use the y=mx+b format.
The slope is equal to the change in y over the change in x or rise over run.
Then change in x is equal to the difference in x-coordinates (also called run), and the change in y is equal to the difference in y-coordinates (also called rise).
Substitute the values of x and y into the equation to find the slope.
Find the slope m.
Find the value of b using the formula for the equation of a line.
Now that the values of m (slope) and b (y-intercept) are known, substitute them into y=mx+b to find the equation of the line.