Slope Calculator
Find the slope, angle and equation of the line through two points.
Calculate Slope Between Two Points

Use the Slope Calculator above to find the slope, rise and run, line equation, and step-by-step solution from two points.
How to Use the Slope Calculator
Our free Slope Calculator helps you calculate the slope of a straight line, understand the formula, and visualize the result on a coordinate graph.
It supports four calculation methods: Two Points, Point + Slope, Rise / Run, and Equation.
Step 1: Enter Your Coordinates
Select Two Points and enter the coordinates of Point A and Point B.
For example:
Point A: (2, 3)
Point B: (6, 11)
Enter each number into its corresponding X or Y field.
Step 2: Calculate the Slope
Click Calculate Slope to find the slope of the line connecting the two points.
The calculator displays the exact fraction, decimal slope, rise, run, and slope direction.
Step 3: Review the Step-by-Step Solution
The calculator explains how the slope was calculated using the standard slope formula.
You can follow each step, from substituting coordinates to simplifying the final fraction.
Step 4: View the Coordinate Graph
The interactive graph displays the straight line and its points.
For two-point problems, it can also show a rise-and-run triangle to explain the vertical and horizontal changes.
Step 5: Explore Line Equations
Review the slope-intercept, point-slope, and standard forms of the line equation.
You can also see the line's angle, percentage grade, intercepts, midpoint, and distance between points when applicable.
Step 6: Copy or Reset
Select Copy Results to save the calculation.
Use Swap Points to reverse the coordinate order, or Reset to restore the default example.
What Is Slope in Math?
Slope describes the steepness and direction of a straight line on a coordinate plane.
It tells you how much the vertical coordinate (Y) changes when the horizontal coordinate (X) changes.
In algebra, slope is usually represented by the letter m.
For example, a slope of 2 means that for every 1 unit moved to the right, the line rises 2 units.
A slope of −2 means that for every 1 unit moved to the right, the line falls 2 units.
Slope is commonly described as:
Slope = Rise ÷ Run
Where:
- Rise is the vertical change between two points.
- Run is the horizontal change between two points.
Slope is an important concept in algebra, coordinate geometry, graphing, linear equations, and many real-world applications.
Slope Formula: How to Calculate Slope Between Two Points
The standard formula for finding the slope between two points is:
m = (y₂ − y₁) / (x₂ − x₁)
Where:
| Symbol | Meaning |
|---|---|
| m | Slope of the line |
| x₁ | X-coordinate of the first point |
| y₁ | Y-coordinate of the first point |
| x₂ | X-coordinate of the second point |
| y₂ | Y-coordinate of the second point |
| y₂ − y₁ | Vertical change or rise |
| x₂ − x₁ | Horizontal change or run |
The formula works for any two distinct points that have different X-coordinates.
If the X-coordinates are the same but the Y-coordinates are different, the line is vertical and its slope is undefined.
Understanding Rise Over Run
The slope formula compares the vertical change with the horizontal change.
For example:
Rise = 8
Run = 4
Then:
Slope = 8 / 4 = 2
This tells us that the line rises twice as fast as it moves horizontally.
How to Find Slope From Two Points: Step-by-Step Example
Suppose you want to find the slope between:
Point A = (2, 3)
Point B = (6, 11)
Step 1: Write the Slope Formula
m = (y₂ − y₁) / (x₂ − x₁)
Step 2: Identify the Coordinates
From the two points:
x₁ = 2y₁ = 3x₂ = 6y₂ = 11
Step 3: Substitute the Values
m = (11 − 3) / (6 − 2)
Step 4: Calculate Rise and Run
Rise:
11 − 3 = 8
Run:
6 − 2 = 4
Therefore:
m = 8 / 4
Step 5: Simplify
Divide the numerator and denominator by 4.
m = 2 / 1
Final Answer: Slope = 2
The slope is positive, meaning the line rises from left to right.
Complete Slope Calculation Results
| Property | Result |
|---|---|
| Point A | (2, 3) |
| Point B | (6, 11) |
| Rise | 8 |
| Run | 4 |
| Slope | 2 |
| Slope Type | Positive |
| Line Equation | y = 2x − 1 |
| Inclination Angle | Approximately 63.43° |
| Percentage Grade | 200% |
The calculator performs these calculations automatically and displays the working steps.
Understanding Different Types of Slopes
In coordinate geometry, straight lines can have positive, negative, zero, or undefined slopes.
| Slope Type | Example | What It Means |
|---|---|---|
| Positive | m = 2 | Line rises from left to right |
| Negative | m = −2 | Line falls from left to right |
| Zero | m = 0 | Horizontal line |
| Undefined | Run = 0 | Vertical line |
Positive Slope
A line has a positive slope when its Y-coordinate increases as X increases.
For example:
Point A = (1, 2)Point B = (4, 8)
Calculate:
m = (8 − 2) / (4 − 1)
m = 6 / 3
Slope = 2
The line rises as it moves from left to right.
Negative Slope
A line has a negative slope when its Y-coordinate decreases as X increases.
For example:
Point A = (1, 5)Point B = (5, 1)
Calculate:
m = (1 − 5) / (5 − 1)
m = −4 / 4
Slope = −1
This means the line falls 1 unit for every 1 unit moved to the right.
Zero Slope
A horizontal line has a slope of zero because there is no vertical change.
For example:
Point A = (1, 5)Point B = (5, 5)
Calculate:
m = (5 − 5) / (5 − 1)
m = 0 / 4
Slope = 0
The equation of this horizontal line is:
y = 5
Undefined Slope
A vertical line has undefined slope because the horizontal change is zero.
For example:
Point A = (3, 1)Point B = (3, 8)
Calculate:
m = (8 − 1) / (3 − 3)
m = 7 / 0
Division by zero is undefined.
Therefore, the slope is undefined.
The equation of this vertical line is:
x = 3
What If Both Points Are Identical?
Suppose both points are:
A = (2, 3)
B = (2, 3)
Then:
m = (3 − 3) / (2 − 2)
m = 0 / 0
This does not determine a unique slope or line because infinitely many different lines pass through one point.
Our calculator identifies identical points and displays the appropriate explanation.
How to Calculate Slope With Negative Coordinates
The slope formula works with negative numbers just as it does with positive numbers.
For example:
Point A = (−3, 2)
Point B = (5, −6)
Using the formula:
m = (−6 − 2) / (5 − (−3))
Simplify:
m = −8 / 8
Slope = −1
The key is to handle negative signs correctly.
Remember that subtracting a negative number is equivalent to adding its positive value.
For example:
5 − (−3) = 8
The Slope Calculator handles negative coordinates automatically and shows the substitution steps.
How to Find Slope With Fractions and Decimals
Not every line has a whole-number slope.
Some slopes are fractions or decimals.
Fractional Slope Example
Suppose:
Point A = (1, 2)
Point B = (4, 4)
Calculate:
m = (4 − 2) / (4 − 1)
m = 2 / 3
Slope = 2/3
The line rises 2 units for every 3 units of horizontal movement.
The decimal approximation is:
0.6667
Our calculator displays the simplified fraction and rounded decimal value.
Decimal Coordinate Example
Suppose:
Point A = (1.5, 2.5)
Point B = (4.5, 8.5)
Calculate:
m = (8.5 − 2.5) / (4.5 − 1.5)
m = 6 / 3
Slope = 2
The calculator also accepts fractional entries such as 1/2 and 3/4 and simplifies rational results.
How to Find Slope From Rise and Run
Sometimes a problem gives the vertical and horizontal changes instead of two coordinate points.
In that case, use:
Slope = Rise / Run
For example:
Rise = 12
Run = 8
Calculate:
m = 12 / 8
Simplify:
Slope = 3/2 = 1.5
This means the line rises 3 units for every 2 units moved to the right.
Using the Rise / Run Calculator Mode
Select Rise / Run and enter the two values.
The calculator displays the simplified slope, decimal value, inclination angle, and percentage grade.
It also draws a representative line through the origin.
Important: Rise and run determine a line's direction but not its exact position. Many parallel lines can share the same slope.
How to Find Slope From a Linear Equation
You do not always need two points to calculate slope.
If you already know the equation of a line, you can often identify its slope directly.
Our calculator supports two equation formats.
Slope-Intercept Form
The slope-intercept form is:
y = mx + b
Where:
- m = slope
- b = y-intercept
For example:
y = 3x + 4
The coefficient of x is 3.
Therefore:
Slope = 3
The Y-intercept is:
(0, 4)
Standard Form
A linear equation can also be written as:
Ax + By = C
To calculate slope, use:
m = −A / B, provided B is not zero.
For example:
2x − y = 1
Here:
A = 2B = −1C = 1
Calculate:
m = −2 / (−1)
Slope = 2
Rearranging the equation gives:
y = 2x − 1
How to Use the Equation Mode
Select Equation in the calculator.
Choose either:
Ax + By = C or y = mx + b.
Enter the equation coefficients into the corresponding fields.
The calculator then shows the slope, equivalent equation forms, graph, and additional line properties.
How to Find the Equation of a Line From Two Points
Finding the slope is often the first step toward writing the equation of a straight line.
One common equation format is:
y = mx + b
Where:
- m is the slope
- b is the y-intercept
Using the two points:
A = (2, 3)
B = (6, 11)
We already calculated:
m = 2
Now substitute Point A into the equation.
3 = 2(2) + b
3 = 4 + b
b = −1
Therefore, the line equation is:
y = 2x − 1
This equation describes the unique straight line passing through both points.
Slope-Intercept, Point-Slope, and Standard Forms
A straight line can be represented using several equivalent equation formats.
Our calculator displays these forms when the given information determines a unique line.
| Equation Form | General Formula | Example |
|---|---|---|
| Slope-Intercept | y = mx + b | y = 2x − 1 |
| Point-Slope | y − y₁ = m(x − x₁) | y − 3 = 2(x − 2) |
| Standard | Ax + By = C | 2x − y = 1 |
Slope-Intercept Form
This format makes the slope and Y-intercept easy to identify.
Example:
y = 2x − 1
Slope = 2
Y-intercept = −1
Point-Slope Form
Point-slope form uses a known point and the slope.
For example:
m = 2
Point = (2, 3)
Then:
y − 3 = 2(x − 2)
Standard Form
The same line can be written as:
2x − y = 1
All three equations describe the same straight line.
For a vertical line, the equation is written as x = constant rather than y = mx + b.
How to Read the Slope Calculator Graph
The calculator includes an interactive coordinate graph that helps you visualize the line.
It displays the straight line on a coordinate plane and plots the provided points where appropriate.
Understanding the X and Y Axes
The horizontal axis represents X-values.
The vertical axis represents Y-values.
The calculator uses equal coordinate scales on both axes to preserve the mathematical shape of the line.
Understanding the Rise-and-Run Triangle
When you enter two distinct points, the graph can show a dashed right triangle.
The horizontal side represents the run.
The vertical side represents the rise.
For example, with points (2, 3) and (6, 11):
Run = 4
Rise = 8
The ratio between these two changes gives the slope:
8 / 4 = 2
Interactive Graph Controls
The calculator provides controls to:
- Show or hide coordinate gridlines.
- Show or hide the rise-and-run triangle.
- Zoom in or out.
- Reset the graph view.
These controls help students inspect different slope examples without changing the actual mathematical result.
How to Calculate the Angle of a Slope
Slope can also be expressed as an angle.
The relationship is based on the tangent function.
For a line with a finite slope:
tan(θ) = m
The line's inclination angle is measured counterclockwise from the positive X-axis and lies between 0° and 180°.
For a positive slope:
θ = arctan(m)
For example:
m = 2
θ = arctan(2)
θ ≈ 63.43°
For a negative slope, the line's inclination angle is obtuse.
For example:
m = −1
The inclination is:
135°
A horizontal line has an inclination of 0°, and a vertical line has an inclination of 90°.
Slope to Percentage Grade
Slope is sometimes expressed as a percentage grade.
The formula is:
Percentage Grade = Slope × 100%
For example:
Slope = 0.05
Grade = 0.05 × 100%
Grade = 5%
This represents a rise of 5 units for every 100 horizontal units.
Examples of Slope and Grade
| Slope | Percentage Grade |
|---|---|
| 0 | 0% |
| 0.05 | 5% |
| 0.10 | 10% |
| 0.25 | 25% |
| 0.50 | 50% |
| 1 | 100% |
| 2 | 200% |
| −0.10 | −10% |
Negative grades indicate a downward slope when viewed from left to right.
A vertical line does not have a finite percentage grade because its run is zero.
In practical applications, such as ramps and roads, measurements should use consistent units and the correct horizontal distance.
How to Find the X-Intercept and Y-Intercept
An intercept is a point where a line crosses one of the coordinate axes.
Y-Intercept
The Y-intercept occurs when:
x = 0
Consider:
y = 2x − 1
Substitute x = 0:
y = 2(0) − 1
y = −1
The Y-intercept is:
(0, −1)
X-Intercept
The X-intercept occurs when:
y = 0
Using the same equation:
0 = 2x − 1
2x = 1
x = 1/2
The X-intercept is:
(0.5, 0)
The calculator displays intercepts when they are defined and applicable.
How to Find Distance and Midpoint Between Two Points
The Slope Calculator also provides useful coordinate geometry measurements when two points are entered.
Midpoint Formula
The midpoint is the point halfway between two coordinate points.
The formula is:
Midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2)
For:
A = (2, 3)
B = (6, 11)
Calculate:
X midpoint = (2 + 6) / 2 = 4
Y midpoint = (3 + 11) / 2 = 7
Midpoint = (4, 7)
Distance Formula
The straight-line distance between two points is:
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Using the same coordinates:
d = √((6 − 2)² + (11 − 3)²)
d = √(4² + 8²)
d = √80
Exact Distance = 4√5
Approximate Distance = 8.9443 units
Distance and midpoint are separate properties from slope, but they use the same coordinate information.
Worked Slope Examples
The following examples demonstrate common slope calculations.
| Point A | Point B | Slope | Slope Type |
|---|---|---|---|
| (2, 3) | (6, 11) | 2 | Positive |
| (1, 5) | (5, 1) | −1 | Negative |
| (1, 5) | (5, 5) | 0 | Horizontal |
| (3, 1) | (3, 8) | Undefined | Vertical |
| (1, 2) | (4, 4) | 2/3 | Positive fractional |
| (−3, 2) | (5, −6) | −1 | Negative |
| (2, 3) | (2, 3) | Indeterminate | Identical points |
Use the example buttons in the calculator to see how each type appears on the coordinate graph.
Does Swapping Two Points Change the Slope?
No.
The slope between two distinct points remains the same when their order is reversed.
For example:
A = (2, 3)
B = (6, 11)
The slope is:
m = (11 − 3) / (6 − 2)
m = 8 / 4 = 2
Now reverse the points.
A = (6, 11)
B = (2, 3)
Calculate:
m = (3 − 11) / (2 − 6)
m = −8 / −4
Slope = 2
Both the numerator and denominator change signs, so their ratio remains unchanged.
The Swap Points button demonstrates this relationship automatically.
Common Mistakes When Calculating Slope
Mixing X and Y Coordinates
The slope formula requires subtracting Y-values in the numerator and X-values in the denominator.
Correct:
m = (y₂ − y₁) / (x₂ − x₁)
Do not mix X and Y coordinates.
Subtracting Coordinates in Different Orders
If you subtract y₂ − y₁, you must also subtract x₂ − x₁.
Reversing only one subtraction changes the slope's sign.
Ignoring Negative Signs
For example:
4 − (−3) = 7
Not 1.
Use parentheses when substituting negative coordinates.
Confusing Zero Slope With Undefined Slope
A horizontal line has a zero slope.
A vertical line has an undefined slope.
They are not the same.
Forgetting to Simplify Fractions
If:
m = 8/12
Simplify to:
m = 2/3
The calculator displays the reduced fraction automatically.
Confusing Slope With Y-Intercept
In:
y = 3x + 4
Slope = 3
Y-intercept = 4
The two values have different meanings.
Assuming Rise and Run Determine a Unique Line
Rise and run determine slope but not a line's position.
A point or intercept is also needed to identify a specific line.
Where Is Slope Used in Real Life?
Slope is useful beyond algebra homework.
Mathematics and Coordinate Geometry
Students use slope to calculate line equations, understand functions, and interpret graphs.
Science and Physics
The slope of a graph can represent how one measured quantity changes relative to another, such as the rate of change of distance over time.
Engineering
Engineers use gradients and slopes when analyzing geometric relationships and designing systems.
Construction and Architecture
Slope helps describe inclines, grades, ramps, and other angled surfaces.
Data Analysis
The slope of a linear trendline indicates the direction and rate of change represented by that fitted line.
However, the slope of a fitted trendline is not necessarily the same as the slope between any two individual data points.
Related Math & Graphing Tools
Explore these related Skills Elevate tools to practice coordinate geometry, fractions, graphs, and numerical calculations.
- Distance Formula Calculator — calculate straight-line distance between two coordinate points with steps and a graph.
- Fraction Calculator — simplify fractions and perform exact fraction arithmetic.
- Scatter Plot Maker — plot multiple X and Y data points and explore an optional linear trendline.
- Rounding Calculator — round decimal slope values, angles, and other numerical results.
Frequently Asked Questions
What is a slope calculator?
A Slope Calculator finds the slope of a straight line from coordinates, rise and run, or a linear equation. It can also explain the calculation and show the line on a graph.
How do I calculate slope between two points?
Use:
m = (y₂ − y₁) / (x₂ − x₁)
Subtract the Y-coordinates, subtract the X-coordinates, and divide the two differences.
What is the slope formula?
The slope formula is:
Slope = Rise / Run = (y₂ − y₁) / (x₂ − x₁)
It describes vertical change divided by horizontal change.
How do I find slope from a graph?
Choose two distinct points on the straight line, calculate the vertical change and horizontal change, and divide rise by run.
How do I find slope from an equation?
For y = mx + b, the slope is m.
For Ax + By = C, the slope is −A/B when B is not zero.
What does a positive slope mean?
A positive slope means the line rises as you move from left to right.
What does a negative slope mean?
A negative slope means the line falls as you move from left to right.
What is the slope of a horizontal line?
The slope of a horizontal line is 0 because its vertical change is zero.
What is the slope of a vertical line?
The slope of a vertical line is undefined because its horizontal change is zero, resulting in division by zero.
What happens when the two points are identical?
Two identical points do not determine a unique straight line. The slope expression becomes 0/0, which is indeterminate.
Can slope be a fraction?
Yes. A slope can be an integer, fraction, or decimal. For example, a line that rises 2 units over a run of 3 units has a slope of 2/3.
Can I calculate slope with negative coordinates?
Yes. The standard slope formula works with negative numbers. Be careful to preserve the signs during subtraction.
Can the calculator show steps?
Yes. The Step-by-Step Solution section displays the formula, substitutions, coordinate differences, and simplified result where applicable.
Can I calculate slope from rise and run?
Yes. Choose Rise / Run and enter the vertical and horizontal changes. The calculator divides rise by run and provides a representative line visualization.
Can I find the equation of a line using this tool?
Yes. When the inputs determine a unique line, the calculator displays slope-intercept, point-slope, and standard forms.
What is the difference between slope and Y-intercept?
Slope describes how steeply a line rises or falls.
The Y-intercept identifies where the line crosses the vertical axis.
Does swapping two points change the slope?
No. Swapping the points reverses both coordinate differences, leaving their ratio unchanged.
How do I convert slope to an angle?
For finite slope m, use the inverse tangent function and express the result as the line's inclination between 0° and 180°.
How do I convert slope to percentage grade?
Multiply the slope by 100%.
For example, a slope of 0.08 corresponds to an 8% grade.
Can I use decimal or fractional coordinates?
Yes. The calculator accepts integers, negative values, decimals, and fractions such as 1/2.
Does the calculator graph the slope?
Yes. The interactive coordinate graph displays the selected line and relevant points. It also provides grid, rise/run, and zoom controls.
Is the Slope Calculator free?
Yes. The Skills Elevate Slope Calculator is free to use for coordinate geometry, line equations, graphs, and step-by-step slope calculations.