What this calculator does
Equation of a line works out slope-intercept, point-slope and standard form of the line through two points. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.
The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.
The formula
The inputs explained
| Field | What to enter |
|---|---|
| x₁ | A number. Starts at 1. |
| y₁ | A number. Starts at 2. |
| x₂ | A number. Starts at 4. |
| y₂ | A number. Starts at 11. |
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How the answer changes with x₁
Every other input is held at the calculator’s starting values while x₁ varies. Select any row to load that scenario into the calculator.
| x₁ | Slope-intercept form | Point-slope form | Standard form (Ax + By = C) |
|---|---|---|---|
| 0.5 | y = 2.571x + 0.7143 | y − 2.000 = 2.571(x − 0.5000) | 2.571x − y = -0.7143 |
| 0.75 | y = 2.769x − 0.0769 | y − 2.000 = 2.769(x − 0.7500) | 2.769x − y = 0.0769 |
| 1 | y = 3.000x − 1.000 | y − 2.000 = 3.000(x − 1.000) | 3.000x − y = 1.000 |
| 1.5 | y = 3.600x − 3.400 | y − 2.000 = 3.600(x − 1.500) | 3.600x − y = 3.400 |
| 2 | y = 4.500x − 7.000 | y − 2.000 = 4.500(x − 2.000) | 4.500x − y = 7.000 |
| 3 | y = 9.000x − 25.000 | y − 2.000 = 9.000(x − 3.000) | 9.000x − y = 25.000 |