Skip to content
RK Calculator
Menu

Equation of a Line Calculator

Find the equation of a line in standard, slope-intercept and point-slope form from two points, a point and slope, the slope and intercept, or Ax + By = C.

Change the values and press Calculate to work out your own figures.

From two points

Enter two points on the line.

About x₁First point, x.
About y₁First point, y.
About x₂Second point, x.
About y₂Second point, y.
Result
Standard form
x − 4y = -13
Slope-intercept form
y = 1/4x + 13/4
Point-slope form
y − 4 = 1/4(x − 3)
Slope
1/4
Intercepts
x-intercept (-13, 0); y-intercept (0, 13/4)

The line is y = 1/4x + 13/4.

Show the working
  1. m = (y₂ − y₁) ÷ (x₂ − x₁) = (5 − 4) ÷ (7 − 3)
  2. Slope m = 1/4
  3. y-intercept b = 13/4

From a point and the slope

Enter a point and the slope.

About x₁First point, x.
About y₁First point, y.
About slope (m)Rise over run.
Result
Standard form
x − 4y = -13
Slope-intercept form
y = 1/4x + 13/4
Point-slope form
y − 4 = 1/4(x − 3)
Slope
1/4
Intercepts
x-intercept (-13, 0); y-intercept (0, 13/4)

The line is y = 1/4x + 13/4.

Show the working
  1. Through (3, 4) with slope 1/4
  2. Slope m = 1/4
  3. y-intercept b = 13/4

From the slope and y-intercept

Enter the slope and the y-intercept.

About slope (m)Rise over run.
About y-intercept (b)Where the line crosses the y-axis.
Result
Standard form
2x − y = 3
Slope-intercept form
y = 2x − 3
Point-slope form
y + 3 = 2x
Slope
2
Intercepts
x-intercept (3/2, 0); y-intercept (0, -3)

The line is y = 2x − 3.

Show the working
  1. Slope 2, crossing the y-axis at -3
  2. Slope m = 2
  3. y-intercept b = -3

From Ax + By = C

Enter A, B and C.

About aCoefficient of x in Ax + By = C.
About bCoefficient of y.
About cThe constant.
Result
Standard form
2x + 3y = 6
Slope-intercept form
y = -2/3x + 2
Point-slope form
y − 2 = -2/3x
Slope
-2/3
Intercepts
x-intercept (3, 0); y-intercept (0, 2)

The line is y = -2/3x + 2.

Show the working
  1. 2x + 3y = 6
  2. Slope m = -2/3
  3. y-intercept b = 2

How to use it

Enter two points on the line. Enter a point and the slope. Enter the slope and the y-intercept. Enter A, B and C.

Enter coordinates as whole numbers, decimals or fractions (3/4). Show the working gives the formula with your numbers.

Key facts

Ax + By = C; y = mx + b; y − y₁ = m(x − x₁)

Three forms

Standard form uses whole numbers; slope-intercept form shows the slope and where the line crosses the y-axis; point-slope form keeps a known point in view.

Questions

What line goes through (3, 4) and (7, 5)?

x − 4y = -13, or y = 1/4x + 13/4.

What about a vertical line?

It is written x = c; it has no slope-intercept form.

Formulas

Ax + By = C; y = mx + b; y − y₁ = m(x − x₁)

Sources

Limitations

  • Vectors have two or three components (leave z blank for 2-D).
  • Earth distances assume the WGS 84 ellipsoid (sea level).

Formula version 0.1.0Reviewed