How to use the Slope Calculator
- Two points known — enter coordinates (x₁, y₁) and (x₂, y₂), then click Calculate. The tool returns slope m, segment length d, and angle of incline θ, with a labeled chart.
- One point and slope known — switch to the second tab. Enter (x₁, y₁), distance d, and either slope m or angle θ (degrees). The calculator finds the second point along that direction.
- Read the chart — after calculating, the right panel shows a coordinate diagram with Δx, Δy, distance d, and angle θ matching your values.
- Save or clear — download a text summary with Save, or reset inputs with Clear to start over.
What is slope?
By definition, the slope (or gradient) of a line describes its steepness, incline, or grade. Slope is the change in height over the change in horizontal distance — often called rise over run. It is usually written as m and can be positive (line rises left to right), negative (falls), zero (horizontal), or undefined (vertical).
The relationship between slope and the angle of incline θ (measured from the positive x-axis) is:
Where m is slope and θ is the angle of incline in radians when using the tangent function; this calculator reports θ in degrees.
Distance and angle formulas
Given two points, the horizontal change is Δx = x₂ − x₁ and the vertical change is Δy = y₂ − y₁. They form a right triangle with the segment between the points as hypotenuse d:
When you know one point, a distance along the line, and slope or angle, the second point is:
Equivalently, with slope m and distance d: Δx = d / √(1 + m²) and Δy = m · Δx (for non-vertical lines).
Worked example — two points
Find the slope, distance, and angle for (3, 4) and (6, 8):
- Slope: m = (8 − 4) / (6 − 3) = 4/3 ≈ 1.3333
- Distance: d = √((6−3)² + (8−4)²) = √(9 + 16) = 5
- Angle: θ = tan⁻¹(4/3) ≈ 53.13°
Try these values in the Slope Calculator above to see the chart update.
Sign and direction of slope
- m > 0 — line increases, going upward from left to right.
- m < 0 — line decreases, going downward from left to right.
- m = 0 — horizontal line (no rise).
- Vertical line — x₂ = x₁; slope is undefined because the denominator is zero.
Use cases
- Algebra & geometry homework — verify slope-intercept problems and distance-between-points exercises.
- Road and ramp grade — express elevation change as a percent grade (slope × 100) for accessibility and civil engineering sketches.
- Physics vectors — decompose displacement into horizontal and vertical components using Δx, Δy, and θ.
- Data visualization — estimate the trend line steepness between two plotted data points.
- Construction layout — find a stake location a fixed distance along a known grade from a survey point.
Common mistakes and solutions
- Swapping rise and run — slope is (y₂ − y₁) / (x₂ − x₁), not the reverse. If your answer looks like the reciprocal, check point order.
- Vertical line reported as “infinite slope” — when x₁ = x₂, slope is undefined. Use the angle mode (90°) or recognize a vertical segment.
- Mixing degrees and radians — this tool uses degrees for θ. If you use tan⁻¹ in a calculator, confirm the angle mode.
- Distance vs. coordinate difference — Δx is only the horizontal leg; segment length d is the straight-line distance √(Δx² + Δy²).
- Sign of slope with angle — a negative slope corresponds to an angle in the second or fourth quadrant. The chart uses the actual direction from point 1 to point 2.
Related tools and guides
- Percentage Calculator — percent change and fraction-of problems
- Percent Off Calculator — stacked discounts and sale math
- Conversion Calculator — length and unit conversions for real-world rise/run
- EZ Grader Calculator — grade percentages for tests and assignments
- How to Calculate Percentage — percentage formulas with examples
- TI-84 Plus Calculator Online — graphing and trig on a student calculator
- Math & Calculators blog category — more tools and study guides