Equation of a Line Calculator

How to Use:

  • Enter a point (x₁, y₁) and slope (m) OR
  • Enter two points (x₁, y₁) & (x₂, y₂) to find the equation.
  • Click Calculate Equation to get results.
  • Formulas Used:
    • m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1}
    • y=mx+by = mx + b
    • Parallel: y=mx+by = mx + b' (Same slope, new intercept)
    • Perpendicular: m=1mm' = -\frac{1}{m} (Negative reciprocal slope)
  • If x₁ = x₂, the equation is x=constantx = \text{constant} (vertical line).