This calculator helps you determine the equation of a straight line in the slope-intercept form (y = mx + b) when you are given any two distinct points that lie on the line. It automatically computes the slope (m) and the y-intercept (b) for you.
Enter the x-coordinate of the first point.
Enter the y-coordinate of the first point.
Enter the x-coordinate of the second point.
Enter the y-coordinate of the second point.
This calculator helps you determine the equation of a straight line in the slope-intercept form (y = mx + b) when you are given any two distinct points that lie on the line. It automatically computes the slope (m) and the y-intercept (b) for you.
Slope (m) = (y₂ - y₁) / (x₂ - x₁) Y-intercept (b) = y₁ - m * x₁ Equation: y = mx + b
Given two points (x₁, y₁) = (2, 3) and (x₂, y₂) = (5, 9): 1. Calculate the slope (m): m = (9 - 3) / (5 - 2) = 6 / 3 = 2. 2. Calculate the y-intercept (b) using (2, 3): b = 3 - 2 * 2 = 3 - 4 = -1. 3. The equation of the line is y = 2x - 1.
The equation of a line is a mathematical expression that describes all the points lying on that line. The most common form is the slope-intercept form, y = mx + b, where 'm' is the slope and 'b' is the y-intercept.
The slope (m) is calculated as the change in y divided by the change in x between two points (x₁, y₁) and (x₂, y₂). The formula is m = (y₂ - y₁) / (x₂ - x₁).
The y-intercept (b) is the point where the line crosses the y-axis. It is the value of y when x is 0. Once you have the slope, you can find 'b' using one of the points: b = y₁ - m * x₁.
Yes, this calculator can handle both vertical and horizontal lines. For vertical lines (where x₁ = x₂), the slope is undefined, and the equation will be in the form x = C. For horizontal lines (where y₁ = y₂), the slope is 0, and the equation will be in the form y = C.
Understanding how to find the equation of a line is a fundamental skill in algebra and geometry. Whether you're tackling homework, preparing for an exam, or just curious, this guide will walk you through the process of deriving a line's equation when you know two points it passes through. We'll focus on the popular slope-intercept form: y = mx + b.
A straight line can be uniquely defined by any two distinct points it passes through. The process involves two main steps: first, calculating the slope (m) of the line, and second, determining the y-intercept (b). The slope tells us the steepness and direction of the line, while the y-intercept tells us where the line crosses the vertical (y) axis. Once these two values are found, they can be plugged into the slope-intercept form to complete the equation.
To find the equation of a line from two points (x₁, y₁) and (x₂, y₂):
1. **Calculate the Slope (m):**
m = (y₂ - y₁) / (x₂ - x₁)
2. **Calculate the Y-intercept (b):**
Using one of the points (e.g., x₁, y₁) and the calculated slope (m):
b = y₁ - m * x₁
3. **Form the Equation:**
Substitute 'm' and 'b' into the slope-intercept form:
y = mx + bLet's find the equation of the line that passes through the points (1, 4) and (3, 10). 1. **Calculate Slope (m):** x₁ = 1, y₁ = 4 x₂ = 3, y₂ = 10 m = (10 - 4) / (3 - 1) = 6 / 2 = 3 2. **Calculate Y-intercept (b):** Using point (1, 4) and m = 3: b = 4 - 3 * 1 = 4 - 3 = 1 3. **Form the Equation:** y = 3x + 1 So, the equation of the line passing through (1, 4) and (3, 10) is y = 3x + 1.
To use the Equation of a Line from Two Points Calculator, simply enter the x and y coordinates for your first point (x₁, y₁) and your second point (x₂, y₂) into the respective input fields. The tool will instantly calculate the slope, y-intercept, and the final equation of the line. Ensure your points are distinct; if you enter the same point twice, the calculator will prompt an error.
© 2025-2026 PromathTools. All rights reserved.
Built by KruskalCode – SaaS & Automation Experts · EverydayDevTools