Line Equation From Two Points Calculator

Find the equation of a line through two points in every common form.

Results

Enter your details and click Calculate to see your results.
About This Calculator

m = (y₂ − y₁) ÷ (x₂ − x₁), b = y₁ − m·x₁.

Example

Example: the default inputs → Result: y = 2x.

Assumptions

Exact formulas; results rounded for display.

Frequently Asked Questions

What is the line through (1, 2) and (4, 8)?

y = 2x.

What if x₁ = x₂?

It's a vertical line x = x₁.

Related Calculators

About the Author

Imran Hossain
Imran Hossain

Professional SEO, Digital Marketer Specialist

I am a Certified Google Ads Expert And Professional SEO, Digital Marketing Specialist

View full profile