Equation Of A Line Calculator
Find the equation of a line, slope, and intercepts. Enter two points to instantly calculate the line’s formula in multiple algebraic forms.
Coordinates & Points
Enter two points to calculate the equation of the line
The X-coordinate of the first point.
The Y-coordinate of the first point.
The X-coordinate of the second point.
The Y-coordinate of the second point.
Line Equation Results
Slope, intercepts, and equation forms
Enter two points above and click Calculate Line Equation to reveal the slope, intercepts, and equation forms.
Common Line Equation Forms
Linear equations can be expressed in multiple forms depending on the known variables. Here are the most common standard forms used in algebra and geometry.
| Equation Form | Formula | Variables | Best Used When |
|---|---|---|---|
| Slope-Intercept | y = mx + b | m = slope, b = y-intercept | You know the slope and y-intercept |
| Point-Slope | y – y₁ = m(x – x₁) | m = slope, (x₁, y₁) = point | You know the slope and any point |
| Standard | Ax + By = C | A, B, C = integers (A ≥ 0) | Solving systems of linear equations |
| Horizontal | y = b | b = constant Y value | Slope is exactly zero |
| Vertical | x = a | a = constant X value | Slope is undefined |
| Two-Point | y – y₁ = [(y₂ – y₁)/(x₂ – x₁)](x – x₁) | (x₁, y₁), (x₂, y₂) = points | You only know two points on the line |
Line Equation FAQ
Everything you need to know about calculating linear equations, slopes, and intercepts in algebra.
First, calculate the slope (m) using the formula m = (y₂ – y₁) / (x₂ – x₁). Then, substitute the slope and one of the points into the point-slope form (y – y₁ = m(x – x₁)) and simplify to get the slope-intercept form (y = mx + b).
The slope-intercept form is y = mx + b, where ‘m’ represents the slope of the line and ‘b’ represents the y-intercept (the point where the line crosses the y-axis). It is the most common way to express a linear equation.
The slope (m) is calculated by finding the ‘rise over run’ between two points. The formula is m = (y₂ – y₁) / (x₂ – x₁). A positive slope means the line goes up from left to right, while a negative slope means it goes down.
The standard form is Ax + By = C, where A, B, and C are typically integers, and A must be non-negative. This form is particularly useful for finding x and y intercepts and for solving systems of linear equations.
If both points have the same X-coordinate, the line is perfectly vertical. The slope is mathematically undefined because you would be dividing by zero in the slope formula. The equation of the line is simply x = [that X-coordinate].
The y-intercept (b) is the value of ‘y’ when ‘x’ is 0. If you have the slope (m) and a point (x₁, y₁), you can find it using the formula b = y₁ – m * x₁. Graphically, it is the exact point where the line crosses the vertical Y-axis.
