How it works
Calculate line slope from two points, or project a second point from a starting point, distance, and slope or angle. Inputs are calculated locally in the browser, and valid values are retained in the page URL for bookmarking.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
9-
?mode=Known valuesChoice · Required · Default: two-points · Accepted values: two-points, point-slope, point-angle
-
?x1=x₁Number · Required · Default: 0
-
?y1=y₁Number · Required · Default: 0
-
?x2=x₂Number · Required · Default: 4 · Used when mode = two-points
-
?y2=y₂Number · Required · Default: 8 · Used when mode = two-points
-
?distance=DistanceNumber · Required · Default: 5 · Used when mode = point-slope
-
?slopeInput=Slope (m)Number · Required · Default: 2 · Used when mode = point-slope
-
?angleDistance=DistanceNumber · Required · Default: 5 · Used when mode = point-angle
-
?angleInput=Angle of inclineNumber · Required · Default: 45 · Used when mode = point-angle
Outputs
7-
slopeSlope (m)Number · Primary output
-
angleAngle of inclineNumber · Suffix: °
-
distanceResultDistanceNumber
-
riseRise (Δy)Number
-
runRun (Δx)Number
-
secondPointSecond pointText
-
equationLine equationText
Formula notes
m=(y₂−y₁)/(x₂−x₁)=tan(θ); with distance d, Δx=d/√(1+m²) and Δy=mΔx.
Input guidance
Use consistent units for every length or measurement in the same calculation. Results are educational mathematical estimates and should be checked before high-stakes use.