2026-08-07 9 min

Slope Calculator

This slope calculator solves for parameters of slope and distance of a line between two points, or a point and a slope.

Calculator

If 2 Points are Known

X₁
Y₁
X₂
Y₂

If 1 Point and the Slope are Known

X₁
Y₁
d
m
θ
Use:
Results update live as you type
Status:m = 1.3333 (4/3)d = 5.0000θ = 53.13°

Slope Summary

Points(3,4) → (6,8)
Rise / Run4.0000 / 3.0000
Slope (m)1.3333 (4/3)
Distance / Angle5.0000 / 53.13°

Line Properties

PropertyValue
Slope (decimal)1.3333
Slope (fraction)4/3
Distance5.0000
Angle / Grade53.13° / 133.33%
Midpoint(4.5000, 6.0000)

Results

Optimal

Slope (m)

1.3333 (4/3)

Rising left to right

Distance (d)

5.0000

√(Δx² + Δy²) straight-line length

Angle of Incline (θ)

53.13°

arctan(m) in degrees

Grade

133.33%

Slope × 100 — road/railway convention

Midpoint

(4.5000, 6.0000)

Point halfway between the endpoints

Direction

Increasing

Sign of the slope

Results are exact for the coordinates given. Vertical lines report undefined slope with valid distance and angle; projection steps forward from the start point.

Visualizations

Rise, Run & Distance

4Rise
3Run
5Distance

Rise vs Run Share

Rise |Δy|57%
Run |Δx|43%

Steepness vs 45° (m = 1)

Slope1.3

Rise vs Run

Rise4

Formula

Slope is the ratio of vertical change to horizontal change. Distance comes from Pythagoras, the angle from arctangent, and grade restates slope as a percentage.

m = (y₂ − y₁) / (x₂ − x₁) = rise / run = tan(θ)

Alternative Form

d = √((x₂−x₁)² + (y₂−y₁)²); θ = arctan(m); grade = m × 100; x₂ = x₁ + d/√(1+m²)

Variables

SymbolNameUnitDescription
mSloperatioRise divided by run
ΔxRununitsx₂ − x₁ (zero → vertical)
ΔyRiseunitsy₂ − y₁
dDistanceunitsStraight-line separation
θAngle of incline°arctan(m) in degrees
gGrade%m × 100
MMidpointpointAverage of the endpoints

Explanation

Slope, angle, and grade are three dialects for steepness: m for equations, θ for geometry, and % for roads and ramps.

Derivation

m = Δy/Δx. d = √(Δx²+Δy²) by Pythagoras. θ = arctan(m) since tan(θ) = opposite/adjacent = rise/run. grade = 100m. Projection: unit vector (1,m)/√(1+m²) scaled by d.

Step-by-Step Calculation

Follow each step to understand how the result is calculated from your inputs.

Step 1

Compute the run (horizontal change).

Δx = x₂ − x₁
x₁:3
x₂:6
Intermediate: 6 − 3
Result: Run = 3.0000
Step 2

Compute the rise (vertical change).

Δy = y₂ − y₁
y₁:4
y₂:8
Intermediate: 8 − 4
Result: Rise = 4.0000
Step 3

Divide rise by run for the slope.

m = Δy / Δx
Rise:4.0000
Run:3.0000
Intermediate: 4.0000 / 3.0000
Result: Slope = 1.3333 (4/3)
Step 4

Apply Pythagoras for the straight-line distance.

d = √(Δx² + Δy²)
Intermediate: √(3.0000² + 4.0000²) = √(9.0000 + 16.0000)
Result: Distance = 5.0000
Step 5

Take the arctangent for the angle of incline.

θ = arctan(m)
Slope:1.3333
Intermediate: arctan(1.3333)
Result: Angle = 53.13°
Step 6

Express as grade and locate the midpoint.

grade = m × 100; M = averages
Intermediate: 1.3333 × 100
Result: Grade = 133.33%; midpoint (4.5000, 6.0000)
Final Answer
1.3333 (4/3)

Worked Examples

See how the calculator works with different scenarios.

Scenario

From (3,4) to (6,8).

Inputs

(x₁,y₁):(3,4)
(x₂,y₂):(6,8)

Calculation

Δx = 3, Δy = 4; m = 4/3 ≈ 1.333; d = √(9+16) = 5; θ ≈ 53.13°

