Slope Calculator – Calculate the Slope of a Line Online

Use our free online slope calculator to instantly find the slope between two points. Enter coordinates (x₁, y₁) and (x₂, y₂) to calculate slope with step-by-step explanation. Perfect for students, teachers, and professionals.

Two Point Slope Calculator

Point 1 (x₁, y₁)

Point 2 (x₂, y₂)

Results

Enter coordinates to see slope, angle, and distance.

What Is Slope?

Slope is a fundamental concept in mathematics that measures how steep a line is. In simple terms, slope represents the rate of change between two points on a line. It tells you how much the line rises (or falls) for every unit it moves horizontally.

The slope of a line is its vertical change divided by its horizontal change, commonly expressed as rise over run. When you have two points on a line, the slope is calculated as the change in y divided by the change in x. The slope of a line is a measure of how steep it is, and it is often denoted by the letter m.

Understanding slope is essential in many areas, including algebra, geometry, physics, engineering, and economics. It helps you understand relationships between variables, analyze trends, and solve real-world problems.

How to Calculate Slope

To find the slope between two points (x₁, y₁) and (x₂, y₂), we use the slope formula:

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

Slope = Rise / Run = ΔY / ΔX

Step-by-Step Guide to Calculate Slope

To find the slope between two points, follow these three simple steps:

  1. Step 1: Subtract y-values (y₂ - y₁)

    Find the difference between the y coordinates. This is called the "rise" or Δy (change in y).

    Δy = y₂ - y₁
  2. Step 2: Subtract x-values (x₂ - x₁)

    Find the difference between the x coordinates. This is called the "run" or Δx (change in x).

    Δx = x₂ - x₁
  3. Step 3: Divide

    Divide the change in y by the change in x to get the slope.

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

    ⚠️ Important: If Δx = 0 (x₂ = x₁), the line is vertical and the slope is undefined.

Examples: How to Calculate Slope

Example 1: Basic Slope Calculation

Calculate the slope between two points: (2, 5) and (9, 19).

  1. Step 1: Find Δy (change in y)
    Δy = y₂ - y₁ = 19 - 5 = 14
  2. Step 2: Find Δx (change in x)
    Δx = x₂ - x₁ = 9 - 2 = 7
  3. Step 3: Divide to find slope
    m = Δy / Δx = 14 / 7 = 2

Answer: The slope is 2.

This means the line rises 2 units for every 1 unit it moves to the right.

Example 2: Negative Slope

Calculate the slope between points: (3, 8) and (7, 2).

  1. Δy = y₂ - y₁ = 2 - 8 = -6
  2. Δx = x₂ - x₁ = 7 - 3 = 4
  3. m = -6 / 4 = -1.5

Answer: The slope is -1.5.

A negative slope means the line falls as it moves to the right.

Example 3: Fractional Slope

Calculate the slope between points: (1, 1) and (5, 3).

  1. Δy = y₂ - y₁ = 3 - 1 = 2
  2. Δx = x₂ - x₁ = 5 - 1 = 4
  3. m = 2 / 4 = 0.5 or 1/2

Answer: The slope is 0.5 (or 1/2).

The line rises 1 unit for every 2 units it moves horizontally.

Equations of a Line

Once you have the slope m, you can describe the line using different equations. There are three common ways to write line equations with slope:

Slope-Intercept Form

y = mx + b

This is the most common form. m is the slope, and b is the y-intercept (where the line crosses the vertical y-axis).

Example: y = 2x + 1

Point-Slope Form

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

Useful when you know the slope and one specific point (x₁, y₁) on the line, but not necessarily the y-intercept.

Example: y - 5 = 2(x - 2)

Standard Form

Ax + By = C

The equation should not include fractions or decimals, and the x coefficient should only be positive. Useful for systems of equations.

Example: 2x - y = -1

Converting Between Forms

You can convert between these forms. For example, starting with point-slope form y - 5 = 2(x - 2):

  1. Expand: y - 5 = 2x - 4
  2. Add 5 to both sides: y = 2x + 1 (slope-intercept form)
  3. Rearrange: 2x - y = -1 (standard form)

Find Slope From an Equation

If you have the equation for a line, you can put it into slope-intercept form. The coefficient of x will be the slope.

Example

You have the equation of a line: 6x - 2y = 12, and you need to find the slope.

Your goal is to get the equation into slope-intercept format y = mx + b:

  1. Start with your equation: 6x - 2y = 12
  2. Add 2y to both sides: 6x = 12 + 2y
  3. Subtract 12 from both sides: 6x - 12 = 2y
  4. Divide both sides by 2: y = 3x - 6
  5. This is slope-intercept form. Slope is the coefficient of x, so slope = 3

How to Find the y-Intercept

The y-intercept of a line is the value of y when x = 0. It is the point where the line crosses the y-axis.

Using the equation y = 3x - 6, set x = 0 to find the y-intercept:

y = 3(0) - 6
y = -6

The y-intercept is -6, or the point (0, -6)

How to Find the x-Intercept

The x-intercept of a line is the value of x when y = 0. It is the point where the line crosses the x-axis.

Using the equation y = 3x - 6, set y = 0 to find the x-intercept:

0 = 3x - 6
3x = 6
x = 2

