Slope Calculator

Choose what you know, enter your numbers, and see the formula worked out.

Point 1 (x₁, y₁)
Point 2 (x₂, y₂)
Optional: find a parallel line through a third point

What Is Slope?

Slope describes how steep a line is and which direction it moves as you travel from left to right. A line can rise, fall, stay flat, or move straight vertically, and slope gives us a mathematical way to describe that behavior.

One of the easiest ways to remember slope is rise over run. Rise tells you how much the y-value changes. Run tells you how much the x-value changes. The formula is m = (y₂ − y₁) ÷ (x₂ − x₁), where the letter m usually represents slope.

Suppose two points are (2, 3) and (7, 11). The vertical change is 11 − 3 = 8. The horizontal change is 7 − 2 = 5. So slope = 8 ÷ 5 = 1.6. That means for every 5 units the line moves to the right, it rises 8 units. You could also describe the same relationship as 1.6 units of rise for each 1 unit of run.

Slope = Rise ÷ Run
(2,3) (7,11) Run = 5 Rise = 8
Rise 8, Run 5
↓
Slope: 8/5 = 1.6
Moving from (2,3) to (7,11), the line moves 5 units right (the run) and 8 units up (the rise). Dividing rise by run, 8 ÷ 5, gives a slope of 1.6.

Why Is Slope Called Rise Over Run?

Look at two points on a line. Moving from the first point to the second requires horizontal movement and vertical movement. The horizontal movement is the run. The vertical movement is the rise.

Mathematically, rise is Δy = y₂ − y₁, and run is Δx = x₂ − x₁. Then m = Δy ÷ Δx. The Greek letter Δ means "change in," so Δy means change in y and Δx means change in x. This is why slope is also often described as a rate of change. It tells you how much y changes when x changes.

Δx and Δy
(x₁,y₁) (x₂,y₂) Δx = x₂ − x₁ Δy = y₂ − y₁
m = Δy ÷ Δx

What Does a Positive Slope Mean?

A positive slope means the line rises from left to right. Example: m = 2. For every 1 unit right, the line rises 2 units. Example line: y = 2x + 1, with points (0,1), (1,3), (2,5). As x increases, y increases.

What Does a Negative Slope Mean?

A negative slope means the line falls from left to right. Example: m = −2. For every 1 unit right, the line moves 2 units downward. Example: y = −2x + 5, with points (0,5), (1,3), (2,1).

Four Types of Slope
Positive
Rises left to right
Negative
Falls left to right
Zero
Horizontal
Undefined
Vertical

What Is Zero Slope?

A horizontal line has a slope of 0. Example: points (2,5) and (8,5). Rise = 5 − 5 = 0. Run = 8 − 2 = 6. Slope = 0 ÷ 6 = 0. Equation: y = 5. No matter how far you move horizontally along this line, the y-value does not change.

What Is an Undefined Slope?

A vertical line has an undefined slope. Example: points (4,2) and (4,9). Rise = 7. Run = 4 − 4 = 0. The slope formula would require 7 ÷ 0, and division by zero is undefined, so the slope is undefined. The equation is x = 4. Do not describe the slope as Infinity; undefined is the mathematically appropriate result.

Zero Slope and Undefined Slope Are Not the Same

Horizontal Line

Rise = 0, Run ≠ 0

Slope = 0

Vertical Line

Rise ≠ 0, Run = 0

Slope = Undefined
A horizontal line has a perfectly calculable slope of zero. A vertical line has no run at all, so its slope cannot be calculated and is described as undefined, never as Infinity.

Does It Matter Which Point I Call Point 1?

No, as long as you stay consistent. Using (2,3) and (7,11), we found rise = 11 − 3 = 8, run = 7 − 2 = 5, slope = 8/5. Now reverse the point order. Rise = 3 − 11 = −8. Run = 2 − 7 = −5. Slope = −8 ÷ −5 = 8/5. Both signs changed, and the final slope stayed the same. The mistake happens when someone reverses the subtraction for y but not for x. Always subtract coordinates in the same point order.

Point Order Does Not Change the Slope

Method A

(y₂−y₁) ÷ (x₂−x₁)

= 8/5

Method B (reversed order)

(y₁−y₂) ÷ (x₁−x₂)

= −8/−5 = 8/5

Incorrect mixed order: (y₂−y₁) ÷ (x₁−x₂) = 8/−5 — subtracting y in one order and x in the other order produces the wrong sign. Always use the same point order for both subtractions.

How Do You Find the Equation of a Line From Two Points?

Once you know slope, you can find the equation. A common form is y = mx + b, where m is the slope and b is the y-intercept. Using (2,3) and (7,11), we already found m = 8/5. Now substitute x = 2, y = 3: 3 = 8/5(2) + b, so 3 = 16/5 + b. Convert 3 to 15/5: 15/5 = 16/5 + b, therefore b = −1/5. The equation is y = 8/5x − 1/5. The decimal version is y = 1.6x − 0.2.

