Equation of a Line Calculator
MiniWebtool’s Equation of a Line Calculator accepts two points, a point and slope, or slope and intercept. The result shows applicable line forms, intercepts, and geometric relationships, with worked steps and a plotted line.
For Gemini, paste the copied question into the chat. You can also copy it below.Need help using this tool? Ask AI
View the question
Enter two points, a point and a slope, or a slope and y-intercept below to get the slope-intercept, point-slope and standard forms, with a graph and the steps.
About Equation of a Line Calculator
Equation of a Line Calculator: Special Cases — at a glance
For Equation of a Line Calculator, compare Horizontal line (\(m = 0\)), Line through the origin, and the other entries below. The definitions and scope below summarize the explanations on this page.
| Option or measure | Definition and scope |
|---|---|
| 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. |
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/equation-of-a-line-calculator/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: 2026-03-31
Chat with your favorite AI
For Gemini, paste the copied question into the chat. You can also copy it below.
View the question
Geometry Calculators:
- 3D Distance Calculator New
- 3D Surface Plotter New
- Angle Bisector Calculator New
- Arc Length Calculator Popular
- Cartesian to Polar Coordinates Converter
- Circle Calculator
- Circumscribed Circle (Circumcircle) Calculator New
- Cone Flat Pattern (Template) Generator Popular
- Conic Section Identifier New
- Coordinate Geometry Distance Calculator New
- Delaunay Triangulation Generator New
- Distance Between Two Points Calculator
- Ellipse Circumference Calculator
- Equation of a Line Calculator Popular
- Euler Characteristic Calculator
- Frustum Calculator New
- General Triangle Solver
- Golden Rectangle Calculator
- Golden Section Calculator
- Great Circle Distance Calculator New
- Heron's Formula Calculator New
- Hyperbola Calculator New
- Hypotenuse Calculator
- Inscribed Circle (Incircle) Calculator New
- Irregular Polygon Area Calculator New
- Midpoint Calculator
- Parabola Calculator New
- Parallel and Perpendicular Line Calculator Popular
- Parametric Curve Grapher New
- Point-Slope Form Calculator Popular
- Point to Plane Distance Calculator
- Polar to Cartesian Converter
- Polygon Diagonals Calculator
- Pythagorean Theorem Calculator
- Rectangle Calculator
- Regular Polygon Calculator New
- Shoelace Formula Calculator
- Slope Calculator
- Slope Intercept Form Calculator Popular
- Sphere Equation Calculator
- Square Calculator
- Tangent Line to Circle Calculator New
- Torus Calculator New
- Triangle Centroid Calculator
- Triangle Orthocenter Calculator