Slope Calculator
Find the slope, y-intercept, and equation of a straight line from any two points.
Embed this toolResult
Advertisement
Find the Slope, Y-Intercept, and Equation of Any Line
Slope is one of the most useful ideas in algebra, geometry, and everyday measurement. It tells you how steep a line is, which direction it points, and how quickly one quantity changes relative to another. Whether you are checking homework, designing a wheelchair ramp, or estimating a trend line for sales data, knowing the slope makes the problem easier. This free slope calculator takes any two coordinate points and instantly returns the slope, the y-intercept, and the full slope-intercept equation of the line.
What This Tool Does
The calculator finds the equation of the straight line that passes through two points you provide. It returns three key values: the slope m, the y-intercept b, and the complete equation in the form y = mx + b. If both points share the same x-coordinate, the tool reports a vertical line with an undefined slope, because division by zero is not possible.
How to Use the Slope Calculator
- Enter Point 1: type the x₁ and y₁ coordinates of your first point.
- Enter Point 2: type the x₂ and y₂ coordinates of your second point.
- Read the slope: the result card shows m rounded to four decimal places.
- Read the y-intercept and equation: use these to graph the line or answer homework questions.
The Slope Formula
The numerator is the rise and the denominator is the run. After finding m, the y-intercept b is calculated with b = y - mx using either point.
Common Use Cases
- Algebra and precalculus: check slope homework, graph linear equations, and verify systems of equations.
- Construction and carpentry: convert roof pitch or ramp grade into a decimal slope for material calculations.
- Engineering: road grades, drainage slopes, and ADA ramp requirements all rely on rise-over-run math.
- Data analysis: the slope of a trend line tells you the rate of change, such as dollars earned per day or units sold per week.
- Physics: the slope of a position-time graph equals velocity, and the slope of a velocity-time graph equals acceleration.
Worked Example
Suppose you want the equation of the line passing through (2, 3) and (6, 11). First find the slope:
m = (11 - 3) / (6 - 2) = 8 / 4 = 2
Next, find the y-intercept by substituting the slope and one point into y = mx + b. Using (2, 3):
3 = 2(2) + b, so b = -1
The final equation is:
y = 2x - 1
You can verify the result by plugging in the second point: 2(6) - 1 = 11, which matches the original y-value.
Tips for Accurate Results
- Keep signs consistent: a negative y-value changes both the rise and the final slope sign.
- Watch for vertical lines: if x₁ equals x₂, the slope is undefined, not zero.
- Use exact coordinates: rounding inputs before calculating can shift the final slope slightly.
- Check units: in real-world problems, make sure rise and run use the same unit before computing the slope.
- Remember reciprocals: for perpendicular lines, flip the slope and change its sign.