Slope Calculator

How to use it

  1. Type the two points. Each coordinate can be a whole number, a decimal (2.75), a fraction (−3/4) or a mixed number (2 1/2).
  2. The slope appears at once as an exact fraction and as a decimal, with the line’s equation in slope-intercept, point-slope and standard form, its intercepts, the distance between the points, the midpoint and the angle the line makes with the x-axis.
  3. Every equation has a Copy button, and the steps under the results show the rise, the run and the y-intercept worked out.

The formula, worked through

Slope is rise over run: m = (y2 − y1) ÷ (x2 − x1). For the points (−1, 2) and (3, 5), the rise is 5 − 2 = 3 and the run is 3 − (−1) = 4, so m = 3/4: the line climbs 3 units for every 4 to the right. The y-intercept follows from b = y1 − m·x1 = 2 − (3/4)(−1) = 11/4. The calculator writes the same line three ways:

FormFor (−1, 2) and (3, 5)Useful for
Slope-intercept, y = mx + by = (3/4)x + 11/4reading the slope and where the line crosses the y-axis
Point-slope, y − y1 = m(x − x1)y − 2 = (3/4)(x + 1)writing a line straight from one point and its slope
Standard, Ax + By = C3x − 4y = −11whole-number coefficients, systems of equations, and vertical lines

Standard form is written with whole numbers that share no common factor and a positive x coefficient (or a positive y coefficient when there is no x term), the convention most textbooks use, so 6x − 8y = −22 and −3x + 4y = 11 both come out as 3x − 4y = −11.

Vertical and horizontal lines

When both points have the same x-coordinate, the run is zero and the slope is undefined: you cannot divide by zero. The line is vertical, its equation is x = (that x-coordinate), it has no y-intercept and it cannot be written in slope-intercept form. When both points have the same y-coordinate, the rise is zero, so the slope is 0 and the line is horizontal: y = (that y-coordinate). A slope of 0 and an undefined slope are different things, a common mix-up on tests.

Why exact fractions

Decimal calculators turn the slope between (0, 0) and (3, 1) into 0.3333333333 and then build the intercept and the equation from the rounded value, which is how answers end up off in the last digit. This calculator reads what you type exactly (0.1 is 1/10, not the nearest binary number), does all the arithmetic on whole-number fractions, and reduces at the end. The distance between the points is shown in simplest radical form, such as 6√5 for (2, −3) and (−4, 9), and as a decimal.

What we tested

On October 15, 2026 we ran the page’s own functions on 3,000 random pairs of points written as whole numbers, decimals, fractions and mixed numbers, and checked every answer with the SymPy computer-algebra library: slope, y-intercept, standard-form coefficients (both points satisfy them, no common factor, sign rule), distance (equal to the exact square root, with nothing square left under the radical), midpoint and angle were all correct in every case, including 133 vertical and 135 horizontal lines; the same point twice and unreadable input gave a message instead of an answer. Each equation the page displays was read back by SymPy and passed through both points. In Chromium: (−1, 2) and (3, 5) showed slope 3/4 (0.75), y = (3/4)x + 11/4, y − 2 = (3/4)(x + 1), 3x − 4y = −11, distance 5, midpoint (1, 7/2) and 36.8699°; fractions and a mixed number gave 16/9 and a distance of (1/12)√337; a vertical line showed an undefined slope and x = 4, a horizontal one slope 0 and no x-intercept; the same point twice and a typo each showed a message; Copy put y = -2x + 1 on the clipboard; the points survived a reload; the page fitted a 390 px phone with no errors. We also checked the check: removing the standard-form sign rule made 1,486 of the cases fail.

Frequently Asked Questions

How do you find the slope between two points?+
Subtract the y-coordinates and divide by the difference of the x-coordinates in the same order: m = (y2 − y1) / (x2 − x1). For (−1, 2) and (3, 5) that is 3/4.
What does it mean when the slope is undefined?+
The two points have the same x-coordinate, so the run is zero and the line is vertical. Its equation is x = a number, and it has no slope-intercept form.
What is the difference between a slope of 0 and an undefined slope?+
A slope of 0 is a horizontal line (y = a number); an undefined slope is a vertical line (x = a number).
How do I find the equation of a line from two points?+
Find the slope, then the y-intercept b = y1 − m·x1, and write y = mx + b. The calculator also gives point-slope and standard form.
Can I enter fractions or decimals?+
Yes. Type fractions such as 3/4 or −7/2, mixed numbers such as 2 1/2, or decimals such as 0.75. Results stay exact.
How is the distance between the points calculated?+
With the Pythagorean theorem: the square root of (run² + rise²). The calculator simplifies the root, for example √180 = 6√5.

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service