Slope Calculator
Calculate slope from two points or slope-intercept form, find angle of inclination, parallel and perpendicular slopes, and graph the line.
Find the equation of a line through two points. Get slope-intercept, point-slope, and standard forms plus slope, intercepts, distance, midpoint, and angle.
| Form | General | This Line |
|---|---|---|
| Slope-Intercept | y = mx + b | y = 3.0000x − 1.0000 |
| Point-Slope | y − y₁ = m(x − x₁) | y − 2.0000 = 3.0000(x − 1.0000) |
| Standard | Ax + By = C | 3x − 1y = 1 |
| Parametric | (x,y) = P₁ + t·(P₂−P₁) | (x, y) = (1.0000, 2.0000) + t(2.0000, 6.0000) |
| x | y | Note |
|---|---|---|
| -2.0000 | -7.0000 | |
| -1.0000 | -4.0000 | |
| 0.0000 | -1.0000 | y-intercept |
| 1.0000 | 2.0000 | Point 1 |
| 2.0000 | 5.0000 | |
| 3.0000 | 8.0000 | Point 2 |
| 4.0000 | 11.0000 | |
| 5.0000 | 14.0000 | |
| 6.0000 | 17.0000 |
Finding the equation of a line passing through two points is one of the most fundamental tasks in coordinate geometry and algebra. Given two points (x₁, y₁) and (x₂, y₂), this calculator computes the line equation in three standard forms — slope-intercept (y = mx + b), point-slope (y − y₁ = m(x − x₁)), and general standard form (Ax + By = C) — along with a parametric representation.
Beyond the equation itself, the calculator derives the slope, both intercepts (x and y), the distance between the two points, their midpoint, and the angle the line makes with the positive x-axis. These properties are essential for graphing, analysing linear relationships, and solving coordinate-geometry problems that appear in courses from pre-algebra through calculus and analytic geometry.
Whether you are checking coordinate-geometry homework, preparing worked examples, or validating a line before using it in another calculation, the page keeps the slope, intercepts, midpoint, distance, and angle together. The sample-points table lets you verify the equation at integer x-values, while the equation-forms reference shows how the same line looks in each common algebraic form.
Writing a line from two points is simple in principle, but sign mistakes and fraction errors are common once you convert the result between forms. This calculator keeps slope-intercept, point-slope, and standard form side by side so you can see whether each rearrangement is still describing the same line.
It is also useful when the equation is only part of the job. Midpoint, distance, intercepts, and angle are all derived from the same two coordinates, so it is more practical to check them together than to work them out on separate pages.
Slope m = (y₂ − y₁)/(x₂ − x₁). Slope-intercept: y = mx + b where b = y₁ − mx₁. Standard form: Ax + By = C derived from the slope equation with integer coefficients.Result: Slope-Intercept Form shown by the calculator
Using the preset "(0,0)→(1,1)", the calculator evaluates the line equation from two points setup, applies the selected algebra rules, and reports Slope-Intercept Form with supporting checks so you can verify each transformation.
The calculator starts by finding the slope m = (y₂ − y₁)/(x₂ − x₁). It then substitutes one of the points into y = mx + b to solve for the intercept, rewrites the result in point-slope form, and normalizes the equation into standard form. From the same two coordinates it also derives the midpoint, distance, intercepts, and angle.
Start with the slope and one equation form you recognize, then compare the others. If the slope is positive, negative, zero, or undefined, the intercepts and angle should match that behavior. The midpoint and distance are useful checks that your input points were entered correctly.
Try swapping the two points and confirm that the line equation does not change. Then use a horizontal example and a vertical example to see how the calculator handles slope 0 and undefined slope as special cases.
Last updated:
First calculate the slope m = (y₂ − y₁)/(x₂ − x₁), then substitute one point into y = mx + b to solve for b. The result is the slope-intercept form y = mx + b.
If both points are identical, infinitely many lines pass through that single point — the equation is not uniquely determined. This calculator requires two distinct points.
Point-slope form is y − y₁ = m(x − x₁), which uses the slope m and one known point. It is equivalent to slope-intercept form but is often easier to write when you already know a point on the line.
Starting from y = mx + b, rearrange to mx − y = −b, then multiply through to clear fractions and ensure the leading coefficient is positive. This gives Ax + By = C.
The slope measures the steepness and direction: positive slopes rise left to right, negative slopes fall, zero means horizontal, and undefined (infinite) means vertical.
The angle θ that a line makes with the positive x-axis satisfies tan(θ) = m. Use arctan(m) to find the angle in degrees or radians.
Calculate slope from two points or slope-intercept form, find angle of inclination, parallel and perpendicular slopes, and graph the line.
Find the midpoint of a line segment in 2D or 3D. Also calculates distance, slope, line equation, direction angle, and section formula for any ratio. Presets and reference table included.
Work with equations in y = mx + b form. Enter slope and y-intercept or two points to find the equation, x-intercept, slope angle, parallel/perpendicular slopes, and generate sample points.