Equation of a Line Calculator
Find the equation of a line from two points, a point and slope, or slope and y-intercept. Get slope-intercept, point-slope, and standard form with interactive graph, step-by-step solution, and line properties.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About Equation of a Line Calculator
The Equation of a Line Calculator finds the equation of a straight line from different sets of known values. Enter two points, a point and slope, or a slope and y-intercept to get the line equation in all three standard forms — slope-intercept, point-slope, and standard form — along with an interactive graph, step-by-step solution, and comprehensive line properties including intercepts, angle, and parallel/perpendicular relationships.
How to Use the Equation of a Line Calculator
- Choose your input method: Select "Two Points" if you know two points on the line, "Point & Slope" if you know one point and the slope, or "Slope & Y-Int" if you know the slope and y-intercept.
- Enter your values: Type coordinates, slope, or y-intercept into the input fields. You can enter the slope as a decimal (0.5) or a fraction (2/3).
- Click "Find Equation" to calculate the line equation instantly.
- Review the results: Three equation cards show the line in slope-intercept form \(y = mx + b\), point-slope form \(y - y_1 = m(x - x_1)\), and standard form \(Ax + By = C\). Use the copy buttons to grab any equation.
- Explore the graph and properties: The interactive coordinate plane displays the line with its intercepts, slope triangle (rise/run), and labeled key points. The properties panel shows angle, direction, and parallel/perpendicular line equations.
Understanding the Three Forms of a Line
Slope-Intercept Form: \(y = mx + b\)
The most common form. Here \(m\) is the slope (how steep the line is) and \(b\) is the y-intercept (where the line crosses the y-axis). This form is ideal for graphing because you can immediately see the starting point and direction.
Point-Slope Form: \(y - y_1 = m(x - x_1)\)
Useful when you know a specific point \((x_1, y_1)\) and the slope \(m\). This form comes directly from the definition of slope: \(m = \frac{y - y_1}{x - x_1}\). It's the go-to form when you don't know the y-intercept immediately.
Standard Form: \(Ax + By = C\)
In this form, \(A\), \(B\), and \(C\) are integers with \(A \geq 0\). Standard form is particularly useful for finding x- and y-intercepts quickly and for solving systems of linear equations using elimination.
How to Find the Equation from Two Points
Given two points \((x_1, y_1)\) and \((x_2, y_2)\):
- Calculate the slope: \(m = \frac{y_2 - y_1}{x_2 - x_1}\)
- Find the y-intercept: \(b = y_1 - m \cdot x_1\)
- Write the equation: \(y = mx + b\)
For example, given points (1, 2) and (4, 8): \(m = \frac{8 - 2}{4 - 1} = 2\), then \(b = 2 - 2 \times 1 = 0\), so \(y = 2x\).
Understanding Slope
Slope measures the steepness and direction of a line. It is the ratio of the vertical change (rise) to the horizontal change (run) between any two points:
$$m = \frac{\text{rise}}{\text{run}} = \frac{\Delta y}{\Delta x}$$
- Positive slope: Line rises from left to right (e.g., \(m = 2\))
- Negative slope: Line falls from left to right (e.g., \(m = -3\))
- Zero slope: Horizontal line (\(m = 0\), equation is \(y = b\))
- Undefined slope: Vertical line (equation is \(x = a\))
Parallel and Perpendicular Lines
Two lines are parallel if they have the same slope. Two lines are perpendicular if their slopes are negative reciprocals: \(m_1 \times m_2 = -1\). This calculator shows both parallel and perpendicular line equations in the properties panel.
Special Cases
- Horizontal line (\(m = 0\)): The equation is simply \(y = b\). It has no x-intercept (unless \(b = 0\)).
- Line through the origin: When \(b = 0\), the line passes through (0, 0) and the equation simplifies to \(y = mx\).
- Vertical line: Cannot be expressed as \(y = mx + b\). The calculator alerts you if two points share the same x-coordinate.
- Fractional slope: Enter as a/b (e.g., 2/3 or -3/4). The calculator displays fractions neatly in results.
FAQ
How do you find the equation of a line from two points?
First calculate the slope m = (y2 - y1) / (x2 - x1). Then use either point to find the y-intercept: b = y1 - m * x1. The equation is y = mx + b.
What are the three forms of a linear equation?
The three standard forms are slope-intercept form (y = mx + b), point-slope form (y - y1 = m(x - x1)), and standard form (Ax + By = C where A is non-negative).
How do you find the equation of a line from a point and slope?
Use the point-slope formula y - y1 = m(x - x1) where (x1, y1) is the known point and m is the slope. Then simplify to slope-intercept form y = mx + b by distributing and solving for y.
What is the slope-intercept form?
Slope-intercept form is y = mx + b, where m is the slope (rate of change) and b is the y-intercept (where the line crosses the y-axis). It is the most common way to write linear equations.
Can a vertical line be written in slope-intercept form?
No. A vertical line has an undefined slope, so it cannot be expressed as y = mx + b. Vertical lines are written as x = a, where a is the x-coordinate of every point on the line.
Reference this content, page, or tool as:
"Equation of a Line Calculator" at https://MiniWebtool.com// from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-03-31
You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.