What Is the Y-Intercept?

The y-intercept is where a line crosses the y-axis. At the y-axis, x = 0. In y = mx + b, the value b is therefore the y-coordinate when x = 0. For y = 8/5x − 1/5, the y-intercept is (0, −1/5).

Slope-Intercept Form
(0,1) Rise 2 Run 1
y = mx + b
↓
y = 2x + 1
In y = mx + b, m is the slope and b is the y-intercept. For y = 2x + 1, the line rises 2 units for every 1 unit it runs, and it crosses the y-axis at (0,1).

What Is Point-Slope Form?

Another useful line equation is y − y₁ = m(x − x₁). This is called point-slope form. It is helpful when you already know one point and the slope. Example: point (2,3), slope 8/5. Then y − 3 = 8/5(x − 2). This equation describes the same line as y = 8/5x − 1/5. The form looks different; the line is the same.

How Do You Find the Midpoint?

The midpoint is halfway between two coordinate points. Formula: M = ((x₁+x₂)/2, (y₁+y₂)/2). For (2,3) and (7,11): x-coordinate = (2+7)/2 = 4.5, y-coordinate = (3+11)/2 = 7. Midpoint: (4.5, 7).

Midpoint
Point 1 Point 2 Midpoint
((x₁+x₂)/2, (y₁+y₂)/2)
↓
(4.5, 7)

How Do You Find the Distance Between Two Points?

The horizontal and vertical changes form the legs of a right triangle, which means we can use the Pythagorean theorem. Distance: d = √[(x₂−x₁)² + (y₂−y₁)²]. Using (2,3) and (7,11): run = 5, rise = 8. Distance = √(5² + 8²) = √89 ≈ 9.43. The Pythagorean Theorem Calculator can help if your main goal is solving the side lengths of a right triangle.

Same Triangle. Different Question.
Slope uses 8/5 • Distance uses √(5²+8²)

What Is the Angle of Incline?

Slope can also be represented as an angle. For a nonvertical line, m = tan(θ), therefore θ = tan⁻¹(m). Suppose slope = 1. Then θ = tan⁻¹(1) = 45°. If m = 0.5, then θ ≈ 26.565°. The Scientific Calculator can help with inverse tangent and other trigonometric calculations.

Is Slope the Same as an Angle?

No. Slope and angle describe the same line in different mathematical forms. Slope: m = rise/run. Angle: θ = arctan(m). Example: slope 0.5, angle ≈ 26.565°. You should not say "the slope is 26.565" when you mean the angle is 26.565°.

Slope vs. Angle
Run = 1 Rise = 0.5 26.57°
Slope: 0.5/1 = 0.5
↓
Angle: arctan(0.5) ≈ 26.565°

What Is Percent Slope or Percent Grade?

In real-world applications, slope is sometimes expressed as a percentage. Formula: percent grade = rise/run × 100%. Suppose rise = 6 feet, run = 100 feet. Grade = 6/100 × 100 = 6%. A 6% grade means the vertical change is 6 units for every 100 of the same horizontal units. The rise and run need to use compatible units before forming the percentage; if rise is feet and run is miles, you cannot divide those numbers directly and call the result a percent grade. Convert them to matching units first.

The Science Education Resource Center at Carleton College also explains slope and gradient as "rise over run," including how slope is used with real-world elevation changes and why units must be handled carefully when calculating percent slope. Their slope and gradient guide provides another useful educational explanation.

Slope to Percent Grade
Rise = 6 ft, Run = 100 ft
↓
Slope = 6/100 = 0.06
↓
Percent Grade = 0.06 × 100 = 6%

Is a 100% Grade a Vertical Wall?

No, and this is a common misunderstanding. A 100% grade means rise = run. Example: 100 ft rise for 100 ft horizontal run. Slope = 1. Angle = arctan(1) = 45°. A truly vertical line has zero horizontal run, so its ordinary slope is undefined. This is why percent grade and degrees should not be treated as interchangeable.

How Is Slope Used in Real Life?

Roads: road grades describe how much elevation changes over horizontal distance. Ramps: ramp design may involve rise, run, slope, and grade, and specific accessibility requirements should always be checked against applicable current building or accessibility standards rather than relying only on a general calculator. Roofs: roof pitch relates vertical rise to horizontal run, and construction convention may express roof pitch differently from ordinary percent grade. Topographic maps: elevation change and horizontal distance can be used to describe terrain steepness. Water flow: gradient can help describe how elevation or hydraulic level changes with distance. Graphs: in algebra, science, economics, and statistics, slope can describe rate of change, such as miles traveled per hour, dollars earned per hour, temperature change per minute, or another dependent-variable change relative to an independent variable.

