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

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

Frequently Asked Questions

Related tools

Last updated: 2026-05-23 · Reviewed by Nham Vu