HOSTINGER✦Limited Time Deal✦Biggest Deals of the Year✦24/7 Support✦30-Day Money-Back Guarantee✦Free Domain & SSL✦Don't Miss Out — Claim Your Discount →✦HOSTINGER✦Limited Time Deal✦Biggest Deals of the Year✦24/7 Support✦30-Day Money-Back Guarantee✦Free Domain & SSL✦Don't Miss Out — Claim Your Discount →✦
🆕 Newly Added Calculators:

✏️ Equation of a Line Calculator

Advertisement100% Free SEO Tools by metacalculator.orgText, image & PDF tools that run right in your browser. No sign-up, no limits.Try Free Tools

Every straight line has an equation, and there are three standard ways to write it: slope-intercept (y = mx + b), point-slope (y − y₁ = m(x − x₁)) and standard form (Ax + By = C). Different starting information suits different forms, and converting between them is a daily algebra task.

Tell this calculator what you know — two points, one point and the slope, or the slope and y-intercept — and it produces all three forms, both intercepts and the angle of the line, with the line drawn on a graph.

📊 Graph — updates as you type

How to use this calculator

Pick the form that matches your given information, fill in its fields, and read all three versions of the equation from the results.

  1. Choose what you know: two points, a point and slope, or slope and y-intercept.
  2. Fill in the fields for that choice (the other fields are ignored).
  3. Press Calculate.
  4. Read the slope-intercept, point-slope and standard forms, and check the line on the graph.

Equation of a Line Worked Example

Find the equation of the line through (1, 2) and (3, 8). The slope is m = (8 − 2)/(3 − 1) = 3. Using (1, 2) in point-slope form: y − 2 = 3(x − 1), which expands to y = 3x − 1 (so b = −1). In standard form that is 3x − y = 1. The line crosses the x-axis at x = 1/3 and rises at an angle of arctan(3) ≈ 71.6°. Those are the default values above.

Frequently asked questions

Which form of a line equation should I use?

Slope-intercept (y = mx + b) is best for graphing and reading off slope and intercept. Point-slope is the quickest to write when you know a point and the slope. Standard form (Ax + By = C) is the convention for systems of equations and many textbook answers. They all describe the same line.

How do I find the equation of a line from two points?

First compute the slope m = (y₂ − y₁)/(x₂ − x₁). Then take either point and write point-slope form y − y₁ = m(x − x₁), and rearrange if you want slope-intercept form. This calculator does all three forms in one step.

What is the equation of a vertical line?

A vertical line has no slope and no y-intercept, so it cannot be written as y = mx + b. Its equation is simply x = a, where a is the x-coordinate of every point on it — for example x = 3. Enter two points with the same x in this calculator and it returns exactly that.

Why does my standard form look different from the answer key?

Standard form is usually written with integer coefficients, A positive, and common factors divided out: 3x − y = 1 rather than 6x − 2y = 2. This calculator scales to integers and removes common factors automatically, so it should match the conventional form.