Math

Slope Calculator

Results

Enter values and calculate to see results.

Embed on your site

Any ezcalcs calculator can be embedded with one script tag. Copy the snippet below or use the homepage playground to preview and customize.

<!-- ezcalcs embed: slope-calculator — paste anywhere in the body -->
<script
  async
  src="https://ezcalcs.net/embed.js"
  data-calc="slope-calculator"
  data-theme="light"
  data-width="100%"
  data-height="640"
></script>

This slope calculator finds the slope between two points, gives you the line equation, and converts slope to a percentage. Enter your coordinates above and get results instantly.

Slope Calculator

The calculator above accepts two coordinate points on a Cartesian plane. Enter (x₁, y₁) and (x₂, y₂), and it returns:

  • Slope (m): the number that measures the steepness and direction of the line
  • Slope percentage: slope expressed as a percent grade
  • Line equation: the slope intercept form (y = mx + b)
  • Y-intercept: where the line crosses the y-axis

You can also input a known point and slope to find the full line equation. Results are estimates for planning and learning. They are not a substitute for professional surveying or engineering review.

What Is the Slope of a Line

Slope is a number that measures the steepness of a line. It tells you how much a line rises or falls for every unit of horizontal change.

A positive slope means the line goes upward from left to right. A negative slope means it falls from left to right. A slope of zero is a perfectly horizontal line.

Mathematically, slope is often denoted by the letter m. You'll see it in equations like y = mx + b, where m is the coefficient that controls the line's angle. The steeper the line, the larger the absolute value of m.

The symbol for slope is simply m. Its origin is debated, but it's the standard across algebra, geometry, and calculus.

The Slope Formula

The slope formula calculates the change in y divided by the change in x between two points on the line:

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

This is commonly called rise over run.

  • Rise (δy): the vertical change between two points
  • Run (δx): the horizontal change between those same points

A few things to keep in mind:

  • If the denominator (x₂ − x₁) equals zero, the result is an undefined slope. That's a vertical line, and no finite number can describe its steepness.
  • A horizontal line has a rise of zero, so its slope is 0.
  • The formula works for any straight line on a Cartesian plane.

You may hear about "three slope formulas." They all describe the same relationship in different forms:

  1. Slope from two points: m = (y₂ − y₁) / (x₂ − x₁)
  2. Slope intercept form: y = mx + b (solve for m by rearranging)
  3. Point-slope form: y − y₁ = m(x − x₁) (useful when you have a point and the slope)

How to Calculate Slope Between Two Points

Start with two coordinate points. Subtract to find rise and run, then divide.

Find the Slope With 2 Points Step-by-Step

Say you have points (1, 2) and (4, 8).

  1. Label your points: x₁ = 1, y₁ = 2, x₂ = 4, y₂ = 8
  2. Calculate the vertical change: 8 − 2 = 6
  3. Calculate the horizontal change: 4 − 1 = 3
  4. Divide rise by run: 6 / 3 = 2

The slope is 2. That means for every 1 unit you move to the right, the line rises 2 units.

What about a vertical line (run = 0)? If both x-values are the same, the horizontal change is zero. Division by zero is undefined, so the line has an undefined slope. The calculator will flag this for you.

What is a negative slope? When the line drops from left to right, the rise is negative. For example, points (0, 5) and (3, 2) give a slope of (2 − 5) / (3 − 0) = −1. The negative sign tells you the direction of fall.

Given a Point and the Slope

Sometimes you already know the slope and one point. Use point-slope form to find the equation of a line:

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

For example, given point (3, 7) and slope m = 4:

  1. Plug in: y − 7 = 4(x − 3)
  2. Distribute: y − 7 = 4x − 12
  3. Solve for y: y = 4x − 5

The y-intercept is −5, and the full line equation is y = 4x − 5. The calculator does this for you automatically when you enter a point and slope.

Slope Percentage Calculator

The slope percentage calculator converts slope into a percent grade. Percent grade is how slope is commonly expressed for roads, ramps, roofs, and terrain.

A 6% slope, for example, means the terrain rises 6 units for every 100 units of horizontal distance. A road with a 5% slope is moderately steep for driving. Highway grades are typically kept under 6% to 8%.

