UseCalcPro
Home
MathFinanceHealthConstructionAutoPetsGardenCraftsFood & BrewingTools
Blog
  1. Home
  2. Math

Slope-Intercept Calculator

Calculate slope, intercepts, and the equation of a line from two points or point and slope

Equation

y = 2x

Slope (m)

2.0000

y-intercept (b)

0.0000

Line Equation

Slope-Intercept Form

y = 2x

Key Values

Slope (m)

2

y-intercept (b)

0

x-intercept

0

Angle

63.43°

Related Lines

Parallel slopem = 2
Perpendicular slopem = -0.5000
Perpendicular: m₁ × m₂ = 2.0000 × -0.5000 = -1

Step-by-Step

1.m = (y₂ - y₁) / (x₂ - x₁)
2.m = (8 - 2) / (4 - 1)
3.m = 6 / 3 = 2
4.b = y₁ - m × x₁ = 2 - 2 × 1 = 0
5.x-intercept: x = -b/m = -0/2 = 0
6.Angle = arctan(2) = 63.4349°
7.Equation: y = 2x

Line Forms

Slope-intercept: y = mx + b
Point-slope: y - y₁ = m(x - x₁)
Standard: Ax + By = C
m = rise/run = Δy/Δx

Formulas Used

Slope Formula

m = (y₂ - y₁) / (x₂ - x₁)

Calculates the slope (rate of change) of a line through two points. Positive slope goes up, negative goes down, zero is horizontal.

Where:

m= The slope of the line (rise over run)
(x₁, y₁)= Coordinates of the first point
(x₂, y₂)= Coordinates of the second point

Slope-Intercept Form

y = mx + b

The standard form of a linear equation where m is the slope and b is the y-intercept. Every non-vertical line can be expressed this way.

Where:

m= Slope of the line
b= y-intercept (value of y when x = 0)
x, y= Any point (x, y) on the line

Perpendicular Slope

m⊥ = -1 / m

The slope of a line perpendicular to a line with slope m. Two perpendicular lines satisfy m₁ × m₂ = -1.

Where:

m= Slope of the original line
m⊥= Slope of the perpendicular line

Example Calculations

1Line Through (1, 2) and (4, 8)

Inputs

Point 1(1, 2)
Point 2(4, 8)

Result

Equationy = 2x + 0
Slope2
y-intercept0
x-intercept0

m = (8-2)/(4-1) = 6/3 = 2. Then b = 2 - 2×1 = 0. The line passes through the origin with equation y = 2x.

2Line Through (0, 5) and (3, -1)

Inputs

Point 1(0, 5)
Point 2(3, -1)

Result

Equationy = -2x + 5
Slope-2
y-intercept5
x-intercept2.5

m = (-1-5)/(3-0) = -6/3 = -2. Then b = 5 - (-2)×0 = 5. The line crosses the y-axis at 5 and x-axis at 2.5.

3Line with Slope 3 Through (2, 7)

Inputs

Point(2, 7)
Slope3

Result

Equationy = 3x + 1
y-intercept1
x-intercept-0.3333
Perpendicular slope-0.3333

b = y₁ - m×x₁ = 7 - 3×2 = 7 - 6 = 1. The equation is y = 3x + 1. The perpendicular slope is -1/3.

Frequently Asked Questions

Q

What is the slope-intercept form y = mx + b?

Slope-intercept form y = mx + b is the most common way to write the equation of a line. The variable m represents the slope (how steep the line is) and b represents the y-intercept (where the line crosses the y-axis). Any non-vertical line can be written in this form.

  • y = 2x + 3 has slope 2 and crosses the y-axis at (0, 3)
  • y = -0.5x + 1 has slope -0.5 and crosses the y-axis at (0, 1)
  • y = x is the simplest form with slope 1 and y-intercept 0
  • Vertical lines (x = k) cannot be written in slope-intercept form
  • Horizontal lines have the form y = b (slope = 0)
EquationSlope (m)y-intercept (b)
y = 2x + 323
y = -x + 5-15
y = 0.5x0.50
y = 404
Q

How do you find the slope from two points?

The slope formula is m = (y₂ - y₁) / (x₂ - x₁), which calculates rise over run. Subtract the y-coordinates and divide by the difference of the x-coordinates. A positive slope means the line goes up from left to right; negative means it goes down.

  • Points (1, 2) and (4, 8): m = (8-2)/(4-1) = 6/3 = 2
  • Points (0, 5) and (3, 5): m = 0/3 = 0 (horizontal)
  • Points (2, 1) and (2, 7): m = 6/0 = undefined (vertical)
  • Positive slope: line rises left to right
  • Negative slope: line falls left to right
