Line Equation from Two Points

Enter two coordinate points and instantly get the slope-intercept equation, intercepts, and distance with a live graph.

Use the Line Equation from Two Points

Enter Two Points

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

  1. Enter the x and y coordinates for the first point (x1, y1).
  2. Enter the x and y coordinates for the second point (x2, y2).
  3. The slope m is calculated as (y2 - y1) / (x2 - x1).
  4. The y-intercept b is derived from y = mx + b using one of the points.
  5. The x-intercept is found by solving 0 = mx + b for x.
  6. 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

Last updated: 2026-09-22 · Reviewed by Nham Vu