Line Calculator

This tool calculates and plots a line. Calculated properties include equation, slope, y-intercept and angle formed with x-axis.

line-calculator
-90 ° < `alpha` ≤ 90 ° (see below)


Line Formulas

(See representation above)

Line Equation : y = m * x + p

m : slope
p : y-intercept
M1 : point 1 of the line with coordinates (x1,y1)
M2 : point 2 of the line with coordinates (x2,y2)
`alpha` : angle between x-axis and the line
Its value is between -90° and 90° and has a positive sign for an increasing line (slope m > 0) and a negative sign for a decreasing line (m < 0).

`m = (y_2-y_1)/(x_2-x_1)`

`p = y_1 - m*x_1 = y_2 - m*x_2`

`alpha = arctan(m)`

`\text{distance}(M_1 , M_2)= sqrt((x_2-x_1)^2 + (y_2-y_1)^2)`

See also

Coordinate Geometry calculators
Geometry calculators
Mathematics calculators