Skip to main content
math

Slope Calculator

Calculate the slope of a line passing through two points as rise over run (change in y divided by change in x).

Reviewed by Chase FloiedUpdated

This free online slope calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Slope Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Slope Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Slope Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Slope Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The Slope Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Calculate the slope of a line passing through two points as rise over run (change in y divided by change in x). The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About Slope Calculator

The slope of a line measures its steepness and direction, defined as the ratio of vertical change (rise) to horizontal change (run) between any two points on the line. A positive slope means the line goes upward from left to right; a negative slope means it goes downward. A slope of zero indicates a horizontal line, and an undefined slope (when the run is zero) indicates a vertical line. Slope is a fundamental concept in algebra, geometry, calculus (as the basis for derivatives), physics (velocity as the slope of a position-time graph), and engineering (grades and gradients). This calculator computes the slope, the rise and run separately, and the angle of inclination.

The Math Behind It

The slope m of a line through points (x1, y1) and (x2, y2) is m = (y2 - y1) / (x2 - x1), provided x1 ≠ x2. This can be interpreted as rise/run, rate of change, or the tangent of the angle of inclination. The slope is constant for a given line, meaning it does not matter which two points you choose. Parallel lines have equal slopes, and perpendicular lines have slopes that are negative reciprocals (m1 × m2 = -1). In calculus, the slope at a point on a curve is defined as the limit of the difference quotient, giving the derivative. The slope connects to the equation of a line: y = mx + b (slope-intercept form), y - y1 = m(x - x1) (point-slope form), and Ax + By + C = 0 (general form, where m = -A/B). In physics, the slope of a distance-time graph gives velocity, the slope of a velocity-time graph gives acceleration, and the slope of a force-displacement graph relates to work and energy. In civil engineering, slope is expressed as a percentage (grade): a 6% grade means 6 units of rise per 100 units of run.

Formula Reference

Slope Formula

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

Variables: Point 1 = (x₁, y₁), Point 2 = (x₂, y₂); x₁ ≠ x₂

Worked Examples

Example 1: Calculating slope between two points

Find the slope of the line through (1, 2) and (4, 8)

Step 1:Rise: 8 - 2 = 6
Step 2:Run: 4 - 1 = 3
Step 3:Slope: 6 / 3 = 2
Step 4:Angle: arctan(2) ≈ 63.43°

Slope = 2, angle ≈ 63.43°

Example 2: Negative slope

Find the slope of the line through (0, 5) and (3, 2)

Step 1:Rise: 2 - 5 = -3
Step 2:Run: 3 - 0 = 3
Step 3:Slope: -3 / 3 = -1

Slope = -1 (line descends at 45°)

Common Mistakes & Tips

  • !Subtracting x-coordinates in a different order than y-coordinates.
  • !Thinking a vertical line has slope 0 (it is actually undefined).
  • !Confusing rise/run with run/rise.
  • !Forgetting that slope can be negative.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

What does a slope of zero mean?

The line is horizontal. There is no vertical change between any two points.

What does an undefined slope mean?

The line is vertical. The x-coordinates are equal, so the run is zero, and division by zero is undefined.

How are slopes of perpendicular lines related?

Their slopes are negative reciprocals: m1 × m2 = -1. For example, slopes of 2 and -1/2 are perpendicular.