Skip to content
Calcrivo

Line Equation Calculator

Determine the equation of a line through two points in slope-intercept and standard forms.

Inputs

Line Equation

y = 2.0000x + 0.0000

Slope (m)

2.0000

Y-Intercept (b)

0.0000

Step by step

  1. Slope

    m = (8 − 2) / (4 − 1)

    = 2.0000

  2. Equation

    = y = 2.0000x + 0.0000

How it works

Given two points, the slope is m = (y₂−y₁)/(x₂−x₁). The slope-intercept form is y = mx + b, where b = y₁ − m·x₁.

Formulas

Slope

m = (y₂ − y₁) / (x₂ − x₁)

x₁,y₁
First point
x₂,y₂
Second point

Slope-Intercept Form

y = mx + b

m
Slope
b
Y-intercept

Frequently Asked Questions

What if the line is vertical?

Vertical lines have undefined slope. The equation is simply x = constant.

How do I convert to standard form Ax + By = C?

Rearrange y = mx + b to get −mx + y = b, then multiply through to clear fractions if needed.

You might also need