Slope Calculator
Enter two points to get the slope of the line through them and its equation in slope-intercept, point-slope and standard form. The tool also gives the intercepts, the distance and midpoint of the segment, the angle with the x-axis and the slopes of parallel and perpendicular lines, and finds y for any x or x for any y. Everything runs in your browser.
y = 14
The slope of a line through two points is the rise over the run: m = (y2 - y1) / (x2 - x1). The y-intercept is b = y1 - m x1, which gives y = mx + b. Coordinates can be decimals, and all of the algebra uses exact fractions, so a slope of one third stays 1/3 and is not rounded to 0.3333. A vertical line has an undefined slope and the equation x = c, and a horizontal line has slope 0. The perpendicular slope is the negative reciprocal, and a parallel line has the same slope. Everything is worked out in your browser and nothing is uploaded.
Related Tools
[5 suggestions]Quadratic Equation Solver
Solve ax^2 + bx + c = 0 for real or complex roots, with the discriminant, exact form, vertex and factored form.
Math & MoneyPythagorean Theorem Calculator
Find the missing side, angles, area and perimeter of a right triangle from any two values, and see whether the sides form a Pythagorean triple.
Student ToolsFraction Calculator
Add, subtract, multiply and divide fractions, mixed numbers and decimals, simplify to lowest terms and see the steps.
Math & MoneyRatio Calculator
Simplify a ratio, list equivalent ratios, solve A : B = C : D for the missing term, and scale or split a total in a ratio.
Math & MoneyPercentage Calculator
Find a percentage of a number, what percent one number is of another, a percentage increase or decrease, or a number raised or lowered by a percentage.
Math & MoneyAbout the Slope Calculator
The slope of a line through (x1, y1) and (x2, y2) is the rise over the run: m = (y2 - y1) / (x2 - x1). The y-intercept is b = y1 - m x1, which gives the equation y = mx + b. The same line can also be written as y - y1 = m(x - x1), the point-slope form, or as Ax + By = C with whole numbers and A not negative, the standard form. Coordinates can be decimals, and all of the algebra is done with exact fractions, so a slope of one third stays 1/3 and is shown next to its decimal value instead of being rounded. A vertical line, where both x values are the same, has an undefined slope and the equation x = c. A horizontal line has slope 0 and no x-intercept. The perpendicular slope is the negative reciprocal, and a parallel line has the same slope. The distance between the points is the square root of dx squared plus dy squared, shown with the exact square, and the midpoint is the average of the coordinates. The angle is the inverse tangent of the slope, in degrees. Enter an x to find y on the line, or a y to find x. Nothing is uploaded.
How do I 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 (3, 8), the rise is 6 and the run is 2, so the slope is 3.
How do I write the equation of a line from two points?▾
Find the slope m, then the y-intercept b = y1 - m x1, and write y = mx + b. For (1, 2) and (3, 8), m is 3 and b is -1, so y = 3x - 1. The tool also gives the point-slope and standard forms.
What is the slope of a vertical or horizontal line?▾
A horizontal line has slope 0, because the rise is zero. A vertical line has an undefined slope, because the run is zero and you cannot divide by zero. A vertical line is written x = c.
How do I find a perpendicular or parallel slope?▾
A parallel line has the same slope. A perpendicular line has the negative reciprocal: turn the slope upside down and change its sign. A line with slope 3 has a perpendicular with slope -1/3.
Does it round the slope?▾
No. It keeps the exact fraction and shows the decimal beside it, so a slope of 1/3 is not turned into 0.333. Your points are not uploaded.