Skip to main content

Free Slope Calculator – Slope, Angle, Grade and Three Line Forms

Find the slope between two points along with the angle, distance, midpoint and percentage grade, and get the line in slope-intercept, point-slope and standard form.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

Slope & Angle3 line formsDistance & Midpoint% GradeNo InfinityFree

What do you know?

Try:

Slope m

1.333333

Angle θ

53.1301°

Grade

133.3333%

Distance d

5

Δx (run)

3

Δy (rise)

4

Midpoint

(4.5, 6)

Distance

5

Equation of the line

Slope-intercept

y = 1.333333x

Point-slope

y − 4 = 1.333333(x − 3)

Standard (Ax + By = C)

4x − 3y = 0

Parallel line

y = 1.333333x + k for any k — same slope m = 1.333333

Perpendicular through P₁

y = −0.75x + 6.25 (m⊥ = −1/m = −0.75)

Step-by-step working

  1. Δy = y₂ − y₁ = 8 − 4 = 4
  2. Δx = x₂ − x₁ = 6 − 3 = 3
  3. m = Δy / Δx = 4 / 3 = 1.333333 = 4/3 as a fraction
  4. b = y₁ − m·x₁ = 4 − 1.333333 × 3 = 0
  5. θ = atan(m) = atan(1.333333) = 53.1301°
  6. Grade = m × 100 = 133.3333%
  7. d = √(Δx² + Δy²) = √(9 + 16) = 5
  8. Midpoint = ((x₁+x₂)/2, (y₁+y₂)/2) = (4.5, 6)
Grade, ratio and angle reference
Slope mRatioGrade %Angle
0flat0%
0.051 in 205%2.86°
0.08331 in 12 (ADA ramp)8.33%4.76°
0.11 in 1010%5.71°
0.21 in 520%11.31°
0.51 in 250%26.57°
11 in 1100%45°

Definitions follow calculator.net (m = Δy/Δx = tan θ, d by the Pythagorean theorem) and Omni Calculator, which also publishes the percentage-grade convention and states that a vertical line has an undefined slope. Coordinates are unit-agnostic; the grade and angle are unit-free.

100% Private

Every slope, equation and plot is computed in your browser. Nothing is uploaded.

How to Use Slope Calculator

1

Enter Both Points

Type the coordinates x₁, y₁ for the first point and x₂, y₂ for the second. Negative values and zero are all valid, and the preset buttons load a vertical, horizontal or identical-point case if you want to see how each is reported.

2

Read the Slope and Line Forms

The slope, angle, percentage grade and distance appear immediately, followed by the line in slope-intercept, point-slope and standard form, plus the parallel and perpendicular equations through your first point.

3

Check the Plot and the Working

The canvas plot draws both points, the extended line, the midpoint and the rise-over-run triangle so you can see the geometry. Open the working panel for each substitution step, or switch to slope-plus-point mode to solve from a known gradient.

How Slope Is Calculated and What Happens at the Edge Cases

Slope measures how steeply a line rises or falls, and it is usually written as m. Give this calculator two points and it returns the slope, the angle the line makes with the horizontal, the distance between the points, the midpoint, the percentage grade, and the equation of the line written three different ways. It also gives you the parallel and perpendicular lines through your first point. Students verifying algebra homework, civil engineers checking a road gradient, roofers converting a pitch into degrees and anyone reading a graph's rate of change all need the same core number, but they need it expressed differently — a mathematician wants m = 0.0833, a builder wants 8.33% or 1 in 12, and a surveyor wants 4.76°. The slope is the vertical change over the horizontal change: m = (y₂ − y₁) / (x₂ − x₁), said aloud as rise over run. Here (x₁, y₁) and (x₂, y₂) are your two points, Δy is the rise and Δx is the run, in whatever coordinate units you use. The angle follows from θ = atan(m) in degrees, because m = tan θ, and the percentage grade is m × 100. The distance uses the Pythagorean theorem, d = √(Δx² + Δy²), since Δx and Δy are the legs of a right triangle whose hypotenuse joins your points; the midpoint is simply the average of the coordinates. For the line, slope-intercept form is y = mx + b with b = y₁ − m·x₁, point-slope form is y − y₁ = m(x − x₁), and standard form is Ax + By = C with integer coefficients. A perpendicular has slope m⊥ = −1 / m. Start with the points (3, 4) and (6, 8). The rise is 8 − 4 = 4 and the run is 6 − 3 = 3, so m = 4/3 = 1.333333. The angle is atan(1.333333) = 53.1301°, the grade is 133.3333%, the distance is √(9 + 16) = 5 exactly, and the midpoint is (4.5, 6). The intercept is b = 4 − 1.333333 × 3 = 0, so the line is y = 1.333333x, which in standard form reduces to 4x − 3y = 0. Try a gentler pair: (1, 5) and (7, 6) gives m = 1/6 = 0.166667, b = 4.833333, so y = 0.166667x + 4.833333 — the same figures Omni Calculator publishes for those points — with a distance of 6.082763 and an angle of just 9.4623°. The percentage grade output is what makes this useful outside a maths class. An accessibility ramp built to the widely used 1-in-12 rule has a slope of 0.0833, an 8.33% grade and a 4.76° incline, and being able to move between those three descriptions settles most site arguments. A road sign warning of a 10% descent corresponds to m = 0.1 and 5.71°, which is far shallower than most people picture. A drainage run needs a specified fall over a known distance, and the slope-plus-one-point mode solves for the second elevation directly. And in data work, the slope between two points on a chart is the average rate of change over that interval, which is how a cost-per-unit or a growth-per-month figure gets read off a graph. The edge cases are where calculators quietly go wrong, so this one handles each by name. If Δx = 0 the formula would divide by zero, and the honest answer is that the slope is undefined — a vertical line — not infinity. The tool reports the line as x = k and still gives the distance and midpoint, because those stay well defined. If Δy = 0 the slope is exactly 0, reported as a clean zero rather than a stray 1e-17. Enter the same point twice and you are told so, since one point does not determine a line. One nuance: the angle uses atan, so a falling line gives a negative angle — take the absolute value if you only want steepness. Nothing you enter is uploaded.

