Slope Calculator

Calculate slope, gradient, angle, and distance between two points

Coordinate Input Methods
Enter Point Coordinates
Point A (x₁, y₁)
Point B (x₂, y₂)
Common Slope Examples
Line Equation
y = 1.67x + 0.67
Slope-intercept form
Graphical Representation
Cursor: (0.00, 0.00)
Scale: 20 pixels/unit
Point A
(2, 4)
Point B
(5, 9)
Line
m = 1.67
Slope Triangle
Rise (Δy)
5
Run (Δx)
3
Slope (m)
1.67
Slope = Rise ÷ Run = 5 ÷ 3 = 1.67
Slope Calculation Results
Slope (m)
1.6667
5/3
Angle (θ)
59.04°
from horizontal
Distance
5.8310
between points
Grade
166.67%
rise/run × 100%
Coordinate Differences
Δx (Run): 3.0000
Δy (Rise): 5.0000
Horizontal Distance: 3.0000
Vertical Distance: 5.0000
Line Properties
Slope Type: Positive
Y-Intercept: 0.6667
X-Intercept: -0.4000
Line Length: 5.8310
Line Equation Forms
Form Equation Description
Slope-Intercept y = 1.6667x + 0.6667 y = mx + b
Point-Slope y - 4 = 1.6667(x - 2) y - y₁ = m(x - x₁)
Standard Form 5x - 3y = -2 Ax + By = C
Two-Point Form (y - 4)/(x - 2) = 5/3 (y - y₁)/(x - x₁) = (y₂ - y₁)/(x₂ - x₁)
Quick Actions
Real-World Applications

Road gradient: 5-7% for highways

Roof slope: 4:12 (18.4°) minimum

Ramp slope: ≤ 8.33% (1:12)

Hiking trail: 10-15% moderate

Slope Classification
Current Slope: Very Steep
Flat: 0° - 5°
Gentle: 5° - 15°
Moderate: 15° - 30°
Steep: 30° - 45°
Very Steep: > 45°

Slope Calculator | Find Gradient, Angle & Distance Between Points

Calculate slope, gradient, angle, and distance between two points. Perfect for math, engineering, and construction applications with visual graphs.

The Slope Calculator is a powerful mathematical tool that calculates the gradient, angle, and distance between two points on a coordinate plane. It's essential for mathematics, engineering, construction, and various scientific applications. This calculator provides visual representations and multiple calculation methods.

What is Slope?

Slope measures the steepness, incline, or grade of a line. In mathematics, slope (often denoted as 'm') represents the ratio of vertical change (rise) to horizontal change (run) between two points on a line. A positive slope indicates an upward trend, a negative slope indicates a downward trend, zero slope indicates a horizontal line, and undefined slope indicates a vertical line.

The Slope Formula

m = (y₂ - y₁) / (x₂ - x₁)

Where:

m = Slope of the line

(x₁, y₁) = Coordinates of the first point

(x₂, y₂) = Coordinates of the second point

y₂ - y₁ = Vertical change (Rise)

x₂ - x₁ = Horizontal change (Run)

Key Features

  • Multiple Calculation Methods: Calculate using coordinates, angle & distance, or slope & point.
  • Interactive Graph: Visualize the line with draggable, zoomable coordinate system.
  • Real-Time Results: Instant calculations as you adjust inputs.
  • Multiple Equation Forms: View slope-intercept, point-slope, standard, and two-point forms.
  • Slope Triangle Visualization: See the rise and run components graphically.
  • Unit Support: Work with various units including feet, meters, inches, centimeters, etc.
  • Real-World Applications: Compare slopes to practical standards like roads and ramps.
  • Calculation History: Save and recall previous calculations.

Understanding Slope Concepts

Positive Slope

Line rises from left to right. As x increases, y increases. Example: y = 2x + 1

Negative Slope

Line falls from left to right. As x increases, y decreases. Example: y = -2x + 1

Zero Slope

Horizontal line. No vertical change as x increases. Example: y = 3

Undefined Slope

Vertical line. No horizontal change, division by zero. Example: x = 2

