This calculator works out the equation of a straight line when you know its slope (m) and one point on the line (x1, y1). You enter the slope and the coordinates of the point, and you get the line’s equation in point-slope form, plus the equivalent slope-intercept form (y = mx + b) and the x-intercept. It is a quick way to check your algebra homework or to generate the equation for a line from real-world data like a trend line through a known point.
Formula
The point-slope form of a linear equation is:
y − y₁ = m(x − x₁)
where:
- m is the slope of the line (unitless, often written as rise over run).
- (x₁, y₁) are the coordinates of a known point on the line (any point that lies exactly on the line).
From this, the slope-intercept form is derived by solving for y:
y = mx + b, where b = y₁ − m·x₁ is the y-intercept (the y-value where the line crosses the y-axis, at x = 0).
The x-intercept (where the line crosses the x-axis, y = 0) is found by setting y = 0 in the slope-intercept form:
x-intercept = −b / m (provided m ≠ 0).
Worked Example
Using the default values from the calculator: slope m = 2, point (x₁, y₁) = (3, 5).
- Write the point-slope form: y − 5 = 2(x − 3).
- Expand the right side: y − 5 = 2x − 6.
- Add 5 to both sides: y = 2x − 1.
- Thus the y-intercept b = −1.
- The x-intercept is found by setting y = 0: 0 = 2x − 1 → x = 0.5.
The calculator gives the same results: b = −1, point-slope equation “y − 5 = 2(x − 3)”, slope-intercept equation “y = 2x − 1”, and x-intercept = 0.5.
Assumptions
- The line is straight (linear) and extends infinitely in both directions.
- The slope m is a real number; if m = 0, the line is horizontal and the x-intercept is undefined (the calculator will show an error or “Cannot compute” because of division by zero).
- The point (x₁, y₁) is exactly on the line; if you enter a point that is not on the line, the resulting equation will not pass through that point, but the calculator will still compute using the numbers you gave.
- The coordinates and slope are unitless; if you are working with physical units (e.g., meters, seconds), the slope will carry those units (e.g., m/s), but the arithmetic is the same.
How to Use the Calculator
Enter the slope (m) in the first box. This can be any real number, positive, negative, or zero. Then enter the x-coordinate (x₁) and y-coordinate (y₁) of the point. The calculator will immediately show the y-intercept, the equation in both forms, and the x-intercept.
If you have a slope as a fraction, such as 3/4, enter it as a decimal (0.75). If you have two points but no slope, you first need to compute the slope using the formula:
m = (y₂ − y₁) / (x₂ − x₁)
Then use that value in the calculator with one of the points.
Common Mistakes and Misconceptions
- Swapping x₁ and y₁: The formula uses y − y₁ on the left and x − x₁ on the right. A common error is writing y − x₁ = m(x − y₁). Always keep the y-coordinate with y and the x-coordinate with x.
- Sign errors with negative coordinates: If the point is (−2, 3), the equation becomes y − 3 = m(x − (−2)) = m(x + 2). Many students forget to change the double negative to a plus.
- Forgetting to simplify: The point-slope form is perfectly valid, but sometimes you need slope-intercept form for graphing or comparing. The calculator gives both.
- Using a point that is not on the line: If you pick a random point and a slope, the line you get will pass through that point, but it may not be the line you intended. Always use a point that lies on the actual line.
- Horizontal vs. vertical lines: A horizontal line has slope 0, so the equation becomes y = y₁ (no x term). A vertical line has undefined slope and cannot be written in point-slope form; its equation is x = x₁. The calculator will not handle vertical lines because you cannot enter an infinite slope.
Why Use Point-Slope Form?
Point-slope form is especially useful when you know a line’s slope and one point but not its y-intercept. For example, in physics, if you know the velocity of an object at a specific time and its acceleration (slope of velocity vs. time), you can write the velocity equation directly. In economics, if you know the marginal cost (slope) and the total cost at a certain production level, you can model the cost function. The form is also the starting point for deriving the slope-intercept form and for finding the equation of a line from two points.
How to Choose Between Point-Slope and Slope-Intercept
Use point-slope form when you have a slope and a single point. Use slope-intercept form when you have the slope and the y-intercept directly, or when you need to quickly identify the y-intercept for graphing. If you have two points, compute the slope first, then use either form with one of the points. The calculator gives you both, so you can choose the most convenient for your task.
Limitations and Practical Notes
The calculator assumes the line is straight and the slope is constant. In real-world data, relationships are rarely perfectly linear, so the equation is an approximation. Also, the point-slope form is not unique: any point on the line can be used, so the same line can be written in many different point-slope equations. The calculator uses the point you enter, so if you enter a different point on the same line, the equation will look different but represent the same line.
For vertical lines (x = constant), the slope is undefined, so the point-slope form cannot be used. For horizontal lines (y = constant), the slope is 0, and the equation simplifies to y = y₁.
Frequently Asked Questions
What if I only have two points, not a slope?
First compute the slope using m = (y₂ − y₁) / (x₂ − x₁). Then use that slope with either point in the calculator. For example, points (1, 2) and (3, 6) give m = (6−2)/(3−1) = 2. Using (1, 2) gives y − 2 = 2(x − 1), which simplifies to y = 2x.
Can the point-slope form be used for vertical lines?
No. A vertical line has an undefined slope (division by zero in the slope formula), so it cannot be expressed in point-slope form. Its equation is simply x = x₁.
What does the y-intercept mean in the calculator output?
The y-intercept is the point where the line crosses the y-axis (x = 0). It is calculated as b = y₁ − m·x₁. For the default example, b = 5 − 2×3 = −1, so the line crosses the y-axis at (0, −1).
Why does the calculator show a negative x-intercept for some lines?
The x-intercept is where y = 0. For a line with a positive slope and a negative y-intercept, the x-intercept will be positive; for a line with a positive slope and a positive y-intercept, the x-intercept will be negative. It simply reflects where the line crosses the x-axis.
How do I convert point-slope to slope-intercept form by hand?
Expand the right side: y − y₁ = m·x − m·x₁. Then add y₁ to both sides: y = m·x − m·x₁ + y₁. The constant term is the y-intercept b = y₁ − m·x₁.
What if my slope is a fraction like 2/3?
Enter it as a decimal (0.6667) or as a fraction in the calculator if it supports fractions. The equation will still be correct; for example, y − 1 = (2/3)(x − 4) is equivalent to y = (2/3)x − (5/3).
Related Calculators
If you need to find the equation from two points, use the two-point form calculator. If you need to find the slope of a line given two points, use the slope calculator. If you need to graph the line, you can use the slope-intercept form to plot the y-intercept and then use the slope to find another point.
Related
Formula used
in m | Slope (m) | - | 2 | -100000 in x1 | x-coordinate of point (x1) | - | 3 | -100000 in y1 | y-coordinate of point (y1) | - | 5 | -100000 out b | y-intercept (b) | - | y1 - m * x1 | 4 out eq | Equation (point-slope) | - | "y - " + y1 + " = " + m + "(x - " + x1 + ")" | 0 out eq2 | Equation (slope-intercept) | - | "y = " + m + "x + " + b | 0 out xint | x-intercept | - | -b / m | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- 1/x Button on a Calculator: Meaning and Use0.250000
- Sec 2x on Calculator: How to Evaluate Secant
- 1×26 Calculator: Solve the Equation Step by Step26
- P1 t1 p2 t2 Calculator: Solve Gas Law Problems1.084 L
- R1 & R2 Calculator: Linear Regression Metrics
- One to One Calculator: Meaning & How to Use It2.00 mol