Line Equation from Two Points
Enter two coordinate points and instantly get the slope-intercept equation, intercepts, and distance with a live graph.
Enter Two Points
Results
Equation
Slope (m)
Y-Intercept (b)
X-Intercept
Distance
Graph
Enter two points to see the graph
Copied!
Summary
Enter two coordinate points and instantly get the slope-intercept equation, intercepts, and distance with a live graph.
How it works
- Enter the x and y coordinates for the first point (x1, y1).
- Enter the x and y coordinates for the second point (x2, y2).
- The slope m is calculated as (y2 - y1) / (x2 - x1).
- The y-intercept b is derived from y = mx + b using one of the points.
- The x-intercept is found by solving 0 = mx + b for x.
- Distance is computed using the Pythagorean theorem: sqrt((x2-x1)^2 + (y2-y1)^2).
Use cases
- Verify homework answers for linear equation problems.
- Find the equation of a trend line through two data points.
- Calculate slope and intercepts for engineering or design problems.
- Visualize how changing coordinates shifts the line on a graph.
- Determine the distance between two locations on a coordinate map.
- Check if three points are collinear by testing the same equation.
Frequently Asked Questions
Related tools
Last updated: 2026-05-23 ·
Reviewed by Nham Vu