Slope Calculator
Calculate the slope between two coordinate points and see more than a single rise-over-run result. Enter x₁, y₁, x₂ and y₂ to calculate slope, the line equation, line angle, percent grade, rise and run, and straight-line distance between the points. Vertical lines are recognized separately because their slope is undefined rather than a finite number.
How to use the Slope Calculator
- Enter the x and y coordinates of the first point.
- Enter the x and y coordinates of the second point.
- Rise is calculated as y₂ − y₁.
- Run is calculated as x₂ − x₁.
- Slope equals rise divided by run when run is not zero.
- The y-intercept is calculated from b = y − mx for non-vertical lines.
- The tool also calculates line angle, percent grade and Euclidean point distance.
Examples
Points (0,0) and (4,3)
Rise = 3 and run = 4, so slope = 3/4 = 0.75.
Horizontal line
If y₁ and y₂ are equal, rise is zero and slope is 0.
Vertical line
If x₁ and x₂ are equal, run is zero and slope is undefined.
Negative slope
A line that moves downward as x increases has a negative slope.
Frequently asked questions
What is the slope formula?
Slope m = (y₂ − y₁) ÷ (x₂ − x₁).
What does slope measure?
Slope measures the change in y for each unit change in x, often described as rise over run.
Why is vertical-line slope undefined?
A vertical line has zero horizontal change, so the slope formula would require division by zero.
What is percent grade?
For a non-vertical line, percent grade is slope × 100%.
How is the angle calculated?
The tool uses the arctangent relationship between rise and run to express line direction in degrees.
Does the calculator show the line equation?
Yes. Non-vertical lines are displayed in slope-intercept form, while vertical lines are shown as x = constant.
More math tools
Graphing Calculator
PopularGraph functions, trace points, view tables and analyze equations.
Open tool →Scientific Calculator
PopularAdvanced calculator for trig, logs, roots, powers, factorials and more.
Open tool →Proportion Calculator
Solve proportions and missing ratio values.
Open tool →Ratio Calculator
PopularSimplify ratios and find equivalent ratios.
Open tool →Area Calculator
PopularCalculate area for rectangles, squares, triangles, circles, trapezoids, parallelograms, ellipses and sectors.
Open tool →Volume Calculator
PopularCalculate volume for cubes, rectangular prisms, cylinders, cones, spheres, pyramids and triangular prisms.
Open tool →