Equation of Line Calculator

Switch between two-point, slope-intercept, standard, and point-slope methods. Instantly compare forms, intercepts, and plotted coordinates. Perfect for homework checks, teaching demos, and revision practice.

Calculator Inputs

Choose a solving method, enter values, and submit to build the line equation in several useful forms.

Plotly Graph

The line and important points are plotted below after a successful calculation.

Example Data Table

Method Inputs Main result Standard form
Two points (1, 2) and (5, 10) y = 2x 2x - y = 0
Point and slope (2, 3), m = 1.5 y = 1.5x 3x - 2y = 0
Slope and intercept m = -0.5, b = 4 y = -0.5x + 4 x + 2y = 8
Standard form 2x + y = 7 y = -2x + 7 2x + y = 7

Formula Used

Two-point formula

For two different points, compute the slope using m = (y₂ - y₁) / (x₂ - x₁). Then substitute one point into y - y₁ = m(x - x₁). If x₁ equals x₂, the line is vertical and the equation becomes x = constant.

Point-slope formula

When one point and the slope are known, use y - y₁ = m(x - x₁). This is often the fastest way to create a line equation from partial information.

Slope-intercept formula

If the slope and y-intercept are known, write the line as y = mx + b. Here, m controls steepness and direction, while b gives the point where the line crosses the y-axis.

Standard form conversion

A line can also be written as Ax + By = C. Rearranging between standard, point-slope, and slope-intercept forms helps compare coefficients, intercepts, and graph behavior more clearly.

How to Use This Calculator

  1. Select the method that matches the values you already know.
  2. Enter point coordinates, slope, intercept, or standard coefficients.
  3. Press Calculate Equation to solve the line.
  4. Review the result summary placed above the form.
  5. Check the graph to confirm slope direction and intercept locations.
  6. Use the CSV or PDF buttons to save the result.

FAQs

1) What does this calculator find?

It finds the equation of a straight line using several common input styles. It also shows slope, intercepts, standard form, point-slope form, graph data, and useful supporting values.

2) Can it solve lines from two points?

Yes. Enter two distinct coordinates and the calculator derives the slope, equation forms, midpoint, and point distance. Vertical-line cases are handled automatically.

3) What happens for vertical lines?

A vertical line has an undefined slope because the run is zero. The calculator reports the equation as x = constant and adjusts intercept and graph information accordingly.

4) Why are several equation forms shown?

Different forms are useful in different tasks. Slope-intercept helps graphing, point-slope helps derivation from known data, and standard form helps coefficient comparison and algebraic manipulation.

5) Does it work with decimals and negatives?

Yes. The input fields accept decimal and negative numbers. Results are simplified and formatted for readable output while preserving numeric accuracy for plotting and exporting.

6) What is the slope fraction display for?

It gives a fractional approximation of the slope when that is useful. This helps when checking classroom answers that are expected in fraction form instead of decimals.

7) Can I download the results?

Yes. Use the CSV button for spreadsheet-friendly data and the PDF button for a quick printable summary of the solved line, forms, and key line properties.

8) Is the graph necessary?

The graph is not required for calculation, but it is very useful for checking whether the slope, intercepts, and overall direction match your expectations.

Related Calculators

work rate calculatordecimal to fraction calculatorratio simplifier calculatorgreatest common factor calculatorremainder theorem calculatorpolynomial factoring calculatordirect or inverse variation calculatorparent functions calculatordistance formula calculator with radicalsfunctions and function notation calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.