Slope Calculator
Find the line through two points and see the working in your browser.
Enter two points to find the slope and equation.
Example · (1, 2) to (5, 5)
Slope
Rise 3 ÷ run 4 = 3/4.
- Equation
- y = 0.75x + 1.25
- Inclination
- 36.8698976458°
- Y-intercept
- (0, 1.25)
- X-intercept
- (−1.66666666667, 0)
- Distance
- 5
- Midpoint
- (3, 3.5)
Calculation steps
- Rise = 5 − 2 = 3. Run = 5 − 1 = 4.
- Divide rise by run: 3 ÷ 4 = 0.75.
- Use b = y₁ − mx₁ to find 1.25.
Processed on this device — nothing is uploaded
What you can do here
- Slope from two points
- Line equation and intercepts
- Distance and midpoint
- Rise and run
How do I find the slope between two points?
The slope calculator divides the change in y by the change in x to find the slope between two points. For (1, 2) and (5, 5), the rise is 3, the run is 4 and the slope is 3/4 or 0.75. The calculator plots both points in your browser.
It also finds the line equation, intercepts, inclination from the positive x-axis, distance and midpoint.
Key facts
- Price
- Free
- Sign-up
- None
- Upload
- None — runs on your device
- Limits
- Coordinates from −10¹² to 10¹², with up to 15 significant digits
- Works with
- Two points on an x-y coordinate plane
- Output
- Slope, equation, x- and y-intercepts, angle, distance and midpoint · Line graph, rise and run
- Updated
How to work out slope and the line equation
- Enter Point A
Enter the first point’s x and y coordinates. Either coordinate can be zero or negative.
- Enter Point B
Enter the second point’s x and y coordinates. With two different points, the calculator determines a unique line.
- Read the line and working
Calculate slope, read the equation and other results, and open Calculation steps to see how each value was found.
Slope, intercept and distance formulas
Subtract the first point’s coordinates from the second point’s coordinates. With A = (1, 2) and B = (5, 5), the run is 5 − 1 = 4 and the rise is 5 − 2 = 3. Divide rise by run to get the slope m = 3/4 = 0.75. Swapping the points changes both signs, so the slope stays the same.
To find the y-intercept, substitute either point into b = y − mx. Here b = 2 − 0.75 × 1 = 1.25, giving y = 0.75x + 1.25. Set y = 0 to find the x-intercept. A vertical line uses x = the shared x-coordinate and has undefined slope.
The distance is √(4² + 3²) = 5. The midpoint averages each pair of coordinates, giving (3, 3.5). The inclination is the angle measured counterclockwise from the positive x-axis, from 0° to less than 180°. For this line it is arctan(0.75), about 36.87°.
Frequently asked questions
What is the slope when the x-coordinates are equal?
The slope is undefined when the two x-coordinates are equal and the y-coordinates differ. The run is zero. The line is vertical, its angle is 90° and the equation is x equal to the common x-coordinate.
How does a negative slope change the angle?
A negative slope gives an inclination above 90° and below 180°. For example, a slope of −1 has an inclination of 135° measured counterclockwise from the positive x-axis.
What happens if the two entered points are identical?
Exactly one point is specified, so a unique line cannot be found. The calculator still shows a distance of zero and gives the repeated point as the midpoint. The graph marks that point.
Is the slope the same if I switch the two points?
Yes. If you reverse the points, the rise and run both change sign. Their quotient stays the same, as do the line equation, distance, midpoint and inclination.
Related tools
About this tool
Made by ZirkoMirko. Last updated .
Check it yourself in your browser’s Network panel while using the tool. How we handle your data.