Mathematics, Statistics & Geometry

Equation of a Line Calculator

Find the exact algebraic equation of a straight line (slope-intercept, point-slope, and standard form) by passing two Cartesian coordinate points.

Slope-Intercept Form
y = 2.0000x + 3.0000
Point-Slope Formy + 1 = 2.0000(x + 2)
Standard Form2.0000x - 1.0000y = -3.0000
Slope (m)2
Y-Intercept (b)3
Calculation StepsPoints: P1(-2, -1) and P2(3, 9) Slope m = (y₂ - y₁) / (x₂ - x₁) m = (9 - -1) / (3 - -2) = 2.0000 Y-Intercept b = y - mx b = -1 - (2.0000 * -2) = 3.0000 Slope-Intercept: y = 2.0000x + 3.0000 Standard Form: 2.0000x - 1.0000y = -3.0000

Calculated locally in your browser. Fast, secure, and private.

Connecting the Dots

The Equation of a Line Calculator is the ultimate algebra assistant. Give it any two points on a Cartesian grid, and it will automatically generate the exact mathematical equation that connects them in all three standard formats.

yy1=m(xx1)    y=mx+b\begin{aligned} y - y_1 = m(x - x_1) \implies y = mx + b \end{aligned}

Where:
m=
The steepness of the line (rise over run)
b=
The point where the line crosses the y-axis
(x1,y1)(x_1, y_1)=
A specific coordinate that the line passes through

Understanding Linear Relationships

A linear equation describes a relationship where a change in one variable causes a perfectly proportional change in another.

If you are plotting a car's distance over time:

  1. The slope (m) represents the constant speed of the car.
  2. The y-intercept (b) represents the starting position of the car when the timer began.

Practical Applications

  • Economics: Creating simple supply and demand curves to find market equilibrium.
  • Business: Calculating break-even points by plotting fixed costs versus revenue per unit.
  • Engineering: Modeling the elastic deformation of materials under stress (Hooke's Law is a linear equation).

Frequently Asked Questions

The slope-intercept form (y = mx + b) is the most popular way to write a linear equation because it instantly tells you how steep the line is (m) and where it starts on the y-axis (b).

Standard form (Ax + By = C) is useful for finding both the x and y intercepts quickly. By convention, A, B, and C should be integers, and A should be positive.

Slope is calculated as the 'change in y' divided by the 'change in x', often memorized as 'rise over run'. The formula is m = (y2 - y1) / (x2 - x1).

A vertical line has an 'undefined' slope because the change in x is 0, which would require dividing by zero. Its equation is simply x = [constant].

The point-slope form (y - y1 = m(x - x1)) is an intermediate mathematical step. It is the easiest way to write the equation when you know the slope and just one random point.