PointsRise / RunSlope
(1,2) to (4,8)6 / 32
(0,3) to (6,0)-3 / 6-0.5
(2,5) to (5,5)0 / 30
(-1,4) to (3,0)-4 / 4-1
Q

What are parallel and perpendicular slopes?

Parallel lines have identical slopes (m₁ = m₂). Perpendicular lines have slopes that are negative reciprocals, meaning m₁ × m₂ = -1. For example, if one line has slope 2, a perpendicular line has slope -1/2. These relationships are fundamental in geometry.

  • Parallel to y = 3x + 1: any line with slope 3
  • Perpendicular to y = 3x + 1: slope = -1/3
  • Perpendicular to y = -2x: slope = 1/2
  • A horizontal line (m=0) is perpendicular to a vertical line
  • m₁ × m₂ = -1 is the perpendicularity test
Original SlopeParallel SlopePerpendicular Slope
m = 22-0.5
m = -3-30.333
m = 11-1
m = 0.250.25-4
Q

How do you find the x-intercept and y-intercept?

The y-intercept is the value of b in y = mx + b (set x = 0). The x-intercept is found by setting y = 0 and solving: x = -b/m. For example, for y = 2x + 6, the y-intercept is 6 and the x-intercept is -6/2 = -3.

  • y-intercept: set x = 0, then y = b
  • x-intercept: set y = 0, then x = -b/m
  • y = 2x + 6: y-int = 6, x-int = -3
  • y = -x + 4: y-int = 4, x-int = 4
  • Horizontal lines (y = b) have no x-intercept when b ≠ 0
Equationy-interceptx-intercept
y = 2x + 6(0, 6)(-3, 0)
y = -x + 4(0, 4)(4, 0)
y = 3x - 9(0, -9)(3, 0)
y = 0.5x + 1(0, 1)(-2, 0)
Q

What is the angle of inclination of a line?

The angle of inclination is the angle a line makes with the positive x-axis, calculated as θ = arctan(m). A slope of 1 gives 45°, slope of 0 gives 0°, and undefined slope (vertical) gives 90°. Negative slopes produce negative angles measured clockwise from the x-axis.

  • Slope 0: angle = 0° (horizontal)
  • Slope 1: angle = 45° (diagonal)
  • Slope -1: angle = -45°
  • Slope undefined: angle = 90° (vertical)
  • Angle = arctan(m) in degrees
Slope (m)Angle (θ)Direction
00°Horizontal
145°45° diagonal up
-1-45°45° diagonal down
Undefined90°Vertical

How to Find the Equation of a Line: Slope-Intercept Form

The slope-intercept form y = mx + b is the most intuitive way to express a linear equation. The slope m tells you how much y changes for each unit increase in x (rise over run), while the y-intercept b tells you where the line crosses the y-axis.

Finding the equation from two points is a two-step process: first calculate the slope m = (y₂-y₁)/(x₂-x₁), then solve for b using b = y₁ - m·x₁. If you already know the slope and one point, you only need the second step.

Our slope-intercept calculator supports both input modes, computes the complete line equation, identifies x and y intercepts, calculates the angle of inclination, and finds parallel and perpendicular slopes. Every result includes a step-by-step derivation.

Related Calculators

Distance Calculator

Find the distance between two points in 2D or 3D

Midpoint Calculator

Find the exact center between two coordinate points

Quadratic Equation

Solve ax² + bx + c = 0 with the quadratic formula

Statistics Calculator

Calculate mean, median, mode, and standard deviation

Percentage Calculator

Find any percentage in seconds — what is X% of Y, percentage increase or decrease, and percentage difference. Shows step-by-step solutions and formulas.

Engine Displacement Calculator \u2014 Bore, Stroke & CC

Calculate engine displacement in liters, cubic inches, and CC from bore, stroke, and cylinder count. Includes presets for popular engines and analysis.

Related Resources

Distance Calculator

Calculate the distance between two coordinate points

Midpoint Calculator

Find the midpoint between two points

Quadratic Equation Calculator

Solve quadratic equations with the quadratic formula

Circle Calculator

Calculate circle properties from radius or diameter

Last Updated: Mar 11, 2026

This calculator is provided for informational and educational purposes only. Results are estimates and should not be considered professional financial, medical, legal, or other advice. Always consult a qualified professional before making important decisions. UseCalcPro is not responsible for any actions taken based on calculator results.

UseCalcPro
FinanceHealthMath

© 2026 UseCalcPro