Slope Calculator — Step-by-Step Solutions
Your calculations will appear here
The Slope Calculator finds the slope of a line given two points. It also provides the equation of the line in slope-intercept form (y = mx + b) and point-slope form, along with the distance between the two points.
Enter the coordinates of two points (x₁, y₁) and (x₂, y₂) to calculate the slope and line equation instantly.
How to Use the Slope Calculator
- Two Points mode: enter the coordinates of two points (x1, y1) and (x2, y2). The calculator finds the slope, y-intercept, line equation, and distance between the points.
- Point + Slope mode: enter a single point and a known slope value. The calculator derives the full equation in both point-slope and slope-intercept form.
- Slope-Intercept mode: enter the slope (m) and y-intercept (b) directly. The calculator writes the equation, finds the x-intercept, and generates two sample points for plotting.
- Parallel / Perpendicular mode: enter the slope and y-intercept of an existing line, plus a point. The calculator finds both the parallel line (same slope) and the perpendicular line (negative reciprocal slope) that pass through that point.
Formula and Theory
The slope of a line measures its steepness and direction. It is defined as the ratio of the vertical change (rise) to the horizontal change (run) between any two points on the line. A positive slope means the line goes upward from left to right, a negative slope means it goes downward, a slope of zero produces a horizontal line, and an undefined slope (division by zero) produces a vertical line.
The slope-intercept form y = mx + b is the most common way to express a linear equation, where m is the slope and b is the y-intercept. The point-slope form y - y1 = m(x - x1) is useful when you know one point and the slope. Both forms describe the same line and can be converted between each other algebraically.
Parallel lines have identical slopes but different y-intercepts. Perpendicular lines have slopes that are negative reciprocals of each other, meaning their product equals -1. These relationships are fundamental in coordinate geometry and are used extensively in engineering, physics, and computer graphics.
Worked Examples
Example 1: Finding slope from two points
Problem: Find the slope of the line through (1, 2) and (4, 8).
Solution: m = (8 - 2) / (4 - 1) = 6 / 3
Answer: The slope is 2. The equation is y = 2x + 0, or simply y = 2x.
Example 2: Equation from a point and slope
Problem: A line passes through (3, 5) with a slope of -2. Find its equation.
Solution: Point-slope form: y - 5 = -2(x - 3). Expanding: y - 5 = -2x + 6. Solving: y = -2x + 11.
Answer: The equation is y = -2x + 11, with a y-intercept of 11.
Example 3: Finding intercepts from slope-intercept form
Problem: Given m = 3 and b = -6, find the x-intercept.
Solution: Set y = 0: 0 = 3x - 6. Solving: 3x = 6, so x = 2.
Answer: The x-intercept is at (2, 0). The equation is y = 3x - 6.
Example 4: Parallel and perpendicular lines
Problem: Find lines parallel and perpendicular to y = 4x + 1 that pass through (2, 3).
Solution: Parallel: same slope m = 4. Using 3 = 4(2) + b gives b = -5, so y = 4x - 5. Perpendicular: m = -1/4. Using 3 = -1/4(2) + b gives b = 3.5, so y = -0.25x + 3.5.
Answer: The parallel line is y = 4x - 5. The perpendicular line is y = -0.25x + 3.5.
Frequently Asked Questions
What does it mean when the slope is undefined?
How do I tell whether two lines are parallel or perpendicular?
What is the difference between point-slope form and slope-intercept form?
Can the slope be a fraction or a decimal?
How is slope used in real life?
Related Algebra Calculators
Quadratic Formula Calculator
Solve quadratic equations using the quadratic formula. Find roots, discriminant, and vertex. Free online quadratic formula calculator.
Solve For X Calculator
Solve algebraic equations for x. Handles linear, quadratic, polynomial, and simple equations. Free online equation solver.
Inverse Calculator
Find the inverse of functions and matrices. Calculate inverse matrices and inverse functions. Free online inverse calculator.
System of Equations Calculator
Solve systems of linear equations with 2 or 3 unknowns. Step-by-step solutions using substitution, elimination, and Cramer's rule. Free online tool.
Complex Number Calculator
Calculate with complex numbers: arithmetic, modulus, conjugate, polar form, powers, and Euler form. Free online complex number calculator.
Quadratic Grapher
Graph quadratic functions instantly. Plot parabolas, find vertex, axis of symmetry, and roots. Free online quadratic graphing tool.