Slope Calculator - Free Gradient & Line Equation Calc | Calculator Hub

📐 Slope Calculator

Calculate slope, angle, and line equation

Calculate Slope from Two Points

📚 Understanding Slope

What is Slope?

Slope is a measure of the steepness or incline of a line. It represents the rate of change between two variables - how much the y-value changes for each unit change in the x-value. Slope is fundamental in mathematics, physics, engineering, and many real-world applications.

Slope Formula

The slope (m) between two points (x₁, y₁) and (x₂, y₂) is calculated as:

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

Where rise is the vertical change and run is the horizontal change between the two points.

Types of Slope

  • Positive Slope (m > 0): The line rises from left to right. As x increases, y increases.
  • Negative Slope (m < 0): The line falls from left to right. As x increases, y decreases.
  • Zero Slope (m = 0): The line is horizontal. Y remains constant regardless of x.
  • Undefined Slope: The line is vertical. X remains constant, making the slope undefined (division by zero).

Line Equation Forms

Slope-Intercept Form: y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis).

Point-Slope Form: y - y₁ = m(x - x₁), useful when you know the slope and one point on the line.

Standard Form: Ax + By = C, where A, B, and C are constants.

Slope and Angle

The angle θ that a line makes with the positive x-axis can be found using:

θ = arctan(m)

This gives the angle in radians. Multiply by 180/π to convert to degrees. A slope of 1 corresponds to a 45° angle.

Percent Grade

Percent grade is commonly used for roads and ramps. It's calculated as:

Grade = slope × 100%

For example, a slope of 0.05 is a 5% grade, meaning the road rises 5 feet for every 100 feet of horizontal distance.

Real-World Applications

  • Engineering: Designing roads, ramps, and drainage systems with appropriate grades
  • Architecture: Calculating roof pitch, stair rise/run ratios, and wheelchair ramp slopes
  • Physics: Analyzing velocity (slope of position vs. time) and acceleration (slope of velocity vs. time)
  • Economics: Interpreting supply and demand curves, marginal cost, and rate of change
  • Geography: Measuring terrain steepness and elevation changes

Frequently Asked Questions

How do I calculate slope from two points?

▼

Use the formula m = (y₂ - y₁) / (x₂ - x₁). Subtract the y-coordinates to get the rise, subtract the x-coordinates to get the run, then divide rise by run. For example, points (1, 2) and (4, 8) give slope = (8-2)/(4-1) = 6/3 = 2.

What does a negative slope mean?

▼

A negative slope means the line is decreasing - it falls from left to right. As the x-value increases, the y-value decreases. For example, a slope of -2 means that for every 1 unit increase in x, y decreases by 2 units.

What is the difference between slope and gradient?

▼

In most contexts, slope and gradient mean the same thing - the steepness of a line. However, gradient can also refer to the rate of change in multivariable calculus or the steepness of terrain in geography. For a straight line, slope and gradient are interchangeable terms.

How do I find the y-intercept from slope and a point?

▼

Use the formula b = y - mx, where (x, y) is your known point and m is the slope. For example, if the slope is 3 and the line passes through (2, 7), then b = 7 - 3(2) = 7 - 6 = 1. The equation is y = 3x + 1.

What is an undefined slope?

▼

An undefined slope occurs when the line is vertical (parallel to the y-axis). This happens when x₂ - x₁ = 0, making the denominator zero in the slope formula. Vertical lines have the form x = c, where c is a constant, and cannot be written in slope-intercept form.

How is slope used in real life?

▼

Slope is used everywhere: road engineers use it to design safe grades (typically 5-10% for highways), architects use it for roof pitch and ramp accessibility (ADA requires ≤ 1:12 slope for wheelchair ramps), economists use it to analyze trends, and physicists use it to calculate velocity and acceleration from graphs.

What is percent grade and how is it calculated?

▼

Percent grade is slope expressed as a percentage, calculated as (rise/run) × 100%. A 5% grade means the road rises 5 feet for every 100 feet of horizontal distance. It's commonly used for roads, ramps, and terrain. A 100% grade equals a 45° angle (slope of 1).

🧭 Guided Journeys

Use a workflow instead of stopping at one result

These grouped paths are designed to help you continue with the most common follow-up calculations in this category.