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.

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.

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.

Related calculators

Explore more free math and data tools on VizGPT.

Calculator

Adderall Levels in Urine Calculator

Estimate urine concentrations over time.

Calculator

Caffeine Retention Calculator

Track caffeine levels in your body over 24 hours.

Calculator

Streaming Cost Calculator

Compare cable bills against streaming services and estimate monthly or yearly savings.

Calculator

CGPA Calculator

Compute semester GPA and update your cumulative CGPA with credit-weighted grades.

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