Slope Calculator

First point
Second point
Slope (m)
—
Line equation, angle, grade, distance, midpoint, and intercepts
Line equation—
Angle & grade—
Distance (d)—
Midpoint—
Intercepts—
-4-2024-2-1012Click grid to plot points

Slope Calculator with Live Graph and Step-by-Step Work

Find the slope of a line from two points, one point and an angle, rise and run, or any linear equation. This slope calculator plots your line on a draggable coordinate graph and shows the exact equation, angle, grade, and worked steps.

Graph paper on a desk plotting points (1, 2) and (5, 5) with a dashed rise of 3, run of 4, slope m = 3/4 (0.75), and line equation y = (3/4)x + 5/4.

Common Slopes, Grades, and Angles

Quick reference from sidewalk drainage to pitched roofs. Every row matches the calculator above.

Comparison of common slopes by ratio, percent grade, angle in degrees, roof pitch, and typical use
Common SlopeRatioGradeAngleRoof PitchTypical Use
ADA cross slope1 : 482.08%1.19°0.25 : 12Sidewalk drainage tilt
5% walkway or hill1 : 205.00%2.86°0.6 : 12ADA ramp cutoff / highway grade
ADA wheelchair ramp1 : 128.33%4.76°1 : 12Maximum accessible ramp slope
Standard pitched roof1 : 333.33%18.43°4 : 12Walkable residential shingle roof
3-4-5 example1 : 1.3375.00%36.87°9 : 12Steep roof / (1, 2) to (5, 5)
Equal rise and run1 : 1100.00%45.00°12 : 12100% grade is 45°, not 90°

Accessibility figures follow U.S. Access Board ADA standards (opens in a new tab) (§405.2 and §405.3); highway signs follow the FHWA MUTCD 11th Edition (opens in a new tab) (§2C.14).

Where This Slope Calculator Helps Most

A ruled sheet solving points (1, 2) and (5, 5): slope m = 3/4 (0.75), line equation y = (3/4)x + 5/4, distance 5, and midpoint (3, 3.5).

Two Points to Slope, Distance, and a Live Graph

Enter two points and read the slope, distance, midpoint, and line equation on one screen. For (1, 2) and (5, 5), you get m = 3/4 (0.75) and a distance of 5. Drag any plotted point on the graph to watch the line tilt and the numbers update as you move.

A sticky note rearranging 3x - 4y = -5 into y = (3/4)x + 5/4, with slope 3/4, y-intercept (0, 1.25), and x-intercept (-1.6667, 0) highlighted.

Rearrange Line Equations or Find a Second Point

Already have an equation like 3x - 4y = -5? Switch to From line equation to turn it straight into y = (3/4)x + 5/4 with both intercepts. If you only have one point and a slope or angle, use From 1 point & slope to get the equation, or add a distance to find both endpoints along the line.

A clipped spec card showing a right triangle with rise 3, run 4, and slope length 5, converted to 75% grade, 36.87 degrees, 1 : 1.33 ratio, and 9 : 12 roof pitch.

Check Ramps, Roofs, and Road Grades in One Step

For physical projects, pick From rise & run and enter any two of height, horizontal run, and slope length in the same unit. A rise of 3 and run of 4 converts into a 75% grade, 36.87° angle, and 9 : 12 roof pitch. It is an easy way to check the ADA 1:12 wheelchair ramp limit (opens in a new tab) (8.33%), or switch to the ratio calculator for other mixes and scales.

Four Types of Slope and Two Common Traps

m > 0

Positive Slope

The line climbs from left to right. Higher values mean a steeper climb.

m < 0

Negative Slope

The line drops from left to right, shown with a negative angle and grade.

m = 0

Zero Slope

A flat horizontal line like y = 2 has no rise at all, so its slope is 0 and its angle is 0°.

Watch out

Reversing the Subtraction Order

Subtract both coordinates in the same direction. Writing (y₂ − y₁) over (x₁ − x₂) flips the sign of your answer.

Watch out

Mixing Up Percent Grade and Degrees

A 100% grade is 45°, not 90°. Grade is m × 100%, while angle is arctan(m); check any angle on our scientific calculator.

How the Slope Formula Works

Slope divides vertical change by horizontal change. Here is our 3-4-5 line through (1, 2) and (5, 5) by hand.

The Slope Formula

  • m is the slope (rise divided by run).
  • (x₁, y₁) is the first point, (1, 2) here.
  • (x₂, y₂) is the second point, (5, 5) here.

Worked Example: (1, 2) and (5, 5)

  1. Find rise and run

    Rise Δy = 5 − 2 = 3, and run Δx = 5 − 1 = 4.

  2. Divide rise by run

    m = 3 / 4 = 0.75 (fraction 3/4).

  3. Find the y-intercept and equation

    b = 2 − 0.75 × 1 = 1.25 (5/4), so the line is y = (3/4)x + 5/4.

  4. Check distance, grade, and angle

    d = √(4² + 3²) = 5, grade is 75%, and θ = arctan(0.75) ≈ 36.87°.

Key Terms

Rise and run (opens in a new tab)
Vertical change (Δy) over horizontal change (Δx) between any two points on the line.
Rate of change
What slope means in real data and physics: speed on a distance-time graph, or acceleration on a velocity-time graph.
Slope-intercept form
The line equation y = mx + b, where m is the slope and b is where the line crosses the y-axis.
Percent grade (opens in a new tab)
Slope written as m × 100%. Under the FHWA MUTCD 11th Edition, U.S. Hill warning signs start at a 5% downgrade longer than 3,000 feet.

Slope Calculator Questions and Answers

How do you find slope from two points?

Subtract the y-values, then divide by the difference in x-values: m = (y₂ − y₁) / (x₂ − x₁). Type both points into From two points above to get the decimal slope, reduced fraction, and step-by-step algebra.

What is the difference between zero slope and undefined slope?

A flat horizontal line has a rise of 0, giving a slope of 0 at 0°. A vertical line has a run of 0, and dividing by zero is undefined in math, shown here as Undefined at 90° (or -90° when you enter -90° in the Angle box).

What is the difference between horizontal run and slope length?

Run (Δx) is the flat level distance along the ground, whereas slope length (d) is the diagonal distance along the ramp or roof surface itself. If you measured the board or surface rather than the flat base, enter it in Length (d) under From rise & run.

How do you find slope from an equation like 2x + 3y = 6?

Rearrange the equation into y = mx + b and read the number in front of x: 2x + 3y = 6 becomes y = -(2/3)x + 2, so the slope is -2/3 (-0.6667). You can also paste it straight into From line equation above.

How do perpendicular slope and rate of change work?

Perpendicular lines have negative reciprocal slopes (−1 / m), so a line perpendicular to 3/4 has slope −4/3, listed automatically in the Steps tab. For any straight line, slope is its constant rate of change, while a curved line needs calculus to find its slope at one point.

Can I enter fractions, negative numbers, or decimals?

Yes. Coordinates, slopes, rises, and angles accept negatives, decimals, commas, and fractions like 3/4 or -2/3, while distances must be positive. Like every free calculator on this site, everything runs locally in your browser.

Ready to Check Another Line?

Scroll back up to this slope calculator to plot new points or convert another rise and run.