Slope of a Straight Line Calculator
Enter the coordinates of two points to get information about the line that passes through them (equations, y-intercept, angle of inclination, etc.), the step-by-step solution, and the graph.
Quick Examples
How to Use This Calculator
This online slope calculator is a mathematical tool designed to analyze the slope of the straight line passing through two coordinates on the Cartesian plane. In addition to giving you all the analytical data and the different forms of the equation, the solver generates the step-by-step breakdown and the visual representation of the problem.
Using this finder is very simple and is based on a single data input mode:
- Entering points: Type the coordinates of the first point (x1, y1) and the second point (x2, y2) into the corresponding boxes. You can use integers, decimals, and fractions.
- Main results: The tool will generate a complete box with all the information about the line. Here you will find the numerical value of the slope (m), the slope expressed as a percentage (%), and the angle of inclination with respect to the positive x-axis. Additionally, it will show you the y-intercept, the shortest distance from the line to the origin (0,0), and the three fundamental forms of the line: the slope-intercept form (y = mx + b), the point-slope form (y - y1 = m(x - x1)), and the general form (Ax + By + C = 0).
- Step-by-step resolution: Below the direct results, the detailed algebraic procedure is displayed. First, you will observe the calculation of the slope by substituting your coordinates into the formula m = (y2 - y1) / (x2 - x1). Then, you will see how the angle of inclination is determined by applying the inverse trigonometric function (arctangent of the slope). Finally, it explains how the y-intercept is found and how the terms are algebraically manipulated to construct each of the equations shown in the results.
- Interactive graph: At the bottom of the page, you will find a dynamic Cartesian plane. There, you can visualize the plotted line passing exactly through the two points you entered, with its slope-intercept equation visible. You can pan, zoom in, or zoom out to study the line's degree of inclination.
To ensure maximum accuracy in algebra and analytic geometry tasks, the calculator keeps the values in fraction format throughout the entire step-by-step breakdown, avoiding decimal rounding errors.
Solved Exercises
See some examples of problems solved directly with the tool.
Calculate the slope and elements of the line that passes through the points (-2, 3) and (4, 7).
Result
The line that passes through the given points has the following characteristics, equations, and elements.
Slope: \( m = \dfrac{2}{3} \approx 0.67 \)
Slope-intercept form: \( y = \dfrac{2}{3}x + \dfrac{13}{3} \)
Point-slope form: \( y - 3 = \dfrac{2}{3}\left(x + 2\right) \)
General form: \( 2x - 3y + 13 = 0 \)
y-intercept: \( b = \dfrac{13}{3} \approx 4.33 \)
Angle of inclination: \( \theta \approx 33.69^\circ \)
Vertical change: \( \Delta y = 4 \)
Horizontal change: \( \Delta x = 6 \)
Distance to the origin: \( d \approx 3.61 \)
Slope in percentage: \( m_{\%} \approx 66.67\% \)
Step-by-step solution
1. Calculate the slope (m).
We use the slope formula for two points in a plane, which is the division between the vertical change (Δy) and the horizontal change (Δx):
We substitute the coordinates of \( P_1(-2, 3) \), \( P_2(4, 7) \):
2. Calculate the angle of inclination (θ).
The angle of inclination is obtained by applying the arctangent function to the calculated slope:
3. Find the y-intercept (b) and the equations of the line.
We start from the point-slope equation using the coordinates of P₁ (the result would be the same using P₂):
We solve for the variable 'y' and expand to get the equation in slope-intercept form (y = mx + b):
From this equation we extract that the y-intercept is \( b = \dfrac{13}{3} \).
Starting from the slope-intercept form, we rearrange the terms to equal zero in the general form Ax + By + C = 0:
Find the slope of the straight line where (1, 5) and (6, -2) are two of its points.
Answer
Slope: \( m = -\dfrac{7}{5} = -1.4 \)
Slope-intercept form: \( y = -\dfrac{7}{5}x + \dfrac{32}{5} \)
Point-slope form: \( y - 5 = -\dfrac{7}{5}\left(x - 1\right) \)
General form: \( 7x + 5y - 32 = 0 \)
y-intercept: \( b = \dfrac{32}{5} = 6.4 \)
Angle of inclination: \( \theta \approx 125.54^\circ \)
Vertical change: \( \Delta y = -7 \)
Horizontal change: \( \Delta x = 5 \)
Distance to the origin: \( d \approx 3.72 \)
Slope in percentage: \( m_{\%} \approx -140\% \)
Step-by-step solution
1. Calculate the slope (m).
We use the slope formula for two points in a plane, which is the division between the vertical change (Δy) and the horizontal change (Δx):
We substitute the coordinates of \( P_1(1, 5) \), \( P_2(6, -2) \):
2. Calculate the angle of inclination (θ).
The angle of inclination is obtained by applying the arctangent function to the calculated slope:
Since the slope is negative, the arctangent function returns a negative angle (measured clockwise). By geometric convention, the angle of inclination of a line is always expressed as a positive value between 0° and 180°.
To get the standard angle of inclination, we add 180° to the arctangent:
3. Find the y-intercept (b) and the equations of the line.
We start from the point-slope equation using the coordinates of P₁ (the result would be the same using P₂):
We solve for the variable 'y' and expand to get the equation in slope-intercept form (y = mx + b):
From this equation we extract that the y-intercept is \( b = \dfrac{32}{5} \).
Starting from the slope-intercept form, we rearrange the terms to equal zero in the general form Ax + By + C = 0:
Determine the slope of the line given the points (-2, -2) and (3, 2).
Solution
Slope: \( m = \dfrac{4}{5} = 0.8 \)
Slope-intercept form: \( y = \dfrac{4}{5}x - \dfrac{2}{5} \)
Point-slope form: \( y + 2 = \dfrac{4}{5}\left(x + 2\right) \)
General form: \( 4x - 5y - 2 = 0 \)
y-intercept: \( b = -\dfrac{2}{5} = -0.4 \)
Angle of inclination: \( \theta \approx 38.66^\circ \)
Vertical change: \( \Delta y = 4 \)
Horizontal change: \( \Delta x = 5 \)
Distance to the origin: \( d \approx 0.31 \)
Slope in percentage: \( m_{\%} \approx 80\% \)
Step-by-step solution
1. Calculate the slope (m).
We use the slope formula for two points in a plane, which is the division between the vertical change (Δy) and the horizontal change (Δx):
We substitute the coordinates of \( P_1(-2, -2) \), \( P_2(3, 2) \):
2. Calculate the angle of inclination (θ).
The angle of inclination is obtained by applying the arctangent function to the calculated slope:
3. Find the y-intercept (b) and the equations of the line.
We start from the point-slope equation using the coordinates of P₁ (the result would be the same using P₂):
We solve for the variable 'y' and expand to get the equation in slope-intercept form (y = mx + b):
From this equation we extract that the y-intercept is \( b = -\dfrac{2}{5} \).
Starting from the slope-intercept form, we rearrange the terms to equal zero in the general form Ax + By + C = 0:
Obtain the elements of the straight line containing the points (-1/2, 3/4) and (5/2, -1/4).
Result
Slope: \( m = -\dfrac{1}{3} \approx -0.33 \)
Slope-intercept form: \( y = -\dfrac{1}{3}x + \dfrac{7}{12} \)
Point-slope form: \( y - \dfrac{3}{4} = -\dfrac{1}{3}\left(x + \dfrac{1}{2}\right) \)
General form: \( 4x + 12y - 7 = 0 \)
y-intercept: \( b = \dfrac{7}{12} \approx 0.58 \)
Angle of inclination: \( \theta \approx 161.57^\circ \)
Vertical change: \( \Delta y = -1 \)
Horizontal change: \( \Delta x = 3 \)
Distance to the origin: \( d \approx 0.55 \)
Slope in percentage: \( m_{\%} \approx -33.33\% \)
Step-by-step solution
1. Calculate the slope (m).
We use the slope formula for two points in a plane, which is the division between the vertical change (Δy) and the horizontal change (Δx):
We substitute the coordinates of \( P_1(-\dfrac{1}{2}, \dfrac{3}{4}) \), \( P_2(\dfrac{5}{2}, -\dfrac{1}{4}) \):
2. Calculate the angle of inclination (θ).
The angle of inclination is obtained by applying the arctangent function to the calculated slope:
Since the slope is negative, the arctangent function returns a negative angle (measured clockwise). By geometric convention, the angle of inclination of a line is always expressed as a positive value between 0° and 180°.
To get the standard angle of inclination, we add 180° to the arctangent:
3. Find the y-intercept (b) and the equations of the line.
We start from the point-slope equation using the coordinates of P₁ (the result would be the same using P₂):
We solve for the variable 'y' and expand to get the equation in slope-intercept form (y = mx + b):
From this equation we extract that the y-intercept is \( b = \dfrac{7}{12} \).
Starting from the slope-intercept form, we rearrange the terms to equal zero in the general form Ax + By + C = 0:




