Skip to content
Advertisement
Hosinger Special Offer

Slope Calculator

Slope Calculator from Gizcalc helps you estimate results quickly within the Math & Statistics category.

  • Instant results
  • Charts & tables
  • Save & compare
  • Private – runs in your browser
Slope (m) —

Sample inputs are pre-filled so you can see a result quickly. Results are estimates only and may not be accurate because prices, interest rates, taxes, fees, fuel costs, tariffs, market returns, medical costs, and local rules can change. Please verify current values before making financial, tax, legal, medical, or business decisions.

Formula used

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

  • (x₁, y₁), (x₂, y₂) = the two points on the line
  • c = the y-intercept, y₁ − m × x₁
  • θ = the angle with the x-axis, tan⁻¹(m)

About the Slope Calculator

What is the Slope Calculator?

The slope (or gradient) of a line measures how steep it is: how much y changes for each unit change in x, often described as “rise over run”. A positive slope goes up from left to right, a negative slope goes down, zero is flat and a vertical line has an undefined slope.

Enter two points and the calculator finds the slope m, the y-intercept c, the equation y = mx + c and the angle of the line with the x-axis. Slope is used for road and ramp gradients, roof pitch, rates of change and linear trends in data.

How to use the Slope Calculator

  1. x₁ (sample: 2)
  2. y₁ (sample: 3)
  3. x₂ (sample: 6)
  4. y₂ (sample: 11)
  5. Press Find Slope (results also refresh as you type). The result card shows the Slope (m), along with Equation of the line, y-intercept (c), Angle with x-axis and Rise ÷ run.

Formula used

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

  • (x₁, y₁), (x₂, y₂) = the two points on the line
  • c = the y-intercept, y₁ − m × x₁
  • θ = the angle with the x-axis, tan⁻¹(m)

If x₁ = x₂ the line is vertical (x = constant) and its slope is undefined.

Worked example

These are the sample values already filled in the calculator above, and the result it returns for them:

InputSample value
x₁2
y₁3
x₂6
y₂11
ResultValue
Slope (m)2
Equation of the liney = 2x − 1
y-intercept (c)-1
Angle with x-axis63.4349°
Rise ÷ run8 ÷ 4

Tips for using the Slope Calculator

  • A road gradient of 1 in 20 is a slope of 0.05, or 5%.
  • Parallel lines have equal slopes; perpendicular lines have slopes whose product is −1.
  • The order of the points does not matter, as long as you subtract in the same order on the top and bottom.

Frequently asked questions

Divide the change in y by the change in x. For (2, 3) and (6, 11): m = (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2.

Find the slope m, then the intercept c = y₁ − m × x₁. For (2, 3) and (6, 11), m = 2 and c = 3 − 4 = −1, so the line is y = 2x − 1.

A horizontal line has a slope of 0. A vertical line has an undefined slope because the change in x is zero.

The angle is tan⁻¹(m) and the percentage grade is m × 100. A slope of 1 is a 45° angle or a 100% grade.