What Is Rate of Change?

Slope and rate of change are closely related. Suppose x represents hours worked and y represents money earned. If y increases by $20 each time x increases by 1 hour, the slope is 20 dollars per hour. Unlike a pure coordinate geometry exercise, units may matter here: slope can have units such as miles/hour, dollars/hour, feet/mile, or degrees/day. A percent grade is unitless only after compatible rise and run units cancel.

What Are Parallel Lines?

Parallel lines have the same slope. Example: y = 2x + 1 and y = 2x − 5. Both have slope 2; their y-intercepts differ. Because their slopes are equal, they never meet in ordinary Euclidean coordinate geometry.

Parallel Lines
y = 2x + 1 y = 2x − 3
Same Slope: m = 2
↓
Different Y-Intercepts

What Are Perpendicular Lines?

Nonvertical, nonhorizontal perpendicular lines have slopes that are negative reciprocals. If m = 2, the perpendicular slope is −1/2. If m = −3/4, the perpendicular slope is 4/3. Multiply perpendicular slopes: 2 × −1/2 = −1. Special case: horizontal and vertical lines are perpendicular to each other. The Triangle Calculator can also be useful when your coordinate work becomes part of a larger geometry problem involving triangle sides, angles, or area.

Perpendicular Slopes
m₁ = 2, m₂ = −1/2
↓
m₁ × m₂ = −1
This negative-reciprocal rule applies to ordinary nonzero, finite slopes. Horizontal and vertical lines are a special case: they are perpendicular to each other, but their slope notation (0 and undefined) does not fit the multiply-to-negative-one pattern.

What Are the Most Common Slope Mistakes?

What Is a Good Step-by-Step Method for Finding Slope?

  1. Step 1: Identify two points. Write them clearly as (x₁,y₁) and (x₂,y₂).
  2. Step 2: Find the rise. Subtract the y-values using one consistent point order.
  3. Step 3: Find the run. Subtract the x-values using the same order.
  4. Step 4: Divide. Slope = rise ÷ run.
  5. Step 5: Simplify. Reduce the fraction where possible.
  6. Step 6: Interpret. Positive? Negative? Zero? Undefined?
  7. Step 7: Find the line equation if needed. Use y = mx + b or point-slope form.

How Is This Different From the Percentage Calculator?

Ordinary coordinate slope is rise/run. Percent grade takes that ratio and multiplies by 100%. If you simply need to calculate a percentage unrelated to slope, use the Percentage Calculator. Do not use the Percentage Calculator as a replacement for coordinate geometry slope calculations.

What Should You Leave This Page Knowing?

Do not leave knowing only "my slope is 1.6." Leave knowing what slope measures, what rise means, and what run means. Understand Δy and Δx, and why slope is rise over run. Understand positive slope and negative slope, and know the difference between zero slope and undefined slope. Know that point order does not change the slope when subtraction is consistent. Understand how two points determine the equation of a nonvertical line, and know what the y-intercept represents. Know how the midpoint is calculated, and understand how the distance formula relates to the Pythagorean theorem. Know how slope relates to angle, and understand the difference between slope, percent grade, and degrees. Know why compatible units matter in real-world grade calculations. Understand parallel slopes and perpendicular slopes. And most importantly: you can see how the calculator arrived at the slope. That is what the CalculateThisWay Slope Calculator should help someone understand.

Worked Examples

Example 1: Positive Slope. Points (2,3) and (7,11).
Rise = 11 − 3 = 8, Run = 7 − 2 = 5
Slope = 8/5 = 1.6
Example 2: Negative Slope. Points (1,8) and (5,0).
Rise = 0 − 8 = −8, Run = 5 − 1 = 4
Slope = −8/4 = −2
Example 3: Zero Slope. Points (2,5) and (8,5).
Rise = 0, Run = 6
Slope = 0. Equation: y = 5
Example 4: Undefined Slope. Points (4,2) and (4,9).
Run = 4 − 4 = 0
Slope = Undefined. Equation: x = 4
Example 5: Line Equation. Points (2,3) and (7,11).
Slope = 8/5, Y-intercept = −1/5
Equation: y = 8/5x − 1/5
Example 6: Midpoint. Points (2,3) and (8,9).
Midpoint = ((2+8)/2, (3+9)/2)
Midpoint = (5, 6)
Example 7: Distance. Points (0,0) and (3,4).
Distance = √(3²+4²) = √25
Distance = 5, Slope = 4/3
Example 8: Percent Grade. Rise = 6 ft, Run = 100 ft.
Grade = 6/100 × 100
Grade = 6%
Example 9: Angle. Slope = 1.
Angle = arctan(1)
Angle = 45°
Example 10: Perpendicular. Original Slope = 2.
Perpendicular Slope = −1/m = −1/2
Perpendicular Slope = −1/2

