Slope Calculator

Calculate slope, gradient, and angle of lines using two points or linear equations.

465 Views
Add as a preferred source on Google

About this Slope Calculator

Slope describes how much a line rises or falls for each unit it moves horizontally, but two coordinate points can tell you much more than that single ratio.

The Slope Calculator in this script uses the two points to find the slope, y-intercept, line equation, angle of inclination, and distance between the points.

The page's reference tables then put the sign of the slope into context: positive lines rise left to right, negative lines fall, zero slope is horizontal, and a vertical line has undefined slope because the horizontal run is zero. It also lists slope-intercept, point-slope, standard, and two-point equation forms.

This makes the calculator useful for analytic geometry, graphing, linear modelling, construction gradients, and checking algebra homework, especially when sign errors in coordinate subtraction would otherwise change the direction of the line.

What Is a Slope Calculator?

A Slope Calculator finds the properties of the straight line passing through two coordinate points. The core formula is m = (y₂−y₁)/(x₂−x₁), often remembered as rise over run.

Once m is known, the page calculates the y-intercept with b = y₁ − m x₁ and writes the line as y = mx + b. It can also calculate the inclination angle as arctan(m) and the point-to-point distance as √[(x₂−x₁)² + (y₂−y₁)²].

For points (2,3) and (6,11), the rise is 8 and the run is 4, so the slope is 2 and the line becomes y = 2x − 1. The same coordinates therefore support several related results rather than only one slope number.

Reading Your Results

Your result will output the exact calculated slope of the line. Pay close attention to whether the slope is positive (rising), negative (falling), zero (horizontal), or undefined (vertical). The calculator will also provide the full line equation and the exact physical distance between your two input points.

How to use this calculator

1Enter the x and y coordinates of the first point.
2Enter the x and y coordinates of the second point.
3Click "Calculate."

The calculator determines the slope, the angle of the line, the distance between the two points, and the equation of the line.

Slope (m) = (y₂ − y₁) ÷ (x₂ − x₁)
Angle = tan⁻¹(m)
Distance = √((x₂ − x₁)² + (y₂ − y₁)²)
Line Equation: y = mx + b
y-Intercept: b = y₁ − (m × x₁)

Where

(x₁, y₁) = First point
(x₂, y₂) = Second point
m = Slope of the line

Example

