Free · No sign-up · Instant results

Slope Calculator

Enter two points and get the slope, angle of inclination, percentage grade, distance and the line equation y = mx + b — with a step-by-step solution and a graph.

Slope from two pointsSlope to angleLine equation y = mx + b

Slope formula

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

Slope (m) is rise over run — the change in y divided by the change in x. It also equals tan(θ), where θ is the angle of inclination of the line.

Slope from Two Points

Enter the coordinates of two points (x₁, y₁) and (x₂, y₂). Results update instantly as you type — no sign-up required.

Slope (m)

1.8

Angle of inclination θ

60.95°

Grade (%)

180%

Distance between points

10.3

Δy (rise)

9

Δx (run)

5

Line equation

y = 1.8x + 1.4

y-intercept: 1.4 · x-intercept: -0.7778

The line rises from left to right because the slope is positive.

Line preview

A (2, 5)B (7, 14)m = Δy 9÷Δx 5=1.8
-0.524.579.50.559.51418.5Δx = 5Δy = 9A (2, 5)B (7, 14)
Find a Point from Distance and Slope or Angle

Provide the distance from the known point along the line and either the slope or the angle of inclination. The calculator returns both possible points located that distance away along the line.

How to find slope with this calculator

Slope measures how steep a line is and in which direction it tilts. To find the slope from two points, subtract the y-values to get the rise, subtract the x-values to get the run, then divide rise by run. This slope calculator does that automatically and updates as you type, so you can check homework, plot a line, or convert a slope into an angle in seconds.

Beyond the slope value, the tool returns the angle of inclination (in degrees), the percentage grade, the distance between the two points, the x- and y-intercepts, and the slope-intercept equation y = mx + b. A live graph plots both points and the line through them so you can confirm the result visually.

Good to know

  • A positive slope rises from left to right; a negative slope falls from left to right.
  • A horizontal line has slope 0; a vertical line has an undefined slope because the run is 0.
  • The angle of inclination θ satisfies m = tan(θ) and ranges from 0° to 180°.
  • Percentage grade equals the slope multiplied by 100 — the format used for roads and ramps.

Slope examples and interpretations

How different slope values describe the direction and steepness of a line.

Positive slope

Points (2, 5) and (7, 14) give m = 9 / 5 = 1.8. The line rises 1.8 units of y for every 1 unit of x.

Negative slope

Points (0, 4) and (2, 0) give m = −4 / 2 = −2. The line falls as x increases, with an angle of inclination above 90°.

Zero slope

Points (1, 3) and (6, 3) give m = 0. The line is perfectly horizontal and its equation is y = 3.

Undefined slope

Points (4, 1) and (4, 9) give a run of 0, so the slope is undefined. The line is vertical with equation x = 4.

Slope, angle and grade conversion table

Slope, grade and angle are three ways to describe the same steepness. Slope (m) is rise ÷ run, grade is the slope × 100%, and the angle of inclination is arctan(slope). Use these tables to convert a slope to an angle or a percentage grade at a glance.

Common angles as slope and grade
Angle (θ)Slope (m = tan θ)Grade (%)
0.0171.7%
0.0878.7%
10°0.17617.6%
15°0.26826.8%
20°0.36436.4%
30°0.57757.7%
45°1.000100%
60°1.732173.2%
Everyday slopes with their ratio, grade and angle
ExampleRatio (rise:run)Grade (%)Angle (θ)
ADA wheelchair ramp (max)1:128.3%4.8°
Standard staircase7:1163.6%32.5°
Steep mountain road1:1010%5.7°
4/12 roof pitch4:1233.3%18.4°
6/12 roof pitch6:1250%26.6°
12/12 roof pitch12:12100%45°

Frequently asked questions

Common questions about calculating slope, angle of inclination and grade.

How do you calculate slope from two points?

Use the slope formula m = (y₂ − y₁) / (x₂ − x₁). Subtract the y-coordinates to get the rise, subtract the x-coordinates to get the run, then divide the rise by the run. Enter both points in the calculator above to get the slope instantly.

What is the slope formula?

The slope formula is m = (y₂ − y₁) / (x₂ − x₁), often described as rise over run. It also equals tan(θ), where θ is the angle of inclination the line makes with the positive x-axis.

How do I convert a slope to an angle?

The angle of inclination is θ = arctan(m). For example, a slope of 1 corresponds to 45°, and a slope of 1.732 corresponds to 60°. This slope calculator shows the angle in degrees automatically for any two points you enter.

What is the slope of a horizontal or vertical line?

A horizontal line has a slope of 0 because the rise is 0. A vertical line has an undefined slope because the run is 0 and you cannot divide by zero. The calculator labels these cases and gives the matching line equation.

What is percentage grade?

Percentage grade is the slope expressed as a percent: grade = slope × 100%. A slope of 0.05 is a 5% grade. Grades are commonly used for roads, ramps, roofs and trails to describe steepness.

How do I find the equation of the line?

Once you have the slope m, the slope-intercept equation is y = mx + b, where b is the y-intercept found with b = y₁ − m·x₁. The calculator builds the full equation y = mx + b for you and lists both intercepts.

What is the difference between slope, grade and angle?

They describe the same steepness three ways. Slope (m) is rise ÷ run. Grade is that slope written as a percentage — grade = slope × 100%. The angle of inclination is arctan(slope), measured in degrees. For example, a slope of 1 is a 100% grade and a 45° angle.

What is a 1:12 slope?

A 1:12 slope rises 1 unit for every 12 units of run. As a grade that is 8.3% (1 ÷ 12 × 100), and as an angle it is about 4.8° (arctan(1/12)). It is the maximum slope allowed for an ADA wheelchair ramp. Enter (0, 0) and (12, 1) above to see it.

How do you convert a percentage grade to degrees?

Divide the grade by 100 to get the slope, then take the arctangent: angle = arctan(grade ÷ 100). For example, a 10% grade is arctan(0.10) ≈ 5.7°. The calculator shows the angle in degrees automatically for any two points you enter.

How do I find the slope from an equation?

In slope-intercept form y = mx + b, the slope is the coefficient m. In standard form Ax + By = C, the slope is −A ÷ B. If you only know two points on the line, enter them above and the calculator returns the slope and the full equation.

Related calculators

Explore more free math and data tools on VizGPT.

Calculator

Linear Regression Calculator

Fit a best-fit line, compute slope and intercept, and visualize residuals from your dataset.

Calculator

Wheelchair Ramp Slope Calculator

Check ADA ramp slope, grade and length from rise and run — with a 1:12 pass/fail check.

Calculator

Pipe Slope Calculator

Find drain, sewer and plumbing pipe slope, fall per foot and percent grade against minimum-slope code.

Calculator

Roof Pitch Calculator

Convert roof pitch (rise in 12) to angle, percent slope and rafter length, with material suitability.

Found This Tool Helpful?

Share it with others in one click.

Share This Tool
Help others discover Slope.

Copy Link

Share on Social Media

Share via Email

Suggested hashtags: #VizGPT #DataTools #AITools