Line Equation From Two Points

Find the equation of a line through any two points in slope-intercept y = mx + b and standard form Ax + By + C = 0. Free coordinate geometry calculator with instant results.

Find line equation

About This Calculator

About the Line Equation from Two Points Calculator

This calculator finds the equation of a line passing through any two points on a 2D coordinate plane. Whether you are an algebra student learning linear equations, a teacher preparing lesson materials, or a professional working with coordinate geometry, this tool provides instant results in both slope-intercept form (y = mx + b) and standard form (Ax + By + C = 0).

The calculator uses the slope formula m = (y2 - y1) / (x2 - x1) to determine the steepness of the line, then calculates the y-intercept b = y1 - m x x1 to produce the complete equation. For vertical lines where x2 = x1, the slope is undefined and the equation is given as x = x1. For horizontal lines where y2 = y1, the slope is 0 and the equation is y = constant.

Applications

Line equations from two points are fundamental in algebra, geometry, physics, economics, and data analysis. Use this calculator to model linear relationships, find trend lines between data points, determine slopes for construction and engineering projects, analyze cost-revenue relationships, and solve coordinate geometry problems. The equation of a line is one of the most essential concepts in mathematics, forming the basis for understanding linear functions, rates of change, and proportional relationships.

Our calculator handles all edge cases including zero coordinates, negative values, decimal points, and large numbers. Simply enter the coordinates of any two points and click Calculate to see the complete line equation, slope, y-intercept, and standard form instantly.

Frequently Asked Questions

How do I find the equation of a line from two points?

To find the equation of a line from two points (x1, y1) and (x2, y2), first calculate the slope m = (y2 - y1) / (x2 - x1). Then use the point-slope form y - y1 = m(x - x1) to derive the slope-intercept form y = mx + b, where b = y1 - m x x1 is the y-intercept. For vertical lines (x2 = x1), the equation is simply x = x1.

What is the slope-intercept form of a linear equation?

The slope-intercept form of a linear equation is y = mx + b, where m represents the slope (steepness) of the line and b represents the y-intercept (where the line crosses the y-axis). This is the most common way to express a linear equation and makes it easy to graph the line by starting at point (0, b) and following the slope.

What is the standard form of a linear equation?

The standard form of a linear equation is Ax + By + C = 0, where A, B, and C are real numbers, and A and B are not both zero. To convert from slope-intercept form y = mx + b to standard form, rearrange to mx - y + b = 0. Standard form is useful for quickly finding intercepts and working with systems of equations.

What happens when x2 equals x1 (vertical line)?

When x2 = x1, the two points share the same x-coordinate, creating a vertical line. A vertical line has an undefined slope because the denominator (x2 - x1) is zero, and division by zero is undefined. The equation of a vertical line is x = x1, meaning every point on the line has the same x-coordinate. The standard form is x + 0y + C = 0.

What is the difference between a horizontal and vertical line?

A horizontal line has a slope of 0 and takes the form y = b, where b is the y-intercept. It runs left-to-right and never rises or falls. A vertical line has an undefined slope and takes the form x = a, where a is the x-coordinate shared by all points. It runs up-and-down. Perpendicular to each other, horizontal lines have equations y = constant, while vertical lines have equations x = constant.

Can I use this calculator for real-world problems?

Yes, the line equation from two points calculator is useful for many real-world applications including finding linear relationships in data sets, calculating trends in economics and finance, determining slopes in construction and engineering, analyzing motion in physics, and solving geometry problems in mathematics. The results include both slope-intercept and standard form, and vertical lines are handled correctly.

Is this line equation calculator free to use?

Yes, all calculators on Calculy are completely free to use with no registration or subscription required. You can calculate as many line equations as you need, share your results via URL, and use the tool for homework, teaching, or professional work.