Line Through Two Points Calculator

Find the equation of a line passing through two given points.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

Given two points (x1, y1) and (x2, y2), the slope of the line through them is m = (y2 − y1) ÷ (x2 − x1), and once you have the slope, the y-intercept follows from plugging either point into the slope-intercept form y = mx + b and solving for b. This is the same point-slope method taught in every algebra course for turning two coordinates into a full linear equation.

Students use this to write the equation of a line as a standard algebra exercise, while it also comes up constantly outside the classroom: fitting a straight-line trend between two data points, like two years of sales figures to estimate a growth rate, calculating a rate of change in physics or economics, or setting up a linear conversion formula between two known reference values.

This calculator takes the coordinates of two points and returns the slope and y-intercept of the line passing through them, along with its full equation.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators