How to Find Slope on a Scatter Plot Using Rise Over Run

To find the slope on a scatter plot, you first need a line of best fit drawn through your data points, then pick two points on that line and divide the vertical change by the horizontal change. The formula is slope = (y₂ – y₁) / (x₂ – x₁). The process is straightforward once you understand each step, and it works whether you’re drawing the line by eye, calculating it by hand, or using software.

Draw a Line of Best Fit First

A scatter plot on its own doesn’t have a slope. Individual data points are scattered around, and the slope only exists once you have a line running through them. That line, called the line of best fit or regression line, represents the overall trend in your data.

If you’re estimating the line by eye, aim for two things: the line should pass through the center of the cluster of points, and there should be roughly the same number of points above the line as below it. You’re not trying to connect specific dots. You’re drawing a straight line that captures the general direction of the data. Tilt your ruler until the points look evenly distributed on both sides, then draw.

If you need precision rather than an estimate, you’ll want to calculate the line using the least squares method (more on that below) or let software do it for you.

Pick Two Points on the Line

Once your line is drawn, choose two points that sit directly on the line. These don’t have to be actual data points from your scatter plot. In fact, it’s often easier to pick points where the line crosses grid intersections so you can read the coordinates cleanly. The farther apart your two points are, the more accurate your slope calculation will be, since small reading errors matter less over a larger distance.

Label your two points as (x₁, y₁) and (x₂, y₂). It doesn’t matter which one you call “first” or “second,” as long as you stay consistent in the formula.

Use Rise Over Run

The slope formula is:

slope = (y₂ – y₁) / (x₂ – x₁)

This is just rise over run. The numerator (y₂ – y₁) tells you how much the line goes up or down between your two points. The denominator (x₂ – x₁) tells you how far it moves horizontally. Dividing one by the other gives you the steepness of the line.

For example, say your line passes through the points (2, 10) and (8, 40). The rise is 40 – 10 = 30, and the run is 8 – 2 = 6. So the slope is 30 / 6 = 5. If the line goes downward from left to right, your slope will be negative. A line passing through (1, 20) and (5, 8) gives a slope of (8 – 20) / (5 – 1) = -12 / 4 = -3.

What the Slope Actually Tells You

The slope describes how much the y-variable changes for every one-unit increase in the x-variable. If you’re plotting study hours on the x-axis and test scores on the y-axis, a slope of 15 means the model predicts that each additional hour of studying is associated with a 15-point increase in score. A slope of -2 on a plot of temperature vs. ice cream melting time would mean that for every one-degree increase in temperature, melting time decreases by 2 minutes.

Always think about the slope in terms of the units on your axes. The number alone is meaningless without knowing what x and y represent.

Calculating the Slope Precisely

When you draw a line by eye, your slope is an estimate. For an exact answer, you can calculate the least squares regression slope using all of your data points. The formula is:

b = Σ(xᵢ – x̄)(yᵢ – ȳ) / Σ(xᵢ – x̄)²

Here, x̄ and ȳ are the means of your x-values and y-values. For each data point, you subtract the mean from the x-value and the mean from the y-value, multiply those two differences together, and add up all those products. Then you divide by the sum of the squared differences from the x-mean. This method minimizes the total distance between the line and all your data points, giving you the best possible fit.

For a small data set (five or six points), this is doable by hand with a table. List columns for x, y, (x – x̄), (y – ȳ), (x – x̄)(y – ȳ), and (x – x̄)². Fill in each row, sum the last two columns, and divide.

Using Spreadsheet Software

For larger data sets, spreadsheets handle this instantly. In both Excel and Google Sheets, the function is:

=SLOPE(data_y, data_x)

The first argument is the range of cells containing your y-values, and the second is the range of x-values. So if your y-values are in cells B2 through B20 and your x-values are in A2 through A20, you’d type =SLOPE(B2:B20, A2:A20). The result is the exact least squares slope.

Most graphing calculators also have a linear regression function (often labeled LinReg) that outputs the slope and intercept together. On a TI-84, for instance, you enter your data into lists, run the regression, and the slope appears as the “a” or “b” value depending on the model format.

How Slope Relates to Correlation

The slope and the correlation coefficient (r) are related but measure different things. The correlation coefficient tells you how tightly the points cluster around the line, on a scale from -1 to 1. The slope tells you how steeply the line tilts. You can have a strong correlation (points hugging the line closely) with a small slope if the y-values don’t change much per unit of x. The exact relationship is: r = slope × (standard deviation of x / standard deviation of y). A positive slope always means a positive correlation, and a negative slope always means a negative correlation.

Watch for Outliers

A single unusual data point can dramatically change the slope of your line. Points that sit far from the rest of the data, especially those far to the left or right on the x-axis, have outsized influence on where the regression line falls. One extreme point can tilt the line enough that it no longer represents the general trend of the other data. If your slope looks off, scan your scatter plot for points that seem disconnected from the main cluster. Removing or investigating those points may give you a slope that better reflects the actual relationship in your data.

This is also why eyeballing the scatter plot matters even when you’re using software. The calculated slope is always mathematically correct, but it might be telling the story of an outlier rather than the story of your data.