Equation of a Line Calculator
Calculate line equations in slope-intercept, point-slope, and standard form from two points, a point and slope, or slope and y-intercept.
About Equation of a Line Calculator
The Equation of a Line Calculator finds the equation of a straight line from two points, a point and slope, or a slope and y-intercept. It returns slope-intercept, point-slope, and standard form instantly, along with slope, intercepts, and angle details.
Three Standard Forms of a Line
Slope-intercept form: $y = mx + b$, where $m$ is slope and $b$ is y-intercept.
Point-slope form: $y - y_1 = m(x - x_1)$, useful when one point and slope are known.
Standard form: $Ax + By = C$, often used in algebra and systems of equations.
How to Find a Line from Two Points
Given points $(x_1, y_1)$ and $(x_2, y_2)$:
$$m = \frac{y_2 - y_1}{x_2 - x_1}$$ $$b = y_1 - m \cdot x_1$$Then write $y = mx + b$. For example, points $(1, 2)$ and $(4, 8)$ give $m = 2$ and $b = 0$, so the equation is $y = 2x$.
Understanding Slope
Slope measures steepness and direction:
- Positive slope: line rises left to right
- Negative slope: line falls left to right
- Zero slope: horizontal line ($y = b$)
- Undefined slope: vertical line ($x = c$)
Related Tools
For coordinate conversions, try the Cartesian to Polar Converter. For fraction work, use the Equivalent Fractions Calculator.
Frequently Asked Questions
What is slope-intercept form?
Slope-intercept form is $y = mx + b$, where $m$ is the slope and $b$ is the y-intercept. It is the easiest form for graphing because the intercept and direction are visible immediately.
How do I find the equation from two points?
Subtract coordinates to get slope $m = (y_2 - y_1)/(x_2 - x_1)$, then substitute one point into $b = y_1 - mx_1$ to get $y = mx + b$.
Can I enter slope as a fraction?
Yes. Enter values like $2/3$ or $-5/4$ in the slope field. The calculator converts them to decimal form for all equation outputs.
What if both points have the same x-coordinate?
The line is vertical and has undefined slope. The calculator returns the vertical form $x = c$ instead of slope-intercept form.
What is standard form used for?
Standard form $Ax + By = C$ is useful for finding intercepts quickly and for solving systems of linear equations with elimination methods.