CalculatorSignAll calculators

Find Slope Calculator

Find the slope of a line through two points. See the rise, run, and intercept, with vertical and coincident point cases handled separately.

Find Slope Calculator

Result
—

How do you find the slope between two points?

Subtract the first y value from the second to get the vertical change. Subtract the first x value from the second to get the horizontal change. The slope is vertical change divided by horizontal change. Points (1, 2) and (5, 10) give a rise of 8 and a run of 4, producing slope 2.

Keep the subtraction order consistent

Either point can go first as long as both differences use the same order. Reversing the points in the example gives a vertical change of −8 and a horizontal change of −4. The quotient stays positive. Using one order for y and the reverse order for x would change the sign incorrectly.

Label both points on your diagram before you fill the four fields. Be especially careful with negative values. For a point at x = −3 and another at x = 4, the horizontal difference from the first to the second is 7, because subtracting a negative number adds its magnitude. Plotting the points on a quick sketch can reveal an accidental sign change.

Use the sign to interpret the line

A positive slope means the line increases in y as x increases. A negative slope means it decreases. Points (0, 7) and (3, 1) give a vertical change of −6 over a horizontal change of 3, so the slope is −2. Every one-unit step to the right corresponds to a two-unit drop.

A horizontal line has equal y values at both points. The rise is zero and the run is nonzero, so its slope is zero. A vertical line uses a constant x, making the denominator zero. The calculator reports undefined slope and gives the line as x equal to that constant. Two identical coordinates do not identify a unique line.

Use the intercept to write the equation

For a nonvertical line, write y = mx + b, with m as the slope and b as the y-intercept. Using either point, calculate b = y − mx. In the example with (1, 2) and (5, 10), substituting the first point gives b = 2 − 2 × 1 = 0. The line therefore goes through the origin.

For points (2, 5) and (6, 13), the slope is also 2 but the intercept is 1. The line is parallel to the first example because the slopes match, while the intercepts differ. Substitute the second point back into y = 2x + 1 and check that the expression returns 13.

Interpret slope when axes use different units

On a chart of distance versus time, x could represent seconds and y could represent metres. A slope of two then means two metres per second over the chosen interval. On an ordinary coordinate geometry exercise, the axes often represent abstract numbers without assigned measurement units. Read the axes before stating what the quotient means.

The steepness on the page depends on how the chart is drawn. A chart that stretches one dimension can make a small numerical slope appear steep. Using the actual differences from labeled points gives the slope regardless of how axes are scaled visually. This also helps when points are read from a chart with uneven tick spacing.

Frequently asked questions

How do I find a slope that is a fraction?

Record the vertical and horizontal changes from the detail line. If the vertical change is 3 and the horizontal change is 8, the exact slope is 3/8 and the decimal is 0.375. Simplify the ratio when both differences are integers and have a common factor.

Can I enter two points from a curve?

The result gives the slope of the straight line joining those points. On a curve, this represents average change over the interval, not necessarily the tangent slope at either endpoint. To estimate a local slope, choose points around the location and examine how the quotient changes as they get closer.

How do I tell whether the line goes through the origin?

Check the y-intercept for a nonvertical line. If it equals zero, x = 0 gives y = 0. For a vertical line, compare its fixed x value with zero. An x value of zero describes the vertical axis, which also passes through the origin.

Why is the intercept not one of my y values?

An intercept is the height where x equals zero. If both entered x values differ from zero, neither point needs to appear at that crossing. The calculation extends the straight line to the vertical axis and uses its slope to determine the crossing value.

Does the result measure the angle of a ramp?

The output gives a ratio from the coordinate differences. If both axis measurements use the same length unit and you know which way travel is measured, the ratio can be converted to an angle with arctangent. Use the linked rise-and-run calculator for a physical slope with a grade and angle readout.