A 2% slope is gentle. It corresponds to a rise of 2 feet per 100 feet of horizontal distance and is common for drainage grading.

How to Calculate Slope Percentage

Multiply the slope (as a decimal) by 100:

Slope percentage = (rise / run) × 100

Using the earlier example where the slope was 2:

2 × 100 = 200%

That means the line rises 200 units for every 100 units of horizontal distance. A slope percentage over 100% is absolutely valid. It simply means the incline is steeper than 45°.

Can slope percentage be negative? Yes. A negative percentage indicates a downhill grade. A slope of −0.06 corresponds to a −6% grade.

Some common reference points:

  • ADA wheelchair ramp (1:12): slope = 1/12 = 0.0833, or about 8.33%
  • Typical highway grade: 3% to 6%
  • 1% slope per foot: a 1% grade means 0.01 feet of rise per 1 foot of run, or about 1/8 inch per foot

How steep is a 6% slope? Imagine a road that rises 6 feet over 100 feet of horizontal distance. That corresponds to an angle of about 3.4°. It feels noticeable in a car, especially on long stretches.

Ramp length example: For a rise of 1 meter at a 5% slope, the horizontal distance is 1 / 0.05 = 20 meters.

Line Equation, Y-Intercept, and Slope

The slope intercept form of a line equation is:

y = mx + b

  • m is the slope
  • b is the y-intercept (the y-value where the line crosses the y-axis, at x = 0)

To find the y-intercept using two points, first calculate the slope. Then substitute one point into y = mx + b and solve for b.

For points (2, 5) and (6, 13):

  1. Slope: (13 − 5) / (6 − 2) = 8 / 4 = 2
  2. Plug in (2, 5): 5 = 2(2) + b → b = 1
  3. Line equation: y = 2x + 1

The calculator also provides the equation of a line when given two points, so you don't need to solve manually.

What is the slope of a perpendicular line? If a line has slope m, any line perpendicular to it has slope −1/m. For a slope of 2, the perpendicular slope is −1/2.

Example Problem: Calculate Slope From Two Points

Problem: Find the slope, slope percentage, and line equation for points (−3, 4) and (5, −2).

Step 1: Calculate slope

m = (−2 − 4) / (5 − (−3)) m = −6 / 8 m = −0.75

Step 2: Convert to slope percentage

−0.75 × 100 = −75%

This means the line falls 75 units for every 100 units of horizontal distance.

Step 3: Find the line equation

Using point (5, −2):

−2 = −0.75(5) + b −2 = −3.75 + b b = 1.75

Line equation: y = −0.75x + 1.75

Step 4: Identify key features

  • Slope: −0.75 (the line falls from left to right)
  • Y-intercept: 1.75
  • Percent grade: −75%
  • The angle of inclination is approximately −36.87° (using the tangent function: θ = arctan(−0.75))

Connection to calculus: For a straight line, the slope is the same everywhere. In calculus, the derivative of a curve at a specific point gives the slope of the tangent line at that point. This slope calculator handles straight lines. For curves, you'd need a derivative calculator.

Frequently Asked Questions

How Do You Find the Slope of a Line From an Equation

Rearrange the equation into slope intercept form (y = mx + b). The coefficient of x is the slope.

For example, given 3x + 2y = 10:

  1. Subtract 3x from both sides: 2y = −3x + 10
  2. Divide by 2: y = −1.5x + 5

The slope is −1.5.

If the equation is in standard form (Ax + By = C), the slope is −A/B.

What Is a Slope Percentage Calculator Used For

A slope percentage calculator converts rise over run into a percent grade. It's used for:

  • Road and highway design: checking whether a grade meets safety standards
  • Roof pitch: estimating how steep a roof is for drainage and material selection
  • Ramp construction: verifying ADA compliance (maximum 8.33% for wheelchair ramps)
  • Landscaping and drainage: ensuring terrain slopes enough for water runoff (typically 1% to 2%)

Can This Slope Calculator Find the Y-Intercept

Yes. Enter two points (or a point and the slope), and the calculator returns the y-intercept along with the full line equation. The y-intercept is the value of b in y = mx + b, representing the exact spot where the line crosses the y-axis.