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.

Your figures

Example result — edit the figures to make it yours

2

Slope

Angle to x-axis63.43 deg
y-intercept0.00
Distance between points6.71

(1, 2) (4, 8) Slope = 2 between the two points
The shape for your figures, drawn and labelled from the same values the result is computed from — change a figure and the drawing follows.

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

m = (y2 - y1) / (x2 - x1)

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

Quick reference — varying x1
x1Slope
0.51.71
0.81.88
12.00
1.252.18
1.52.40
23.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.