A walkthrough, end to end.
- 1
Enter the coordinates of two points: (x₁, y₁) and (x₂, y₂).
- 2
The calculator computes the slope (rise/run), the equation in slope-intercept form (y = mx + b), and the angle from horizontal.
- 3
Shows distance between points as a bonus.
Slope formula
Slope m = (y₂ − y₁) / (x₂ − x₁). The 'rise over run' definition. Vertical lines have undefined slope. Angle from horizontal = arctan(m), in degrees.
What you can do with this.
Roof pitch
Roof rises 6 ft over a 12 ft horizontal run → slope = 0.5 = '6:12 pitch'. The calculator gives slope and angle (~26.6°). Industry conventions vary by country and roof type.
Wheelchair ramp
ADA requires max slope of 1:12 (8.3%). Rise 1 ft → run minimum 12 ft. The calculator helps confirm slope is within spec for an accessible ramp.
Hill grade for road / cycling
Cyclist climbs 100 m elevation over 2 km → slope = 5%. Tour-de-France 'serious climbs' typically 7%+ average grade with sections at 12%+.
Linear regression line
Fit a line to data points: slope is rise per unit horizontal change. Common regression line is best-fit through scatter — but the calculator handles a single straight line through two specific points.
Demand / supply curve
Economics: linear demand or supply curves have constant slope. Slope = price-per-quantity sensitivity. Useful for elasticity calculations.
Slope and rate of change
In any time-series, slope between two data points = average rate of change. e.g., revenue went from $1M to $1.5M in 2 years → slope = 250K/year.
Vertical line case
When x₁ = x₂, slope is undefined (division by zero). Geometrically: a vertical line has infinite slope. The calculator returns 'undefined' in this case.
Slope calculator 2026 — what's current
Foundation of linear algebra and analytics. AI tools handle reliably. Standalone calculator wins for speed on one-off lookups.
Frequently asked.
Line goes up from left to right. Negative slope: goes down. Zero slope: horizontal. Undefined slope: vertical.
Once you have slope m, plug either point into y = mx + b and solve for b. The calculator does this automatically — equation form is reported in the output.
angle = arctan(slope). 1.0 slope = 45°. 2.0 slope = 63.4°. Negative slope gives negative angle (below horizontal).
No. Calculations run entirely in your browser.