To calculate the slope of a line you need only two points from that line, (x1, y1) and (x2, y2). The equation used to calculate the slopefrom two points is: On a graph, this can be represented as: There are three steps incalculating the slope of a straight line when you are not given its equation.