Result

m = 4/3, d = 5, θ = 53.13° — a 3-4-5 triangle

Interpretation

The classic 3-4-5 right triangle hides inside: run 3, rise 4, hypotenuse 5.

Understanding Your Result

Your Result: Slope (m): 1.3333 (4/3)

Typical range: Ramps ≤ 8.33%, roads ≤ 6–10%, rail ≤ 2%, roofs m ≈ 0.33 (4/12 pitch); m = 1 is a steep 45° few roads ever touch.

What This Means

Slope tells how fast y changes per unit of x; distance gives the separation; angle and grade restate the same steepness for geometry and engineering.

Why It Matters

Roof pitch, ramp codes, road grades, trend lines, and derivatives all reduce to rise over run — one idea, dozens of trades.

Professional Interpretation

Report slope with grade and angle together: engineers spec grade, drafters draw angles, equations need m.

Recommendations

  • •Sketch the rise/run triangle to catch sign errors
  • •Use grade (%) when talking to builders
  • •Use θ when drafting or surveying
  • •Default to m in equations and code
  • •Flag vertical lines instead of forcing a number
  • •Verify with distance: 3-4-5 patterns recur

Educational Content

Introduction

Slope (gradient) measures a line's steepness as rise over run. This calculator returns slope, fraction form, distance, angle, grade, and midpoint from two points.

Concept Explanation

Between two points, divide the vertical gap by the horizontal gap. Positive tilts climb, negative tilts fall, zero is flat, and zero-run is vertical (undefined).

Applications

▸Road and railway grade design and signage
▸Roof pitch, ramps, stairs, and drainage slopes
▸Trend lines and rates of change in data
▸Velocity from position-time graph slopes
▸Slope fields and derivatives in calculus
▸Terrain analysis and landslide risk mapping

Benefits

  • •Exact fraction form alongside decimals
  • •Distance, angle, and grade in one pass
  • •Point projector for layout work
  • •Rise/run triangle builds geometric intuition
  • •Vertical lines handled explicitly, not as errors

Limitations

  • •Straight lines only — curves need derivatives
  • •Two-dimensional points only
  • •Angle wraps: steep descents read as negative θ
  • •Projection follows the forward direction only

Best Practices

  • •Label points before subtracting
  • •Keep Δ-order consistent (₂ minus ₁)
  • •Convert grade ↔ m by moving two decimals
  • •Use arctan, not eyeballing, for angles
  • •Check verticality before dividing

Common Misconceptions

Myth: Steeper-looking always means bigger slope.
Truth: Axes scales lie — a stretched y-axis exaggerates tilt. Trust Δy/Δx, not pixels.
Myth: Zero slope and undefined slope are the same.
Truth: Zero is flat (horizontal); undefined is vertical. They are perpendicular opposites.
Myth: Slope 2 is twice as steep as slope 1 in degrees.
Truth: Angles compress: m=1 is 45° but m=2 is only 63.4°, not 90°.
Myth: Grade 100% means vertical.
Truth: 100% grade is m = 1, a 45° climb. Vertical would be infinite grade.

Practical Tips

  • •Remember: ₂ minus ₁, top and bottom
  • •Say "rise over run" while writing the fraction
  • •Convert m=1 to 45° as a sanity anchor
  • •Use point-slope form to get the equation fast
  • •Check perpendiculars with −1/m
  • •Read roof pitch n/12 as m = n÷12
  • •Use =SLOPE() in Excel for fitted lines

Common Mistakes

Subtracting in mixed order (y₂−y₁ over x₁−x₂)
Keep ₂−₁ on top and bottom — flipping one sign inverts the slope.
Dividing by zero on vertical lines
Test Δx = 0 first and report undefined with distance and 90°.
Confusing grade with angle degrees
Grade is 100×m; convert via arctan for degrees, never read % as °.
Dropping the negative on descents
Track the sign of Δy explicitly — falling lines carry minus.
Using fitted SLOPE() for two exact points
Regression fits noise; use (y₂−y₁)/(x₂−x₁) for exact geometry.

Assumptions

This calculator makes the following assumptions to provide estimates:

Cartesian Plane: Points live in standard 2D x-y coordinates.
Straight Segment: Slope describes the single line through both points.
Numeric Inputs: All four coordinates must be finite numbers.
Degree Angles: Angles report in degrees, not radians.
Forward Projection: The finder steps in the +x direction along the slope.