Try It Yourself

Points (1,2) and (5,10). What is the slope?

Slope Formulas at a Glance

What You NeedFormula
Slope from Two Pointsm = (y₂−y₁)/(x₂−x₁)
RiseΔy = y₂−y₁
RunΔx = x₂−x₁
Slope-Intercept Formy = mx+b
Point-Slope Formy−y₁ = m(x−x₁)
Y-Interceptb = y−mx
Midpoint((x₁+x₂)/2, (y₁+y₂)/2)
Distance√[(x₂−x₁)²+(y₂−y₁)²]
Angleθ = arctan(m)
Percent GradeRise/Run × 100%
Parallel Slopesame m
Perpendicular Slope−1/m

Slope Calculator or Another Math Tool?

Slope Calculator

I need slope, rise/run, grade, angle, midpoint, distance, intercepts, or the equation of a line.

You are here

Pythagorean Theorem Calculator

I need a missing side of a right triangle.

Open Calculator ›

Triangle Calculator

I need triangle sides, angles, area, or a complete triangle solution.

Open Calculator ›

Scientific Calculator

I need inverse tangent, trigonometry, powers, roots, or advanced arithmetic.

Open Calculator ›

Percentage Calculator

I need an ordinary percentage calculation rather than coordinate slope.

Open Calculator ›

Questions People Actually Ask

What is slope?

Slope measures the steepness and direction of a line.

What is the slope formula?

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

What does rise over run mean?

Rise is the vertical change and run is the horizontal change.

What does Δy mean?

Change in y.

What does Δx mean?

Change in x.

What does positive slope mean?

The line rises from left to right.

What does negative slope mean?

The line falls from left to right.

What does zero slope mean?

The line is horizontal.

What does undefined slope mean?

The line is vertical because its horizontal change is zero.

Is vertical slope infinity?

No. The ordinary slope is undefined.

Does point order matter?

Not if you subtract both x and y coordinates using the same order.

How do I find slope from two points?

Subtract the y-values, subtract the x-values in the same order, then divide rise by run.

How do I find the equation of a line?

Find slope, calculate the y-intercept, then use y = mx+b.

What is point-slope form?

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

What is the y-intercept?

The point where a nonvertical line crosses the y-axis.

What is the midpoint formula?

Average the x-coordinates and average the y-coordinates.

How do I calculate distance between two coordinate points?

Use the distance formula, which comes from the Pythagorean theorem.

How do slope and angle relate?

m = tan(θ), so θ = arctan(m).

Is slope the same as degrees?

No.

What is percent slope?

Rise divided by run, multiplied by 100%.

Is a 100% grade vertical?

No. A 100% grade corresponds to a slope of 1 and an angle of 45°.

Is a 50% grade the same as 50 degrees?

No.

Why do units matter for percent grade?

Rise and run must be expressed in compatible units before the ratio can be interpreted as a percentage.

What slope do parallel lines have?

The same slope.

What slope do perpendicular lines have?

For ordinary nonzero finite slopes, they are negative reciprocals.

What is perpendicular to a horizontal line?

A vertical line.

What is perpendicular to a vertical line?

A horizontal line.

Can this calculate a line equation?

Yes.

Can this calculate percent grade?

Yes.

Can this calculate angle from slope?

Yes.

Can this calculate slope from an angle?

Yes.

Sources & Further Reading

Slope Formulas & Methodology

Formulas Used on This Page

Slope from Two Points(y₂−y₁)/(x₂−x₁)
Line Equationy = mx + b
Point-Slope Formy−y₁ = m(x−x₁)
Midpoint((x₁+x₂)/2, (y₁+y₂)/2)
Distance√[(x₂−x₁)²+(y₂−y₁)²]
Angle of Inclineθ = arctan(m)
Percent GradeRise/Run × 100%
Perpendicular Slope−1/m

This calculator keeps exact fractions where practical, reducing rise and run to lowest terms rather than rounding immediately. A vertical line (zero run) is always reported as an undefined slope, never as Infinity, and a horizontal line (zero rise) is always reported as a slope of exactly zero, never as undefined. Two identical points are rejected as not forming a unique line rather than producing a 0/0 or NaN result. Percent grade calculations convert rise and run to a common unit before dividing, so mismatched units such as feet and miles are never divided directly. Results may be rounded for display while calculations retain full internal precision; use the "Show more decimals" control to see additional digits.

This calculator is provided for general educational and informational purposes only. It is not engineering, construction, or accessibility-compliance advice. Always verify slope, grade, and angle figures independently, and consult applicable building codes, accessibility standards, or a qualified professional before relying on them for construction, roofing, ramp, or road-design decisions.