Slope Calculator
m = (y&sub2;−y&sub1;) / (x&sub2;−x&sub1;)
Point 1 (x₁, y₁)
Point 2 (x₂, y₂)
Quick Examples — click to load
(0,0) → (1,1)
slope = 1
(0,0) → (3,6)
slope = 2
(1,2) → (4,8)
slope = 2
(0,5) → (5,0)
slope = -1
(2,3) → (2,7)
vertical
(1,4) → (5,4)
horizontal
Enter two coordinate points to calculate slope, line equation, distance and midpoint.
Slope (m)
Formula
Line Properties
Slope m
Y-intercept b
Line equation
Perpendicular slope
Points Properties
Distance P₁P₂
Midpoint
Angle of inclination
Δx (run)
Δy (rise)
Step-by-Step
Ad · 300x250
Slope Formula Explained
Slope (m) measures the steepness and direction of a line. It is defined as rise over run: the change in y divided by the change in x between any two points on the line. A positive slope rises left to right; negative falls; zero is horizontal; undefined is vertical.
Slope Formula
m = (y₂−y₁) / (x₂−x₁) = rise / run. Example: points (1,2) and (4,8). m = (8−2)/(4−1) = 6/3 = 2. The line rises 2 units for every 1 unit right.
Slope-Intercept Form
y = mx + b, where m is slope and b is the y-intercept (where the line crosses y = 0). Example: m = 2, point (1,2). b = y−mx = 2−2(1) = 0. Equation: y = 2x.
Distance Formula
d = √((x₂−x₁)² + (y₂−y₁)²). This is the Pythagorean theorem applied to coordinate geometry. The horizontal and vertical distances are the two legs.
Midpoint Formula
M = ((x₁+x₂)/2, (y₁+y₂)/2). The midpoint is the average of the x-coordinates and the average of the y-coordinates of the two endpoints.
Ad · 728x90
Slope Questions
What is slope and how is it calculated?+
Slope (m) measures how steep a line is and in which direction it goes. It is defined as rise over run: m = (y₂−y₁) / (x₂−x₁). For points (1,2) and (4,8): m = (8−2)/(4−1) = 6/3 = 2. This means the line rises 2 units vertically for every 1 unit it moves horizontally to the right. Positive slope = rises left to right. Negative slope = falls left to right. Zero slope = horizontal line. Undefined slope = vertical line.
What is the slope-intercept form of a line?+
The slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept (the value of y when x = 0, where the line crosses the y-axis). To find b: substitute the slope and one known point. Example: slope = 3, point (2,7). 7 = 3(2) + b. 7 = 6 + b. b = 1. Equation: y = 3x + 1. This is the most common way to write a line equation because it immediately shows both the slope and y-intercept.
What does a negative slope mean?+
A negative slope means the line goes downward from left to right. For every unit you move right on the x-axis, the y-value decreases. Example: m = −2 means the line falls 2 units for every 1 unit to the right. In real life: a downward ramp, decreasing temperature over time, a stock price falling, or a car decelerating. The steeper the line falls, the larger the absolute value of the slope. Slope of −0.1 is nearly flat; slope of −10 is nearly vertical going down.
What is undefined slope?+
A vertical line has undefined slope because the run (change in x) equals zero, and division by zero is undefined. For a vertical line, all points share the same x-coordinate. Example: points (3,1) and (3,7) give slope = (7−1)/(3−3) = 6/0 = undefined. The equation of a vertical line is simply x = c (e.g., x = 3). A horizontal line has slope 0 (zero rise). Its equation is y = c (e.g., y = 4).
What are parallel and perpendicular slopes?+
Parallel lines have identical slopes and never intersect. If line 1 has slope m = 3, any parallel line also has slope m = 3. Perpendicular lines intersect at exactly 90°. Their slopes are negative reciprocals: if line 1 has slope m, any perpendicular line has slope −1/m. Example: slope 2/3 → perpendicular slope = −3/2. Special cases: a horizontal line (slope 0) is perpendicular to a vertical line (undefined slope). The product of perpendicular slopes is always −1: m&sub1; × m&sub2; = −1.
How do I find the distance between two points?+
Use the distance formula: d = √((x₂−x₁)² + (y₂−y₁)²). This is the Pythagorean theorem applied to coordinate geometry: the horizontal distance (Δx) and vertical distance (Δy) form the two legs of a right triangle, and the straight-line distance is the hypotenuse. Example: points (1,2) and (4,6). d = √((4−1)² + (6−2)²) = √(9+16) = √25 = 5.
How do I find the midpoint between two points?+
The midpoint is the average of the x-coordinates and the average of the y-coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2). Example: points (2,4) and (8,10). Midpoint = ((2+8)/2, (4+10)/2) = (5, 7). The midpoint lies exactly halfway between the two points on the line segment. It divides the segment into two equal halves. In coordinate geometry, the midpoint is used to find the center of a line segment, the centroid of a triangle, or to bisect a segment.
What is the angle of inclination of a line?+
The angle of inclination (θ) is the angle a line makes with the positive x-axis, measured counterclockwise. It is related to slope by: tan(θ) = m, so θ = arctan(m). A horizontal line has θ = 0°. A line with slope 1 has θ = 45°. A vertical line has θ = 90°. A line with slope −1 has θ = 135°. The angle always ranges from 0° to 180° (excluding 90° for non-vertical lines). Steep lines have inclination angles close to 90°.
What is point-slope form of a line?+
Point-slope form is y − y₁ = m(x − x₁), where m is slope and (x₁, y₁) is any known point on the line. This is useful when you know the slope and one point but not the y-intercept. Example: slope = 4, point (3,5). y − 5 = 4(x − 3). y − 5 = 4x − 12. y = 4x − 7. To convert to slope-intercept form, just solve for y. The slope-intercept form y = mx + b is the most common, but point-slope is often faster when you start with a known point and slope.
How is slope used in real life?+
Slope appears in almost every field: Architecture and construction: roof pitch, ramp gradients, road grades. The ADA requires ramps to have a slope no steeper than 1:12 (about 4.76°). Economics: the slope of a demand or supply curve represents how quantity responds to price changes. Physics: slope of a distance-time graph = speed; slope of a velocity-time graph = acceleration. Statistics: the slope of a regression line shows how much y changes per unit of x. Geography: gradient of rivers and hills. Engineering: pipeline gradients for drainage. GPS and mapping: calculating elevation changes.