Line Equation from Two Points
Find the slope-intercept equation through two points.
Build the equation of the line through two points.
How the Math Works
The Line Equation from Two Points calculator uses the fundamental slope-intercept form y = mx + b to determine the equation of a straight line passing through any two given points. First, it calculates the slope (m) by dividing the difference in y-coordinates by the difference in x-coordinates: m = (y2 - y1)/(x2 - x1). Then, it substitutes one of the original points into the equation along with the calculated slope to solve for the y-intercept (b). The resulting equation y = mx + b represents every point on the infinite straight line that connects your two original coordinates.
Practical Applications
To use this calculator, simply enter the x and y coordinates of your two points into the designated input fields. The calculator will automatically process these values and display the complete slope-intercept equation. For example, if you input points (2, 3) and (4, 7), the calculator determines the slope is 2, finds the y-intercept is -1, and presents the equation y = 2x - 1. You can then verify this equation by checking that both original points satisfy it, or use it to find y-values for any other x-values along the same line.
Day-to-Day Use
This calculation helps in countless everyday situations where relationships between two variables follow a linear pattern. You might use it to predict costs based on quantity when shopping, estimate travel times based on distance, analyze trends in your monthly expenses, or determine break-even points for small business decisions. Even when planning a garden and spacing plants evenly, or calculating the rate at which you're saving money, understanding the linear relationship between your variables can make informed decisions faster and more accurately.
Worked example
(1,2) & (3,6) → y = 2x + 0.
FAQ
Vertical line?
Slope is undefined; the equation is x = constant.