Point 1 = (2, 3)
Point 2 = (6, 11)
Slope = (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2
y-Intercept = 3 − (2 × 2) = −1
Line Equation: y = 2x − 1
Slope Calculator Lines through the origin at four different slopes Slope = 2 (steep rise)Slope = 1 (45 degrees)Slope = 0.5 (gentle)Slope = -1 (falling) -10-505101520 y = 20y = 10y = 5y = -10 012345678910 x value (the run) y value (the rise) Slope = rise / run = (y2 - y1) / (x2 - x1). A bigger number tilts the line more steeply; a negative number tips it downward.

Slope Interpretation

Slope ValueLine DirectionDescription
PositiveRises left to righty increases as x increases
NegativeFalls left to righty decreases as x increases
ZeroHorizontaly stays constant
UndefinedVerticalx stays constant, division by zero
145° upwardEqual rise and run
−145° downwardEqual fall and run

A vertical line has no defined slope because the run is zero.

Slope from Two Points

Point 1Point 2RiseRunSlope
(0, 0)(4, 8)842
(1, 3)(5, 11)842
(2, 7)(6, 3)−44−1
(−3, 4)(3, 4)060
(5, 1)(5, 9)80Undefined

Slope = (y₂ − y₁) ÷ (x₂ − x₁), commonly remembered as rise over run.

Line Equation Forms

FormEquationBest Used When
Slope-Intercepty = mx + bYou know slope and y-intercept
Point-Slopey − y₁ = m(x − x₁)You know slope and one point
StandardAx + By = CWorking with integer coefficients
Two-Point(y−y₁)/(x−x₁) = (y₂−y₁)/(x₂−x₁)You know two points

Parallel lines share the same slope; perpendicular slopes multiply to −1.

Factors Affecting Your Slope Result

Both coordinate pairs must be entered consistently because reversing the subtraction order in only the numerator or only the denominator changes the sign. If you reverse both point orders, the slope remains the same because both differences change sign together.

A zero run, where x₁ equals x₂, makes the slope undefined; the page correctly treats this as a vertical line rather than trying to divide by zero. A zero rise gives slope 0 and a horizontal line.

The scale and units on the x- and y-axes also affect interpretation: a slope of 2 means two y-units per x-unit, so it cannot be interpreted physically without knowing what those units represent.

Rounding the slope before computing the intercept or angle can move the later results slightly, so retaining precision until the final display is preferable. Finally, perpendicular-line rules assume ordinary Cartesian axes with compatible scaling; visual steepness on a stretched graph can be misleading even when the numerical slope is correct.

Benefits of Using the Slope Calculator

  • Calculate rise over run from two points without losing a negative sign when coordinate differences are taken manually.
  • Derive the y-intercept and full equation y=mx+b from the same points instead of running a separate algebra calculation.
  • Identify horizontal and vertical lines correctly, including the undefined-slope case caused by zero horizontal run.
  • Find the line's inclination angle and the distance between the two points from the same coordinate inputs.
  • Check whether lines are parallel or potentially perpendicular using the slope relationships documented in the page's reference section.

Frequently asked questions

What is the slope formula from two points?

The page uses m = (y₂−y₁)/(x₂−x₁). The numerator is the vertical change and the denominator is the horizontal change.

Why is the slope of a vertical line undefined?

For a vertical line, x₂−x₁ equals zero. That would require division by zero, so the page classifies the slope as undefined rather than assigning a finite number.

What does a negative slope mean?

A negative slope means y decreases as x increases, so the line falls from left to right. A positive slope rises, while zero slope is horizontal.

How is the line equation found after the slope?

The calculator substitutes one known point into b = y₁ − m x₁ to find the y-intercept, then writes the result in slope-intercept form y = mx + b.

Can I swap point 1 and point 2?

Yes, if you swap them consistently in both numerator and denominator. Both differences reverse sign, leaving the slope unchanged. Mixing the order in only one difference gives the wrong sign.

Final Words

A practical way to finish with the Slope Calculator is to calculate rise over run from two points without losing a negative sign when coordinate differences are taken manually.

Remember that both coordinate pairs must be entered consistently because reversing the subtraction order in only the numerator or only the denominator changes the sign.

Recheck the Slope Calculator when those conditions move, and derive the y-intercept and full equation y=mx+b from the same points instead of running a separate algebra calculation before treating the earlier figure as final.

Disclaimer

This calculator provides estimates for general informational and educational purposes only and should not be treated as financial, medical, legal, or professional advice. Results depend entirely on the accuracy of the figures you enter.

Always verify important decisions with a qualified professional, official documentation, or your financial institution before acting on any result shown here.

Related Calculators

Percentage Calculator

Comprehensive percentage calculator for calculating percentages, percentage increase, percentage decrease, percentage of a number, and percentage change. Essential tool for students, professionals, and anyone needing quick and accurate percentage calculations for various applications.

15.9K Views
Use Calculator
Big Number Calculator

Perform arithmetic operations on very large numbers beyond standard calculator limits.

2.1K Views
Use Calculator
Exponent Calculator

Calculate exponential expressions, powers, and exponents with step-by-step solutions.

851 Views
Use Calculator
Scientific Calculator

Advanced scientific calculator with trigonometric functions, logarithms, exponentials, and complex mathematical operations for students and professionals.

593 Views
Use Calculator
Deviation Calculator

Calculate standard deviation, variance, mean, and statistical measures for data sets with detailed analysis and interpretation of results.

571 Views
Use Calculator
Number Sequence Calculator

Find patterns, next terms, and formulas for arithmetic, geometric, and other number sequences.

518 Views
Use Calculator
Probability Calculator

Calculate probabilities for various events including combinations, permutations, and distributions.

514 Views
Use Calculator
Root Calculator

Calculate square roots, cube roots, and nth roots of numbers with precision.

501 Views
Use Calculator
Triangle Calculator

Calculate triangle properties including area, perimeter, angles, and side lengths using various methods and triangle types (right, isosceles, equilateral).

494 Views
Use Calculator

All Categories