Free Online Calculator

Slope Calculator

Find the slope and equation of a line from two points.

Last updated: Free, no sign-up Private — runs in your browser

Quick answer: the slope formula

m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ run. Between (1, 2) and (4, 8) the slope is 2.

Overview of the Slope Calculator

The slope of a line measures how steeply it rises or falls. Enter two points and the calculator returns the slope, the angle with the x-axis, the percent grade, the line equation y = mx + b, both intercepts, the distance and midpoint between the points and the slope of a perpendicular line. A second tool builds the equation from a point and a slope.

A slope of 2 means the line rises 2 for every 1 across. For distance see the Distance Calculator, for right-angle geometry the Right Triangle Calculator, and for curves the Quadratic Formula Calculator.

How We Calculate

The calculator applies the standard method step by step.

  1. Rise Δy = y₂ − y₁ and run Δx = x₂ − x₁.
  2. Slope m = Δy ÷ Δx (undefined for a vertical line where Δx = 0).
  3. Angle θ = arctan(m); percent grade = m × 100.
  4. Intercept b = y₁ − m × x₁, so the line is y = mx + b.
  5. A perpendicular line has slope −1 ÷ m.
m = (y₂ − y₁) ÷ (x₂ − x₁)   y = mx + b
Worked example — slope calculator
ItemValue
Slope m (rise ÷ run)2
Rise Δy / Run Δx6 / 3
Percent grade200%
Angle with the x-axis63.43494882°
Line equation (y = mx + b)y = 2x + 0
y-intercept (b)0
x-intercept0
Distance between the points6.7082039325
Midpoint(2.5, 5)
Perpendicular slope-0.5
Slope between two points
PointsSlope
(1,2) to (4,8)2
(0,5) to (2,1)-2
(0,0) to (4,3)0.75
(2,3) to (6,3)0
(1,1) to (5,10)2.25

Slope Calculator — Frequently Asked Questions

How do I find the slope between two points?

Subtract the y-values, subtract the x-values and divide: m = Δy ÷ Δx.

What is the slope of a vertical line?

Undefined, because the run is zero.

What is the slope of a horizontal line?

Zero — the line neither rises nor falls.

How do I convert slope to percent grade?

Multiply by 100. A slope of 0.08 is an 8% grade.

What is the slope of a perpendicular line?

The negative reciprocal: if m = 2 the perpendicular slope is −1⁄2.

What is the equation of a line?

y = mx + b, where m is the slope and b the y-intercept.

How is the slope calculator calculated?

It uses the standard method: m = (y₂ − y₁) ÷ (x₂ − x₁)   y = mx + b The full working and a worked example are shown on this page.

How accurate is this calculator?

Decimal results use standard double-precision arithmetic (about 15–16 significant digits). Tools that work with whole numbers — big numbers, factors, bases, combinations — use exact integer arithmetic, so no digits are lost.

Can I use it for homework or exams?

Yes for checking your work and learning the method. The steps and formula are shown so you can understand the answer, but follow your teacher's rules about calculators in exams.

Is my data stored?

No. Everything is calculated in your browser and nothing you enter is uploaded or saved.

More Free Calculators You May Need

Need a custom calculator or tool on your website?

Our team designs and develops fast, SEO-ready websites and web tools. Tell us what you need.

Call Us WhatsApp

Get a Free Quote

Tell us a bit about your project — we'll get back to you shortly.

3 + 8 =
Call WhatsApp