About Slope Calculator
This slope calculator is free, needs no sign-up and runs in your browser, so the points you type are never uploaded. Enter two points (x1, y1) and (x2, y2) and it finds the slope as rise over run, the angle the line makes with the x axis, and the equation of the line in slope-intercept, point-slope and standard form.
It also gives the distance between the points and their midpoint, each with the formula and the arithmetic shown. Fractions stay exact where they can: a slope of 4 over 3 is shown as a fraction, not as 1.3333.
The graph plots the line and the points, and you can pan and zoom it. A parallel and perpendicular mode adds a third point and draws the lines through it that are parallel and perpendicular to the first.
How to use Slope Calculator
- Type the coordinates of point 1 and point 2. Negative numbers and decimals are fine.
- Pick what you need: everything, slope and angle, line equation, distance, midpoint, or parallel and perpendicular lines.
- Read the headline answer and the table of every result under it.
- Check the graph. Drag to pan and scroll or pinch to zoom, and use the trace to read coordinates.
- Open the step-by-step working to copy the method into your homework.
- For parallel and perpendicular lines, enter the point the new lines must pass through.
Features
- Slope as an exact fraction and a decimal, with rise and run.
- Angle of inclination between 0 and 180 degrees.
- Slope-intercept, point-slope and standard form with whole-number coefficients.
- Vertical and horizontal lines handled correctly (slope undefined or zero).
- Distance formula and midpoint formula with steps.
- Parallel and perpendicular lines through a chosen point.
- An interactive graph of the line, the points and the midpoint.
- Step-by-step working in KaTeX.
The formulas
Slope is the change in y divided by the change in x. A vertical line has no slope because the run is zero. Distance comes from the Pythagorean theorem, and the midpoint is the average of the coordinates.
A perpendicular line has the negative reciprocal of the slope, and a parallel line has the same slope.
m = (y₂ − y₁) / (x₂ − x₁)
y = mx + b, b = y₁ − m x₁
y − y₁ = m(x − x₁)
d = √((x₂ − x₁)² + (y₂ − y₁)²)
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)
m⊥ = −1 / mWorked examples
(1, 2) and (4, 6) gives m = 4/3, distance 5, midpoint (2.5, 4)
Angle 53.13°. Standard form 4x-3y = -2.
(-3, 5) and (2, -5) gives m = -2
Falling line, angle 116.57° from the x axis, distance 11.1803.
(2, 1) and (2, 7) gives Slope undefined, line x = 2
A vertical line: the run is zero. The distance is 6 and the angle is 90°.
What the slope tells you
| Slope | Line | Angle with the x axis |
|---|---|---|
| Positive | Rises from left to right | Between 0° and 90° |
| Zero | Horizontal | 0° |
| Negative | Falls from left to right | Between 90° and 180° |
| Undefined | Vertical | 90° |
Good to know
Slope as percent grade
A road or roof grade is the slope written as a percentage: multiply the slope by 100. A slope of 0.08 is an 8% grade. The angle is a different measure, the arctangent of the slope.
Privacy: how it works
- Every result is calculated by code in your browser tab. The coordinates you enter are not sent to Ulkaa or to any other server, and there is nothing to sign in to.
Tips
- Keep the order consistent. Subtract the first point from the second in both the numerator and the denominator, or the sign of the slope flips.
- If both points are the same, no line is defined. The calculator tells you.
- Two lines are perpendicular when the product of their slopes is −1, and parallel when the slopes are equal.
- Standard form is scaled to whole numbers with no common factor, so decimals in the points are cleared for you.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your points are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your points are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
How do you find the slope between two points?
Subtract the y values and divide by the difference of the x values: m = (y2 − y1) / (x2 − x1). For (1, 2) and (4, 6) that is 4 / 3.
What is the slope of a vertical line?
It is undefined, because the change in x is zero and you cannot divide by zero. The equation of the line is x = a constant.
How do I write the equation of a line from two points?
Find the slope m, then b = y1 − m x1 for y = mx + b. The calculator also writes the point-slope and standard forms.
How do I find a line perpendicular to another?
Take the negative reciprocal of the slope and use the point the new line must pass through. A horizontal line has a vertical perpendicular.
What is the angle of a line?
It is the arctangent of the slope, measured from the positive x axis. The calculator reports a value from 0 to 180 degrees.
Can I use decimals and fractions?
Decimals work in any box. Results that are simple fractions are displayed as fractions, and the standard form is converted to whole numbers.
Popular Slope Calculator pages
- Slope From Two Points CalculatorEnter two points and get rise over run and the angle of the line.
- Distance Formula CalculatorEnter two points to get the straight-line distance between them.
- Midpoint CalculatorEnter two endpoints to get the midpoint of the segment.
- Line Equation From Two PointsEnter two points to get the equation of the line in three forms.
- Slope-Intercept Form CalculatorEnter two points and read the slope and the y-intercept of y = mx + b.
- Parallel and Perpendicular Line CalculatorEnter a line by two points and a third point, and get the parallel and perpendicular lines through it.
- Perpendicular Line CalculatorEnter a line by two points and the point the perpendicular must pass through.