MATH

Slope Calculator

Calculate slope from two coordinate points using rise over run.

Formula

Slope = (y₂ − y₁) ÷ (x₂ − x₁). If both x-values are equal, the line is vertical and its slope is undefined.

Complete guide to slope

Slope measures how steeply a straight line rises or falls on a coordinate plane. It compares the change in the vertical coordinate with the change in the horizontal coordinate, which is why it is often called “rise over run.” It is used in algebra, graphing, data analysis, gradients and rates of change. Coordinate slope is not automatically the same as a road grade or a physical angle; interpret the units and context carefully.

Formula

m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ run

Here, (x₁, y₁) is the first point and (x₂, y₂) is the second. Subtract the first y-coordinate from the second to find rise, and subtract the first x-coordinate from the second to find run. Divide rise by run. Reversing the order of both subtractions gives the same slope, provided the order is consistent.

How to use the calculator

  1. Enter the first point’s coordinates in x₁ and y₁.
  2. Enter the second point’s coordinates in x₂ and y₂.
  3. Choose Calculate Slope to see slope, rise and run.
  4. Confirm both points use the same coordinate system and the x-values are not equal.

Worked example

For points (1, 2) and (5, 10), rise = 10 − 2 = 8 and run = 5 − 1 = 4. Therefore m = 8 ÷ 4 = 2. Along this line, y increases by 2 units for every 1-unit increase in x. A slope of −2 means y decreases by 2 for each one-unit increase in x. A slope of zero describes a horizontal line.

Understanding the result and line equation

For a non-vertical line, point-slope form is y − y₁ = m(x − x₁). To express it as y = mx + b, calculate b = y₁ − mx₁. With slope 2 and point (1, 2), b = 0, so the line is y = 2x.

Common mistakes and limitations

Do not mix coordinate units or reverse only one subtraction. If x and y represent different physical units, the slope carries those units—for example, metres per second. Visual steepness can be misleading when graph axes use different scales. For a curved graph, slope between two points is the average rate over that interval, not necessarily the instantaneous slope at either point. This tool calculates a straight-line slope from two points; it does not infer a best-fit regression line from a full data set.

Related calculators

Linear Equation · Quadratic Equation · Pythagorean Theorem

From slope to a line equation

Once the slope m is known, substitute one point into y − y₁ = m(x − x₁) to write the line in point-slope form. For slope 2 through (1, 2), the equation is y − 2 = 2(x − 1), which simplifies to y = 2x. The same line equation can be checked by substituting both original points.

Special cases to remember

Two-point slope describes the straight line through those points. It is not a regression result for a noisy data set, and for a curve it represents an average rate over the interval rather than necessarily the instantaneous rate at a point.