Slope Calculator
Slope measures how steeply a line rises or falls, calculated as the change in y divided by the change in x between two points. A slope of 2 means the line climbs two units for every one it moves right, and a negative slope falls.
Point 1
Point 2
Coordinates can be decimals or negative. Everything is calculated in your browser and updates as you type.
Results
Everything is calculated in your browser. Nothing is uploaded.
How to calculate slope from two points
Enter the first point
Type the x and y coordinates of your first point into the Point 1 fields.
Enter the second point
Type the x and y coordinates of your second point into the Point 2 fields.
Read the results
The slope, angle, y-intercept, line equation, and distance update as you type, with no button to press.
Copy the answer
Click the copy button to put the full set of results on your clipboard.
Why use this tool
Slope from two points
Enter any two points and get the slope as rise over run, so (1, 3) and (3, 7) return a slope of 2.
Angle, intercept, and equation
Alongside the slope you get the incline angle in degrees, the y-intercept, and the line in slope-intercept form, like y = 2x + 1.
Distance between the points
The length of the segment joining the two points is measured with the distance formula, so you get the straight line distance as well.
Handles vertical and equal points
A vertical line reports an undefined slope with a 90 degree angle, and two identical points are flagged instead of returning a broken result.
Decimals and negatives welcome
Every field accepts decimals and negative coordinates, so points below or left of the origin work just as well.
Runs entirely in your browser
Every calculation happens on your device. Nothing you type is uploaded.
About this tool
The slope of a line measures how steep it is: the change in y divided by the change in x, often called rise over run. Enter two points and this calculator subtracts the coordinates to get the rise and the run, divides one by the other, and reports the slope. Points of (1, 3) and (3, 7) give a rise of 4 and a run of 2, so the slope is 2. A positive slope rises from left to right, a negative slope falls, and a slope of 0 is a flat horizontal line.
From the slope you also get the incline angle in degrees, the y-intercept where the line crosses the vertical axis, and the whole line written in slope-intercept form as y = mx + b. The distance formula measures the straight line length of the segment between the two points, which is the square root of the run squared plus the rise squared. Coordinates can be whole numbers, decimals, or negative, and everything updates the moment you type with no button to press.
Two special cases are handled cleanly. When both points share the same x value the line is vertical, the run is zero, and the slope is undefined, so the calculator reports a 90 degree angle and the line x equals that value instead of dividing by zero. When both points are identical there is no line at all, and you get a short message rather than a wrong answer. For right triangle sides and angles see the triangle calculator, and for wider maths see the scientific calculator.
Frequently asked questions
- How do I find the slope between two points?
- Enter both points and the calculator subtracts the coordinates to get the rise (change in y) and the run (change in x), then divides the rise by the run. Points of (1, 3) and (3, 7) give a rise of 4 and a run of 2, so the slope is 2.
- What is the equation of the line?
- The line is shown in slope-intercept form, y = mx + b, where m is the slope and b is the y-intercept. A slope of 2 through a point that gives an intercept of 1 is written as y = 2x + 1. A horizontal line shows as y equals its constant value.
- What happens with a vertical line?
- When both points have the same x value the run is zero, so the slope is undefined and cannot be divided. The calculator reports an undefined slope, a 90 degree angle, and the line as x equals that value, rather than showing a broken result.
- Can I use decimals and negative coordinates?
- Yes. Every field accepts decimals and negative numbers, so points below or to the left of the origin work exactly like positive whole numbers. Identical points are flagged, since a line needs two distinct points.
- Is my data uploaded anywhere?
- No. Everything runs in your browser; nothing is sent to a server.
Related tools
Triangle Calculator
Enter two legs of a right triangle for the hypotenuse, area, perimeter, and angles, or a base and height for the area.
Scientific Calculator
Type a full expression with trigonometry, logarithms, powers, roots, and factorials, and see the result update live as you go.
Ratio Calculator
Reduce a ratio to lowest terms, or solve a proportion for the one value you are missing.
Pythagorean Theorem Calculator
Enter any two sides of a right triangle to solve for the third, plus the area, perimeter, and both acute angles.
Quadratic Formula Calculator
Enter the coefficients a, b, and c to solve ax² + bx + c = 0, with real or complex roots, the discriminant, the nature of the roots, and the parabola vertex.
Recipe Scaler Calculator
Enter the servings a recipe makes and the servings you want, and every ingredient is recalculated for you. Mixed fractions like 1 1/2 are read correctly and results round to friendly amounts.