are you in calculus or pre-calculus?

In calculus, we find the slope of a line using the derivative. However, this is trivial, since to find the derivative you will need the formula, and in the formula for a line, the slope is glaringly obvious.

In precalculus, we take two points on the line, say (x1,y1) and (x2,y2), the slope is given by the formula, m = (y2 - y1)/(x2 - x1), that is the slope, m, is rise over run, the change in height over the change in horizontal distance travelled.

if you have the equation of the line, the slope is just the coefficient of x

the equation of a line is of the form y = mx + b, where m is the slope, and b is the y-intercept.

e.g. what is the slope of the line y = 5x + 2. answer: 5