Slope Calculator Formula & Method

Slope (calculator.net, Omni Calculator): m = (y₂ − y₁) / (x₂ − x₁) = Δy / Δx = rise / run = tan θ Angle of incline: θ = atan(m) × 180 / π (degrees, in the range −90° to 90°) Percentage grade: grade % = m × 100 Distance (Pythagorean theorem): d = √((x₂ − x₁)² + (y₂ − y₁)²) Midpoint: ((x₁ + x₂) / 2, (y₁ + y₂) / 2) Line forms: Slope-intercept y = mx + b, where b = y₁ − m·x₁ Point-slope y − y₁ = m(x − x₁) Standard Ax + By = C, integer coefficients reduced, A > 0 Perpendicular m⊥ = −1 / m Where: (x₁, y₁) and (x₂, y₂) = the two points (any consistent coordinate unit) Δx = run, Δy = rise, m = slope (unitless), θ = angle in degrees Edge cases: Δx = 0, Δy ≠ 0 → slope UNDEFINED, vertical line x = x₁ (never Infinity) Δy = 0, Δx ≠ 0 → slope exactly 0, horizontal line y = y₁ Δx = 0 and Δy = 0 → the two points are identical; no line is determined Rounding: full double precision throughout; values rounded only for display.

Examples: Slope Calculator

Input

P₁ = (3, 4), P₂ = (6, 8)

Result

m = 1.333333 · θ = 53.1301° · grade 133.3333% · distance 5 · midpoint (4.5, 6) · y = 1.333333x · standard 4x − 3y = 0

Rise = 8 − 4 = 4 and run = 6 − 3 = 3, so m = 4/3. Distance = √(3² + 4²) = 5, the value calculator.net publishes for exactly these two points.

Input

P₁ = (1, 5), P₂ = (7, 6)

Result

m = 0.166667 · y = 0.166667x + 4.833333 · θ = 9.4623° · grade 16.6667% · distance 6.082763

Reproduces Omni Calculator's published example for these points, including the intercept of 4.83333, with b = 5 − 0.166667 × 1.

Input

Vertical: P₁ = (2, 3), P₂ = (2, 9)

Result

Slope undefined — vertical line x = 2 · distance 6 · midpoint (2, 6) · standard x = 2

Δx = 0, so m = Δy / Δx would divide by zero. The slope does not exist rather than being infinite, but distance and midpoint are still perfectly well defined.

Input

Horizontal: P₁ = (1, 4), P₂ = (7, 4)

Result

m = 0 exactly · y = 4 · θ = 0° · grade 0% · distance 6 · midpoint (4, 4) · perpendicular x = 1

Both points share y = 4, so Δy = 0 and the slope is a clean zero. The perpendicular to a horizontal line is vertical, reported as x = 1 instead of dividing by zero.

Input

Grade to angle: m = 0.10 (a 10% road grade)

Result

θ = 5.71°

θ = atan(0.10) = 5.7106°, matching Omni Calculator's published statement that a 10% slope forms an angle of 5.71° with the horizontal.

Frequently Asked Questions – Slope Calculator

It is undefined, not infinite. A vertical line has Δx = 0, so m = Δy / Δx would divide by zero. This calculator says so plainly and reports the line as x = k, while still giving you the distance, the midpoint and the standard form.