Methodology
How this calculator works
For points (x₁,y₁) and (x₂,y₂), slope m = (y₂ − y₁) ÷ (x₂ − x₁). The line uses y = mx + b, where b = y₁ − mx₁. Distance and midpoint are calculated from the same coordinate changes.
Find the slope between two points and inspect rise, run, angle, grade, intercepts, distance, midpoint and the resulting straight-line equation.
Geometry & coordinate math
Enter two points to calculate rise, run, slope, angle, percentage grade, distance, midpoint, intercepts and the line equation.
Your entries stay in this browser and are used only for this calculation.
Line result
Slope, line equation and coordinate details will appear here.
Methodology
For points (x₁,y₁) and (x₂,y₂), slope m = (y₂ − y₁) ÷ (x₂ − x₁). The line uses y = mx + b, where b = y₁ − mx₁. Distance and midpoint are calculated from the same coordinate changes.
Worked example
For (1,2) and (5,10), rise is 8 and run is 4, so slope is 2. The line is y = 2x, the grade is 200%, and the distance is √80 ≈ 8.944.
Interpret the result
Positive, negative, zero and undefined slopes describe increasing, decreasing, horizontal and vertical lines. The angle and grade express the same relationship in forms used by geometry, engineering and construction.
Reference formula
OpenStax defines slope as vertical change divided by horizontal change and illustrates the right-triangle interpretation used here.
OpenStax: slope of a lineRelated geometry tools
Common questions
Subtract the first y-coordinate from the second to get rise, subtract the first x-coordinate from the second to get run, then divide rise by run.
A vertical line has zero horizontal change. Dividing its rise by a run of zero is undefined, so its equation is written x = constant.
A negative slope means y decreases as x increases. The line falls from left to right.
Grade is slope multiplied by 100. A slope of 0.08 corresponds to an 8% grade.
The calculator applies the inverse tangent to the slope and normalizes the inclination to the range from 0° up to 180°.
No. Rise and run both reverse sign, so their ratio, the line and the distance remain the same.
The result describes the infinite straight line through the two entered points. Real-world road, roof and terrain measurements may require horizontal projected run rather than surface distance. This calculator is for planning and education, not personal financial advice.