Slope Calculator — Free Line Slope, Equation & Graph from Two Points 2026 | AllInOneTools
📐 Free Math Tool

Slope Calculator

Find the slope, equation, distance, and midpoint from two points. See rise/run on an interactive coordinate plane with step-by-step solution.

● Point 1 (x₁, y₁)
● Point 2 (x₂, y₂)
📐
Slope (m)
--
Slope (m)
--
Rise (Δy)
--
Run (Δx)
--
Distance
--
Midpoint
--
Angle
--
Points on the Line (x from -5 to 5)
xy = mx + bPoint
💡 Slope Insight

Slope Calculator: Complete Guide to Finding Slope, Line Equations, and Coordinate Geometry

Slope is one of the most fundamental concepts in algebra and coordinate geometry, measuring the steepness and direction of a line. Every linear relationship in mathematics, science, engineering, and economics is characterized by its slope. The slope tells you the rate of change: how much the output (y) changes for each unit change in the input (x). This concept extends far beyond abstract math into real applications like road grades, roof pitches, velocity, cost rates, and population growth.

The Slope Formula

Given two points (x₁, y₁) and (x₂, y₂), slope is calculated as m = (y₂ − y₁) / (x₂ − x₁), which equals rise ÷ run. The numerator (y₂ − y₁) is the vertical change or "rise," and the denominator (x₂ − x₁) is the horizontal change or "run." A positive slope means the line goes up from left to right. A negative slope goes down. Zero slope is a horizontal line (no rise). Undefined slope occurs when x₂ = x₁ (vertical line — division by zero). The slope is the same no matter which two points on the line you choose.

Slope: m = (y₂ − y₁) / (x₂ − x₁) = rise / run

Slope-Intercept Form: y = mx + b
Point-Slope Form: y − y₁ = m(x − x₁)
Standard Form: Ax + By = C

Distance: d = √[(x₂−x₁)² + (y₂−y₁)²]
Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2)
Angle: θ = arctan(m)

Forms of Linear Equations

Slope-intercept form (y = mx + b) is the most common. Here m is the slope and b is the y-intercept where the line crosses the y-axis. To find b, substitute one known point into the equation. Point-slope form (y − y₁ = m(x − x₁)) is useful when you know the slope and one point. Standard form (Ax + By = C) uses integer coefficients with A positive. Each form has advantages: slope-intercept for graphing, point-slope for deriving equations, standard form for systems of equations. This calculator provides all three forms automatically.

Rise Over Run: A Visual Understanding

The rise-over-run concept makes slope tangible. On the coordinate plane, you can literally count grid squares vertically (rise) and horizontally (run) between two points. A slope of 3/2 means "go up 3, right 2" from any point on the line to reach another. Negative slopes mean "go down" instead of up. Our coordinate plane visualization shows the rise and run as colored dashed lines forming a right triangle, making the geometric meaning of slope immediately clear.

Parallel and Perpendicular Lines

Parallel lines have identical slopes (m₁ = m₂) but different y-intercepts. They never intersect and maintain constant distance. Perpendicular lines have slopes that are negative reciprocals: m₁ × m₂ = −1. If one line has slope 2, a perpendicular line has slope −1/2. This relationship is fundamental in geometry, engineering, and physics. The perpendicularity test m₁ × m₂ = −1 works for all non-vertical, non-horizontal line pairs.

Slope in Real Life

Road grades are expressed as slope percentages: a 6% grade means 6 feet of rise per 100 feet of run. Roof pitch is slope as a ratio like 4/12 (rises 4 inches per 12 inches horizontal). Economics: the slope of a demand curve shows how price changes with quantity. Physics: velocity is the slope of a position-time graph; acceleration is the slope of a velocity-time graph. Medicine: dosage rates are slopes (mg per hour). Finance: stock price trends, depreciation rates, and cost-per-unit are all slope calculations applied to real data.

How to Use This Calculator

Enter the coordinates of two points (x₁, y₁) and (x₂, y₂). The calculator computes slope, rise, run, distance, midpoint, angle, and all three equation forms. The interactive coordinate plane draws both points, the line through them, and the rise/run triangle. The points table shows y-values for x from −5 to 5, useful for graphing. Step-by-step solution walks through every calculation from the slope formula to finding the y-intercept to writing the complete equation.

Slope as Rate of Change

Slope is fundamentally a rate of change — how fast one quantity changes relative to another. In calculus, this concept becomes the derivative: the instantaneous rate of change at a single point rather than the average rate between two points. A line has constant slope everywhere, but curves have changing slopes. The slope of a line tangent to a curve at a point equals the derivative at that point. This connection between algebra (slope) and calculus (derivative) makes slope the gateway concept to higher mathematics. Speed is the slope of a distance-time graph, acceleration is the slope of a speed-time graph, and marginal cost is the slope of a total cost curve.

Distance, Midpoint, and the Pythagorean Connection

The rise and run of a slope form two legs of a right triangle, with the line segment between the two points as the hypotenuse. The distance formula d = √((x₂−x₁)² + (y₂−y₁)²) is directly derived from the Pythagorean theorem applied to this triangle. The midpoint formula M = ((x₁+x₂)/2, (y₁+y₂)/2) finds the point exactly halfway between two given points by averaging each coordinate. Together, slope, distance, and midpoint form the core toolkit of coordinate geometry that extends to three dimensions and beyond, powering everything from GPS navigation to computer-aided design.

Graphing Lines and Intercepts

Every non-vertical line crosses the y-axis at exactly one point, the y-intercept (0, b). Many lines also cross the x-axis at the x-intercept (−b/m, 0). Together with the slope, these intercepts provide the quickest way to sketch a line: plot the y-intercept, then use the slope as "rise over run" to find a second point, and draw through both. A horizontal line (slope 0) has a y-intercept but no x-intercept (unless it is y=0). Understanding intercepts is essential for break-even analysis in business, equilibrium points in physics, and root-finding across mathematics.

Math Note
Slope is undefined when x₁ = x₂ (vertical line). In this case, the line equation is simply x = constant. The calculator detects this case and reports "undefined" slope with the correct vertical line equation.

Frequently Asked Questions

What is slope?
Steepness of a line: m = rise/run = (y₂−y₁)/(x₂−x₁). Positive=up, negative=down, zero=flat, undefined=vertical.
How to find slope from two points?
m = (y₂−y₁)/(x₂−x₁). Example: (2,3) and (6,11) → m = (11-3)/(6-2) = 8/4 = 2.
What is y=mx+b?
Slope-intercept form. m=slope, b=y-intercept. Most common form for graphing lines. Given m=2, b=-1: y = 2x - 1.
Rise over run?
Visual slope: rise=vertical change, run=horizontal change. Slope 3/2 means "up 3, right 2" between points. Negative = down instead of up.
Undefined slope?
Vertical line (x₁=x₂). Division by zero in formula. Equation: x = constant. Passes through all y-values at one x.