Slope-intercept form from two points online calculator

[to-calculator-info][/to-calculator-info]

[calculator]

First point:

[calculator-input name=“x1” label=“1st point X coordinate” unit=“X”][/calculator-input] [calculator-input name=“y1” label=“1st point Y coordinate” unit=“Y”][/calculator-input]

First point:

[calculator-input name=“x2” label=“2nd point X coordinate” unit=“X”][/calculator-input] [calculator-input name=“y2” label=“2nd point Y coordinate” unit=“Y”][/calculator-input]

[calculator-expression name=“m” formula="(y2-y1)/(x2-x1)"] [calculator-expression name=“a” formula=“y1-m*x1”]

[calculator-output name=“equation of the line”] Slope-intercept form of the line: y = <%= m %>x + <%= a %> [/calculator-output]

[/calculator]

Formulae:

$$m = \frac{y_2 - y_1}{x_2 - x_1}$$$$a = y_1 - m\cdot x_1$$$$y = m\cdot x + a$$