Calculate slope (gradient), line equations (slope-intercept, point-slope, standard form), x-intercept, y-intercept, angle of inclination, midpoint, distance, and perpendicular slope between two coordinate points.
The slope of a line β also called the gradient in British English β is one of the most fundamental concepts in coordinate geometry and algebra. It measures how steep a line is: how much the y-value (vertical position) changes for each unit increase in the x-value (horizontal position). Our free slope calculator finds the slope between any two coordinate points and also derives the complete line equation in three forms, along with the x-intercept, y-intercept, angle of inclination, midpoint, distance, and related perpendicular and parallel slopes.
For two points (xβ, yβ) and (xβ, yβ), the slope m is:
m = (yβ β yβ) / (xβ β xβ) = rise / run
Example: for points (1, 2) and (4, 6): m = (6β2)/(4β1) = 4/3 β 1.333. The line rises 4 units for every 3 units of horizontal run.
| Form | Equation | Use |
|---|---|---|
| Slope-intercept | y = mx + b | Easiest to graph; b = y-intercept |
| Point-slope | y β yβ = m(x β xβ) | Given slope and one point |
| Standard form | Ax + By = C | Integer coefficients, no fractions |
From points (1, 2) and (4, 6), m = 4/3, b = yβ β mxβ = 2 β (4/3)(1) = 2/3:
Two special cases require attention:
In the United Kingdom, "gradient" is the standard term used in GCSE and A-level Mathematics, on road signs, and in civil engineering. UK road gradient signs show percentage gradients (e.g., "10% gradient" means a rise of 10 metres for every 100 metres of horizontal distance, equivalent to slope = 0.10 or about 5.7Β°). The steepest road in the UK is Hardknott Pass in Cumbria, with a 33% (1:3) gradient.
In UK GCSE Mathematics, students calculate gradient as: gradient m = change in y / change in x, using coordinates read from graphs. A-level Pure Mathematics extends this to differentiating functions to find the gradient of a curve at any point.
In the United States, road steepness is expressed as "grade" β the same as gradient but using the American term. Highway design standards (AASHTO Green Book) limit maximum grades based on road classification and design speed: interstate highways typically allow no more than 5β6% grade, while mountain roads may reach 8β12%. A 5% grade means 5 feet of rise per 100 feet of horizontal run.
In US education, slope is a core topic in Algebra 1 (8th or 9th grade) and is tested extensively on the SAT, ACT, and state standardised tests. The Common Core Standards (8.EE.B.5, 8.EE.B.6) require students to graph proportional relationships, compare slopes, and derive slope-intercept form.
Example: a line with slope 2/3 has perpendicular slope β3/2. Check: (2/3) Γ (β3/2) = β1. This product of β1 is the test for perpendicularity.
The angle that a line makes with the positive x-axis is called the angle of inclination ΞΈ. It relates to slope by: m = tan(ΞΈ), so ΞΈ = arctan(m).
A slope of 1 (m=1) gives ΞΈ = 45Β°. A slope of β3 gives ΞΈ = 60Β°. A horizontal line (m=0) has ΞΈ = 0Β°. The angle is always between 0Β° and 180Β° (not including 90Β° for a defined slope).
Between points (xβ,yβ) and (xβ,yβ):
Ramps for wheelchair accessibility must have a slope no steeper than 1:12 (1 inch of rise per 12 inches of run, or about 8.3%) under the Americans with Disabilities Act (ADA) in the US. UK Building Regulations (Part M) specify similar requirements of 1:20 for ramps in new buildings. Calculating and verifying these slopes uses the same formula as coordinate geometry.
Building codes in both the UK and US require drain pipes to have a minimum slope (fall) to ensure adequate drainage by gravity. UK Building Regulations typically require at least 1:40 (2.5%) fall. US codes (IPC/UPC) require ΒΌ inch per foot (about 2.1%) minimum for 3-inch pipes. A slope calculator helps plumbers and engineers verify pipe installations meet code.
Slope m = (yββyβ)/(xββxβ). Subtract the y-coordinates to find the rise, subtract the x-coordinates to find the run, then divide. For points (2,3) and (6,7): m = (7β3)/(6β2) = 4/4 = 1.
Slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept (the y-value where the line crosses the y-axis). Given slope 2 and y-intercept 5: the equation is y = 2x + 5.
A negative slope means the line goes downward from left to right. As x increases, y decreases. A slope of β2 means the line falls 2 units for every 1 unit it moves to the right. It represents a decreasing relationship between x and y.
Gradient is the UK term for slope. In GCSE Mathematics, gradient = change in y / change in x, read from a graph or calculated from coordinates. It is identical to the slope formula m = (yββyβ)/(xββxβ) used in US Algebra.
The perpendicular slope is the negative reciprocal: if the original slope is m, the perpendicular slope is β1/m. For a slope of 3, the perpendicular slope is β1/3. For slope β2/5, the perpendicular slope is 5/2. The product of perpendicular slopes always equals β1.
A slope is undefined when the line is vertical (xβ = xβ). This causes division by zero in the slope formula. A vertical line has equation x = constant and is not a function. Every point on a vertical line has the same x-value.
Zero slope means the line is horizontal (yβ = yβ). The rise is 0, so m = 0/run = 0. A horizontal line has equation y = constant and every point on it has the same y-value.
Slope appears in road gradients (UK road signs show % gradient; US uses % grade), wheelchair ramp design (ADA requires max 1:12), drain pipe fall requirements, roof pitch calculations, and linear regression in data analysis. Any situation involving a rate of change uses the slope concept.
Results are based on standard coordinate geometry formulas. For engineering, construction, or safety-critical gradient calculations, always verify with qualified professionals and applicable building codes.