Skip to content
ToolPaxaAll Tools for Everyone, in One Place.All calculators

Slope Calculator

Find slope, grade, angles and a line equation from labelled coordinates or rise and run.

Formula reference

m=(y₂−y₁)/(x₂−x₁); d=√(Δx²+Δy²)

All formulas
  • m=(y₂−y₁)/(x₂−x₁); d=√(Δx²+Δy²)
  • m=Δy/Δx; G=100m%; Δx≠0
  • y−y₁=m(x−x₁); P₂=P₁±d(1,m)/√(1+m²)
  • m=tan(θ); P₂=P₁+d(cos θ,sin θ)
  • Δx=x₂−x₁; Δy=y₂−y₁; m=Δy/Δx
  • G=100m%; τ=arctan(m)
  • θ=atan2(Δy,Δx); ι=θ mod 180°
  • b=y₁−mx₁; y=mx+b; x₀=−b/m; m≠0
  • Δy·x−Δx·y=Δy·x₁−Δx·y₁
  • M=((x₁+x₂)/2,(y₁+y₂)/2)
  • Δx=0, Δy≠0 ⇒ x=x₁; m∉ℝ
  • Δx=Δy=0 ⇒ ∄!ℓ
  • θ_rad=θ_deg π/180
Labelled slope diagramSchematic drawing; the symbols match the input fields.ΔxΔyP₁(x₁,y₁)P₂(x₂,y₂)xy
Schematic drawing; the symbols match the input fields.
m =
−
−

Enter two distinct points with the same coordinate units.

Your result

Your answer and calculation steps appear here.

Inputs and calculations stay in this browser tab. Copy or export your report before closing.

Slope calculator: rise, run, line equations and graphs

Choose two points, rise and run, a point with slope, or a point with a directed angle. Enter coordinates in consistent units. In the point modes, distance is optional. Radians accept a controlled multiple of π such as pi/2 or 2*pi/3.

Choose the measurements you know

Two distinct points define a line. Their signed horizontal and vertical changes are Δx = x₂ − x₁ and Δy = y₂ − y₁. If you already know those changes, use Rise and run. If you know one point and the slope or a directed angle, you can determine the line and optionally locate a point at distance d. Keep both coordinate axes in compatible units before forming a ratio.

Calculate slope, percentage grade and angles

For P₁ = (1, 2) and P₂ = (4, 6), Δx = 3 and Δy = 4, so m = 4/3 and the grade is about 133.33%. The distance is 5. Grade is 100 times the signed slope, not an angle in degrees. The left-to-right tilt is arctan(m). Line inclination is reported modulo a half-turn, while the directed angle uses atan2(Δy, Δx) and follows the ordered points. Reversing the points changes the directed angle by a half-turn without changing slope.

Labelled slope diagramSchematic drawing; the symbols match the input fields.ΔxΔyP₁(x₁,y₁)P₂(x₂,y₂)xy
Schematic drawing; the symbols match the input fields.

Find the equation and intercepts

A nonvertical line through P₁ satisfies y − y₁ = m(x − x₁). Its y-intercept is b = y₁ − mx₁, giving y = mx + b. In the example above, b = 2/3 and the normalized integer equation is 4x − 3y = −2. For rational directions and coordinates, these forms and any unique intercepts are exact. A noncardinal directed angle can produce approximate coefficients. Rise and run alone give a direction, not a unique intercept.

Recognize horizontal, vertical and coincident cases

A horizontal line has zero rise and slope 0. A vertical line has zero run, so its slope and percentage grade are undefined. Given a point on a vertical line, its equation is x = x₁. Coincident points or a zero rise/run vector give no unique direction. A zero optional distance in a point mode is different: a direction was supplied, and the endpoint equals the start.

Locate endpoints from a point and distance

Distance along a line is different from horizontal run. With slope m, the rightward unit vector is (1, m)/√(1 + m²); adding and subtracting d times that vector gives the two possible endpoints. With a directed angle θ measured counterclockwise from the positive x-axis, use the single vector d(cos θ, sin θ). A positive 90° angle goes up and a negative 90° angle goes down, even though both describe vertical lines.

Labelled slope diagramSchematic drawing; the symbols match the input fields.dmP₁(x₁,y₁)P₂xy
Schematic drawing; the symbols match the input fields.
Labelled slope diagramSchematic drawing; the symbols match the input fields.dθP₁(x₁,y₁)P₂xy
Schematic drawing; the symbols match the input fields.

Read the graph and precision correctly

The plotted axes use an equal scale and positions relative to the start, so large coordinates do not hide small changes through floating-point subtraction. Numbers and fractions support up to 50 coefficient digits per component and exponent magnitudes up to 40. Numeric radians are limited to absolute values up to 1,000,000; exact π multiples are reduced before calculation. Copy, CSV and print include labelled formulas and full working. These formulas describe a Euclidean plane.

Use Fraction Calculator to reduce a rise/run ratio, Ratio Calculator to compare slopes with matching units, and Percentage Calculator to check the grade conversion. The rise/run triangle connects this result to Triangle Calculator and Root Calculator. Use Scientific Calculator to check an arctangent with the same angle unit. For a straight-line distance in three dimensions or a surface distance on Earth, use the Distance Calculator.

ISO 80000-2:2019 gives the notation context, without certifying the tool. BIPM SI Brochure describes plane angles and consistent length units. OpenStax — Understand Slope of a Line covers slope, rise/run and vertical lines; OpenStax — Find the Equation of a Line derives point-slope and slope-intercept forms. These are planar calculations for consistent coordinate units.

Common questions

What does significant digits mean?

It controls rounding of approximate displayed answers, counting from the first nonzero digit. At 3 significant digits, 123.456 becomes 123 and 0.00123456 becomes 0.00123. Exact fractions remain exact. Rounding does not improve measurement accuracy.

Does a 100% grade mean a 100° angle?

No. A 100% grade means m = 1: equal rise and run, with a 45° left-to-right tilt. Grade and angle use different formulas.

Why is vertical slope undefined?

Its horizontal change is zero, so dividing rise by run is impossible. If a point on the line is known, the equation is x = x₁. A vertical line does not have a finite percentage grade.

Why are there two distance endpoints?

A slope identifies an undirected line. A point at a positive distance may lie on either side of the start. Supply a directed angle if you need just one direction. At distance zero the endpoint is the start.

Can rise and run alone determine the intercept?

No. The same rise/run ratio belongs to many parallel lines. Supply a point on the line to determine its intercept and equation.

Can I enter radians or an exact multiple of π?

Yes. Choose radians and enter a decimal, fraction or controlled form such as pi/2. Exact cardinal angles are recognized as horizontal or vertical. A decimal close to π/2 remains a near-vertical angle.

Explore related tools