The x-intercept is 2, or the point (2, 0)

Slope of Parallel and Perpendicular Lines

Slope of Parallel Lines

If you know the slope of a line, any line parallel to it will have the same slope and these lines will never intersect.

Example: If a line has slope 3, all parallel lines also have slope 3.

Slope of Perpendicular Lines

If you know the slope of a line, any line perpendicular to it will have a slope equal to the negative inverse of the known slope. Perpendicular means the lines form a 90° angle when they intersect.

Example: If a line has slope -4:

  1. Take the negative: -(-4) = 4
  2. Take the inverse: 1/4
  3. Perpendicular slope = 1/4

Related Calculations

Calculating a line's properties often involves more than just the slope.

Distance Formula

Finds the length of the line segment between two points.

d = √[(x₂ - x₁)² + (y₂ - y₁)²]

Angle Formula

Finds the angle (θ) the line makes with the positive x-axis.

θ = tan⁻¹(m)

Understanding Slope in Graphs

When you look at a graph, you can visually determine the slope of a line. Understanding how slope appears on a graph helps you interpret data and understand relationships between variables.

Types of Slope

Positive Slope (m > 0)The line rises from left to right, indicating an upward trend.Example: As x increases, y increases. Common in growth trends, revenue charts, and positive correlations.
Negative Slope (m < 0)The line falls from left to right, indicating a downward trend.Example: As x increases, y decreases. Common in decline trends, cost reduction, and inverse relationships.
Zero Slope (m = 0)The line is perfectly horizontal. There is no vertical change.Example: y remains constant regardless of x. Represents no change or constant values.
Undefined SlopeThe line is perfectly vertical. Division by zero occurs because run is 0.Example: x remains constant regardless of y. Cannot be expressed as a number.

How to Determine Slope from a Graph

To find the slope from a graph visually:

  1. Identify two points on the line that are easy to read from the graph.
  2. Count the rise (vertical change) between the two points.
  3. Count the run (horizontal change) between the two points.
  4. Divide rise by run to get the slope. Remember: rise over run = slope.

Tip: If the line goes up from left to right, the slope is positive. If it goes down, the slope is negative. The steeper the line, the larger the absolute value of the slope.

Real-World Applications

  • Construction & Engineering: Slope is referred to as "grade" or "gradient". It is critical for designing roads, ramps, and roofs to ensure proper drainage and safety. For example, a roof pitch is calculated as rise over run.
  • Economics: In graphs representing cost or revenue, slope represents the "marginal" rate of change (e.g., marginal cost).
  • Physics: on a Position vs. Time graph, the slope represents velocity. On a Velocity vs. Time graph, the slope represents acceleration.

Percentage Grade vs. Slope

In construction (like roads or plumbing), slope is often expressed as a percentage grade. You can convert standard slope to grade using this formula:

Grade (%) = Slope × 100

Frequently Asked Questions (FAQ)

Q: What is slope in math?

A: Slope represents how steep a line is, calculated as the change in y divided by the change in x. It measures the rate of change between two points on a line and is denoted by the letter m. Slope tells you how much the line rises (or falls) for every unit it moves horizontally.

Q: How do you calculate slope?

A: To calculate slope between two points (x₁, y₁) and (x₂, y₂), use the formula: m = (y₂ - y₁) / (x₂ - x₁). First, subtract the y-coordinates to find the rise (Δy). Then subtract the x-coordinates to find the run (Δx). Finally, divide rise by run to get the slope.

Q: What does slope represent?

A: Slope represents the steepness and direction of a line. A positive slope means the line rises from left to right (upward trend). A negative slope means the line falls from left to right (downward trend). Zero slope means the line is horizontal (no change). An undefined slope means the line is vertical (infinite steepness).

Q: Can slope be negative?

A: Yes, slope can be negative. A negative slope indicates that as x increases, y decreases. The line falls from left to right. This is common in scenarios like declining sales, decreasing temperatures, or inverse relationships between variables.

Q: What is the slope formula?

A: The slope formula is m = (y₂ - y₁) / (x₂ - x₁), where m is the slope, (x₁, y₁) and (x₂, y₂) are two points on the line. This formula calculates the ratio of vertical change (rise) to horizontal change (run).

Q: How do you find slope from an equation?

A: If the equation is in slope-intercept form (y = mx + b), the slope is the coefficient of x (the number multiplied by x). For example, in y = 3x + 5, the slope is 3. If the equation is in another form, convert it to slope-intercept form first.

Q: What is rise over run?

A: Rise over run is another way to describe slope. "Rise" refers to the vertical change (change in y), and "run" refers to the horizontal change (change in x). Slope = rise / run = Δy / Δx. This visual description helps understand slope as how much a line goes up or down for each unit it moves horizontally.

Q: Can slope be zero?

A: Yes, slope can be zero. A zero slope means the line is perfectly horizontal (parallel to the x-axis). This occurs when y₂ = y₁, meaning there is no vertical change. The line has a constant y-value regardless of the x-value.

Q: What does undefined slope mean?

A: An undefined slope occurs when the line is perfectly vertical (parallel to the y-axis). This happens when x₂ = x₁, meaning there is no horizontal change (run = 0). Since you cannot divide by zero, the slope is undefined. Vertical lines have equations of the form x = constant.