Country & language

Sets the currency, units and country-specific rules (tax, VAT, salary) in calculators. General tools stay the same.

Pages that are not translated yet open in English.

↑ ↓ to move · Enter to open · Esc to close

Slope Calculator

Enter two points – or one point and the slope – and get the slope as an exact fraction, the equation in slope-intercept, point-slope and standard form, both intercepts, the angle, the grade and the perpendicular line, each with its working. Vertical and horizontal lines are handled too.

Quick answer: Slope m = (y₂ − y₁) ÷ (x₂ − x₁). Through (2, 3) and (6, 11) that is (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2; the y-intercept is b = 3 − 2 × 2 = −1, so the line is y = 2x − 1, rising at 63.43°.

Updated · Free · No sign-up

Slope Calculator inputs

Result

Slope through (2, 3) and (6, 11)

m = 2

Rising (positive slope)

Slope-intercept form
y = 2x − 1
Angle of inclination
63.4349°
Distance
8.944272
Midpoint
(4, 7)
Point-slope formy − 3 = 2(x − 2)
Standard form2x − y = 1
y-intercept(0, −1)
x-intercept(0.5, 0)
Rise (Δy) / run (Δx)8 / 4
Grade (slope × 100)200%
Perpendicular line through point 1y = −0.5x + 4

Step by step

  1. Rise: Δy = y₂ − y₁ = 11 − 3 = 8
  2. Run: Δx = x₂ − x₁ = 6 − 2 = 4
  3. Slope: m = Δy ÷ Δx = 8 ÷ 4 = 2
  4. y-intercept: b = y₁ − m·x₁ = 3 − 2 × 2 = −1
  5. Equation: y = 2x − 1
  6. Angle: θ = arctan(2) = 63.4349°
  7. Distance: √(4² + 8²) = √80 = 8.944272
  8. Midpoint: ((2 + 6) ÷ 2, (3 + 11) ÷ 2) = (4, 7)

The slope formula

The slope of a line is how far it climbs for every one unit it moves to the right. Pick any two points on it and divide the vertical change by the horizontal change:

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

Any two points on the same straight line give the same answer – that is what makes it straight, and it is the similar-triangles argument behind Common Core 8.EE.B.6. Which point you call “1” does not matter either: (11 − 3) ÷ (6 − 2) and (3 − 11) ÷ (2 − 6) are both 2. What does matter is subtracting in the same order on the top and the bottom.

Worked example 1: two points with negative coordinates

Find the line through (−3, 4) and (5, −2).

  1. Rise: −2 − 4 = −6. Run: 5 − (−3) = 8 – the double minus is where most marks are lost.
  2. Slope: m = −6 ÷ 8 = −0.75, which is −3/4 as a fraction. The line falls from left to right.
  3. Intercept: b = y₁ − m·x₁ = 4 − (−0.75) × (−3) = 4 − 2.25 = 1.75.
  4. Equation: y = −(3/4)x + 1.75. Multiplying through by 4 gives the standard form 3x + 4y = 7.

The calculator adds the angle (−36.87°), the distance between the points (exactly 10, a 6-8-10 right triangle) and the midpoint (1, 1).

Worked example 2: a point and a slope

Homework often gives one point and the slope instead: the line through (4, −1) with slope 3/4. Point-slope form writes it straight down – y + 1 = (3/4)(x − 4) – and expanding gives y = (3/4)x − 3 − 1 = (3/4)x − 4, or 3x − 4y = 16. A second point is one run and one rise away: (4 + 4, −1 + 3) = (8, 2). In the calculator choose “One point and the slope” and type the slope as 3/4, −0.5 or 2 – fractions stay exact.

Forms of the same line

FormEquationExample (through (2, 3) and (6, 11))Use it for
Slope-intercepty = mx + by = 2x − 1Graphing; reading the slope and y-intercept
Point-slopey − y₁ = m(x − x₁)y − 3 = 2(x − 2)Writing a line from one point and the slope
StandardAx + By = C2x − y = 1Whole-number coefficients; simultaneous equations
Verticalx = ax = 4 through (4, 1) and (4, 7)Undefined slope

Slope in the real world: grade, gradient and angle

Off the graph paper, the same number is written three ways. The grade is the slope as a percentage, the gradient is often written “1 in n” (or 1:n), and the angle is arctan(m). A ramp that climbs 0.6 m over 7.2 m of floor has m = 0.6 ÷ 7.2 = 1/12: an 8.33% grade, a 1 in 12 gradient and an angle of only 4.76°.

GradientSlope mGradeAngle
1 in 200.055%2.86°
1 in 120.08338.33%4.76°
1 in 100.110%5.71°
1 in 80.12512.5%7.13°
1 in 40.2525%14.04°
1 in 11100%45°

1 in 12 is the steepest running slope the 2010 ADA Standards allow for a wheelchair ramp (405.2), with at most 760 mm of rise before a landing (405.6). Dubai’s Universal Design Code sets the same 1:12 maximum, and the Dubai Health Authority’s facility guidelines recommend 1:20. Turned around, the slope tells you the floor space a ramp needs: a 600 mm rise at 1 in 12 takes 7.2 m of run, and at 1 in 20 it takes 12 m.

Slope as a rate of change

When x and y measure different things, the slope carries both units. A water tank that holds 1,200 litres at hour 6 and 450 litres at hour 9 has m = (450 − 1,200) ÷ (9 − 6) = −250 litres per hour. The line is y = −250x + 2,700, and its x-intercept, 2,700 ÷ 250 = 10.8, says the tank runs dry at hour 10.8 – 10:48. The calculator still reports an angle (−89.77°), but an angle means nothing here: it changes if you measure in minutes or cubic metres. Read the slope, not the angle, whenever the axes have different units.

Parallel and perpendicular lines

Parallel lines share a slope; perpendicular lines have slopes that multiply to −1. The line through (−3, 4) and (5, −2) has slope −3/4, so a perpendicular has slope 4/3, and through (−3, 4) it is y = (4/3)x + 8. A horizontal line (m = 0) is perpendicular to a vertical one, the one pair where the product rule cannot be written down.

Common mistakes

  • Run over rise: dividing x by y gives the reciprocal – ½ instead of 2.
  • Mixing the order: (11 − 3) ÷ (2 − 6) gives −2, the wrong sign.
  • Calling a vertical line’s slope 0. Zero is horizontal; vertical is undefined.
  • Reading a 100% grade as vertical – it is 45° – or treating a grade in percent as degrees: a 10% road is 5.71°, not 10°.
  • Rounding the slope before finding b: with m = −0.75 the intercept is 1.75 exactly, but a slope of 2/3 rounded to 0.67 puts the point at x = 300 at 201 instead of 200.

When to go further

For maths homework the calculator’s working is enough to check every step. For anything that will be built – a ramp, a driveway, a drainage fall – the slope is only the start: landings, handrails, cross-slope and surface rules come from the local building authority, so check the code that applies to your project or ask the designer before pouring concrete.

Frequently asked questions

What is the slope formula?

m = (y₂ − y₁) ÷ (x₂ − x₁): the change in y (rise) divided by the change in x (run). For (2, 3) and (6, 11), m = 8 ÷ 4 = 2. Either point can be first, as long as the top and bottom subtract in the same order.

How do you find the slope when the points have negative coordinates?

Put each negative in brackets. For (−3, 4) and (5, −2): rise = −2 − 4 = −6, run = 5 − (−3) = 8, so m = −6 ÷ 8 = −3/4 and the line is y = −(3/4)x + 1.75, or 3x + 4y = 7 in standard form.

What do a zero slope and an undefined slope mean?

Zero slope is a horizontal line: (0, 3) and (4, 3) give y = 3. Undefined slope is a vertical line: (4, 1) and (4, 7) have a run of 0, and dividing by 0 has no value, so the equation is just x = 4.

How do you write the equation of a line from a point and the slope?

Start from point-slope form y − y₁ = m(x − x₁), then solve for b. Through (4, −1) with slope 3/4: b = −1 − (3/4) × 4 = −4, so y = (3/4)x − 4, or 3x − 4y = 16. Choose “One point and the slope” in the calculator for this.

How do you convert a slope to an angle?

The angle of inclination is θ = arctan(m), with the calculator in degrees. A slope of 2 is 63.43°, a slope of 1 is 45°, and a 1 in 12 ramp (m = 0.0833) is only 4.76°. Going the other way, m = tan θ, so 30° is a slope of 0.5774.

What is the slope of a perpendicular line?

The negative reciprocal, −1 ÷ m, so the two slopes multiply to −1. Perpendicular to −3/4 is 4/3; through (−3, 4) that line is y = (4/3)x + 8. Parallel lines have the same slope.

Is slope the same as gradient or grade?

Gradient is the British-curriculum word for slope. Grade is the slope × 100 as a percentage: a rise of 0.6 m over 7.2 m is a slope of 1/12, an 8.33% grade, a 1 in 12 gradient and an angle of 4.76°. A 100% grade is 45°, not vertical.

What does the slope mean in a word problem?

It is the rate of change, in y-units per x-unit. A tank that holds 1,200 litres at hour 6 and 450 litres at hour 9 has m = −750 ÷ 3 = −250 litres per hour; the line y = −250x + 2,700 hits 0 at x = 10.8, so it runs dry at 10:48.

What changed

  • – Page fully reviewed and calculator extended: a “one point and the slope” mode (the slope can be typed as a fraction such as 3/4), the gradient as a 1-in-n ratio for gentle slopes, ramp limits from the 2010 ADA Standards and the Dubai Universal Design Code, six worked scenarios, a slope–grade–angle table and the common mistakes.
  • – Compliance with the 2010 ADA Standards for Accessible Design became mandatory in the US, including the 1:12 maximum running slope for ramps (405.2).

Sources

Last reviewed: · Reviewed by Chelsea, CalcBright's animated guide, for the CalcBright editorial team · How we check our numbers