Home · Math · Plane Geometry · Slope Calculator
Slope Calculator
Slope of the line through two points, with its angle, length of the segment and y-intercept.
What this calculator does
Slope of the line through two points, with its angle, length of the segment and y-intercept. Every figure on this page is computed from the formula or definition stated below, with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
Slope is rise over run: (y2 - y1)/(x2 - x1). The line's angle to the x-axis is atan(m) in degrees, and the y-intercept is y1 - m x1. All angles are in degrees; trigonometric outputs use the degree-based functions so no radian conversion is needed.
A vertical line (x2 = x1) has undefined slope - the run is zero. A horizontal line has slope 0.
Worked example
With the example inputs this page opens with (x1 1, y1 2, x2 4, y2 8), the result is 2.00 — slope. Change any figure and the result updates with the same formula.
Quick reference
| x1 | Slope |
|---|---|
| 0.5 | 1.71 |
| 0.8 | 1.88 |
| 1 | 2.00 |
| 1.25 | 2.18 |
| 1.5 | 2.40 |
| 2 | 3.00 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
How does the Slope Calculator work?
Slope of the line through two points, with its angle, length of the segment and y-intercept. Point 1 - Point 2 -> Slope. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Slope Calculator need?
Point 1 - Point 2 -> Slope. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the Slope Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.