Slope, Angle, and Grade Relationships

Slope
Ratio of rise to run
m = rise/run
Angle
In degrees from horizontal
θ = arctan(m)
Grade
Percentage incline
Grade = m × 100%

Conversion Formulas:

  • Angle (degrees) = arctan(slope) × (180/π)
  • Slope = tan(angle in degrees × π/180)
  • Grade (%) = slope × 100
  • Slope = grade / 100

Common Slope Values

Description Slope Ratio Angle Grade Examples
Flat 0:1 0% Floor, table top
Wheelchair Ramp 1:12 4.76° 8.33% ADA compliant ramp
Typical Road 1:20 2.86° 5% Highway grade
Roof Pitch 4:12 18.43° 33.33% Minimum for shingles
45° Angle 1:1 45° 100% Diagonal, staircase
Very Steep 2:1 63.43° 200% Cliff face, expert ski slope

How Slope Calculator Works

Three Calculation Methods

  1. Coordinate Method: Enter two points (x₁, y₁) and (x₂, y₂) to calculate slope, angle, and distance.
  2. Angle & Distance Method: Enter an angle and distance from a starting point to calculate the endpoint and slope.
  3. Slope & Point Method: Enter a slope and one point, plus a distance to calculate the second point and complete line.

Practical Applications

Civil Engineering

Calculating road grades, ramp slopes, drainage inclines, and foundation levels for construction projects.

Architecture

Designing roof pitches, staircase angles, accessible ramps, and landscape grading.

Mathematics Education

Teaching linear equations, coordinate geometry, and trigonometric relationships.

Surveying

Measuring land gradients, contour mapping, and topographical analysis.

Sports & Recreation

Designing ski slopes, hiking trails, bicycle paths, and golf course features.

DIY Projects

Building decks, installing drainage pipes, creating garden terraces, and home renovations.

Line Equation Forms

Slope-Intercept Form: y = mx + b

Most common form where m is the slope and b is the y-intercept. Easy to graph and understand.

Point-Slope Form: y - y₁ = m(x - x₁)

Useful when you know one point (x₁, y₁) and the slope m. Easily converted to other forms.

Standard Form: Ax + By = C

Preferred in some mathematical contexts. A, B, and C are integers, with A ≥ 0.

Two-Point Form: (y - y₁)/(x - x₁) = (y₂ - y₁)/(x₂ - x₁)

Directly uses two known points without calculating slope first.

Distance Formula

d = √[(x₂ - x₁)² + (y₂ - y₁)²]

The distance between two points (x₁, y₁) and (x₂, y₂) is calculated using the Pythagorean theorem. This calculator automatically computes distance alongside slope and angle.

Important Considerations

  • For vertical lines (x₁ = x₂), slope is undefined (division by zero)
  • Angle measurements are in degrees by default (can switch to radians)
  • Grade is expressed as percentage: slope × 100%
  • Real-world slopes often have maximum limits for safety and usability
  • Always consider units consistency when mixing measurement systems
  • For engineering applications, consult relevant building codes and standards

Frequently Asked Questions

What does a negative slope mean?

A negative slope indicates that the line decreases as you move from left to right. In practical terms, it represents a downward incline or decline. For example, a road going downhill would have a negative slope.

How is slope different from angle?

Slope is a ratio (rise/run) while angle is measured in degrees. A slope of 1 (45°) means for every 1 unit of horizontal movement, there's 1 unit of vertical movement. The relationship is: angle = arctan(slope).

What is the maximum possible slope?

Theoretically, slope can approach infinity for vertical lines. In practical applications, maximum slopes are limited by safety and physical constraints. For example, the steepest road in the world has a 35% grade (about 19.3°).

How do I calculate slope from a percentage grade?

Divide the percentage by 100. For example, a 15% grade corresponds to a slope of 0.15. The angle can then be calculated as arctan(0.15) = approximately 8.53°.

This slope calculator provides mathematical calculations for educational, professional, and personal use. For engineering and construction applications, always verify calculations with appropriate professionals and adhere to local building codes and regulations. Results are based on mathematical formulas and may need adjustment for real-world conditions.