Graph your data, either by drawing x- and y-axes on a piece of graph paper or by typing your data into a software program with graphing capabilities. If your data is in a straight line, proceed to step two. If your data is more scattered, use your software to create a best-fit line or, by using a ruler and "eyeballing" your scattered data points, draw a straight line in the closest possible proximity to all points.
Obtain the algebraic expression describing your straight line. If you are working with a software program, use your program to automatically generate a line that fits your data. If you are using graph paper, pick two points from the graph to generate your line. For instance, let's say your points (x1, y1) and (x2, y2) are (0,3) and (3,0). Calculate your slope (m), if you are using graphing paper, using the formula m = (y2 - y1)/(x2 - x1). Your slope, in this case, is equal to (-3)/(3), or -1. Plug the slope, along with either of your points, into the formula y = mx + b, in which b is the y-intercept. If you plug in the point (0,3), you obtain, for your equation, 3 = -1 * 0 + b. B, in this case, is equal to 3. To get the algebraic expression, plug the constants m and b into the equation y = mx + b. In this example, the equation is y = -x + 3.
Obtain the y-intercept and slope for your data. If you used graphing paper, you calculated both of these -- b and m, respectively -- in the previous step. If you used a software program, you can obtain your slope and y-intercept from the line, in the form y = mx + b, that your software program calculated for you. The slope is the "m" constant and the y-intercept is the "b" constant.