Limitations

Be aware of these limitations when using this calculator:

No Curves: Tangents to curves need calculus, not two-point slope.
2D Only: No z-coordinate or 3D direction vectors.
Scale Blindness: Graphs with unequal axes mislead the eye; numbers rule.
Single Direction: Projection returns one of the two points at distance d.

Frequently Asked Questions

Answers to common questions about this calculator.

What is the slope formula?
The slope formula is m = (y₂ − y₁) / (x₂ − x₁), where (x₁, y₁) and (x₂, y₂) are two points on a line. It represents the ratio of the vertical change (rise) to the horizontal change (run) between two distinct points.
How do you calculate slope between two points?
Subtract the y-coordinates to find the rise, subtract the x-coordinates to find the run, then divide rise by run: m = (y₂ − y₁) / (x₂ − x₁). Example from (3,4) to (6,8): m = (8−4)/(6−3) = 4/3 ≈ 1.333.
What does a positive slope mean?
A positive slope means the line rises from left to right. As x increases, y also increases. Positive slopes indicate an increasing relationship — a car climbing a hill or a growing trend on a graph.
What does a negative slope mean?
A negative slope means the line falls from left to right. As x increases, y decreases — a descending ramp or a declining trend in data.
What does a zero slope mean?
A zero slope (m = 0) means the line is perfectly horizontal. The y-coordinate stays constant for all x-values. Zero-slope lines have the equation y = b.
What is an undefined slope?
An undefined slope occurs on a vertical line, where x₂ = x₁ and the denominator is zero. Vertical lines have the equation x = a and an angle of incline of 90°.
What is slope-intercept form?
Slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept. To graph: start at b on the y-axis, then follow the slope rise/run.
What is point-slope form?
Point-slope form is y − y₁ = m(x − x₁), where m is the slope and (x₁, y₁) is a known point. It is ideal when you know the slope and one point but not the intercept.
How do you convert slope to an angle?
Use θ = arctan(m) × 180/π. A slope of 1 gives 45°, a slope of 0 gives 0° (horizontal), and a vertical line gives 90°. This calculator computes the angle automatically.
What is grade in terms of slope?
Grade is slope as a percentage: grade (%) = (rise / run) × 100. A 10% grade means 10 units of rise per 100 units of run (m = 0.10). Grade is standard in road, railway, and drainage design.
How do you calculate the distance between two points?
Use d = √((x₂ − x₁)² + (y₂ − y₁)²), derived from the Pythagorean theorem. This calculator computes distance automatically with every slope.
What is the perpendicular slope?
Perpendicular lines have negative-reciprocal slopes: if one line has slope m, the perpendicular has slope −1/m. Horizontal (m = 0) and vertical (undefined) lines are perpendicular to each other.
How do you find the equation of a line given two points?
First compute m = (y₂ − y₁)/(x₂ − x₁). Then use point-slope form with either point: y − y₁ = m(x − x₁), and solve for y. Example (2,3),(5,9): m = 2, so y − 3 = 2(x − 2) gives y = 2x − 1.
How is slope used in road design?
Road grade is a percentage: 5% means 5 feet of rise per 100 feet. Interstates cap near 6%, local roads near 10%. Steep grades lower speed limits and lengthen truck braking distance.

Related Calculators

Explore more calculators related to this topic.

Related Guides

Deepen your understanding with these educational resources.

Glossary

Technical terms used in mortgage calculations explained in plain language.

Slope
Rise over run: (y₂−y₁)/(x₂−x₁).
Gradient
Engineering synonym for slope, often as a percentage.
Rise
Vertical change Δy between two points.
Run
Horizontal change Δx between two points.
Grade
Slope × 100, in percent.
Angle of incline
arctan(m): the line's tilt in degrees.
Slope-intercept form
y = mx + b with slope m and intercept b.
Point-slope form
y − y₁ = m(x − x₁).
Midpoint
The point halfway between two endpoints.
Perpendicular slope
The negative reciprocal −1/m.

Authoritative References

Trusted sources and standards referenced by this calculator.

Applicable Standards

Common Core HSA-CED & HSF-LE: linear equations and slopes

Was This Calculator Helpful?

Page Information

Last Updated:

2026-08-07

Version:

2.0.0

License:

Free to use for educational and professional purposes.