Skip to content
Math

Slope & Line Equation Calculator

Enter two points to get the slope and the full equation of the line — slope-intercept, point-slope and standard forms — plus intercepts, midpoint, distance and angle, with a graph.

Calculator

Input mode
Point 1
Point 2
Slope-intercept form
y = 2x + 3
Through (0, 3) and (2, 7).
Slope
2
y-intercept
3
x-intercept
-1.5
Point-slope
y − 3 = 2(x − 0)
Standard form
2x − y = -3
Midpoint
(1, 5)
Distance
4.4721

Graph

Results are estimates. Verify with a professional for important decisions.

About this calculator

This calculator finds every property of the line through two points you enter: slope, y-intercept, x-intercept, slope-intercept form (y = mx + b), point-slope form, standard form (Ax + By = C), the midpoint, the distance between the points, and the angle of inclination. An interactive graph shows the line and both points at a glance.

How to read your results

Enter the coordinates of your two points and the results update instantly. The headline result card shows the slope-intercept equation. Below it, a detail panel lists the point-slope form, standard form, midpoint, and distance. A small graph renders the line and highlights the two input points. The slope and angle of inclination also appear in the stat strip at the top of the page.

How it's calculated

The slope is m = (y₂ − y₁) / (x₂ − x₁). The y-intercept follows from b = y₁ − m·x₁ and the x-intercept from −b/m. Standard form coefficients are derived from (y₂ − y₁)x − (x₂ − x₁)y = (y₂ − y₁)x₁ − (x₂ − x₁)y₁, then reduced by the GCD of the integer coefficients and normalized so A ≥ 0. The angle of inclination is arctan(m) in degrees, shifted to [0°, 180°) for negative slopes. Formulas follow Wolfram MathWorld: Slope-Intercept Form and Slope.

Worked example

Enter point 1 as (1, 3) and point 2 as (4, 9).

The calculator returns slope 2, y-intercept 1, x-intercept −0.5, equation y = 2x + 1, standard form 2x − y = −1, midpoint (2.5, 6), distance approximately 6.708, and angle of inclination about 63.43°.

Frequently asked questions

What does the slope tell me?

The slope (m) measures how steeply the line rises or falls. A slope of 2 means the line goes up 2 units for every 1 unit it moves to the right. A negative slope means the line falls from left to right, and a slope of zero means the line is horizontal. A vertical line has no defined slope.

What is the difference between the three equation forms?

Slope-intercept form (y = mx + b) is the most convenient for reading off the slope and y-intercept directly. Point-slope form (y − y₁ = m(x − x₁)) is useful when you know one point and the slope. Standard form (Ax + By = C) keeps all variables on one side and is common in systems of equations. All three represent the same line.

How are the midpoint and distance calculated?

The midpoint is the average of the two x-coordinates and the average of the two y-coordinates: ((x₁ + x₂)/2, (y₁ + y₂)/2). The distance is the length of the straight segment between the two points, found with the Pythagorean theorem: √((x₂ − x₁)² + (y₂ − y₁)²).

Sources

Reviewed by the YouCalc Team · Last reviewed

Spot a translation issue, a calculation issue, or have a suggestion? Let us know.

More calculators like this. Pick the next one.