ProMathTools
ProMathTools

Slope from Two Points Calculator

Use this calculator to quickly find the slope (also known as the gradient) of a straight line when you know the coordinates of any two points on that line. It's a fundamental concept in algebra and geometry.

Enter the x-coordinate of the first point.

Enter the y-coordinate of the first point.

Enter the x-coordinate of the second point.

Enter the y-coordinate of the second point.

How it works

Use this calculator to quickly find the slope (also known as the gradient) of a straight line when you know the coordinates of any two points on that line. It's a fundamental concept in algebra and geometry.


The Formula

The slope 'm' between two points (x₁, y₁) and (x₂, y₂) is calculated using the formula: m = (y₂ - y₁) / (x₂ - x₁) This represents the 'rise over run' of the line.

Worked Example

  1. Example: Finding the Slope

    Let's find the slope of a line passing through point A (3, 5) and point B (7, 13). Here, x₁=3, y₁=5, x₂=7, y₂=13. m = (13 - 5) / (7 - 3) m = 8 / 4 m = 2 The slope of the line is 2.


Tips, Assumptions & Limitations

  • Remember that a positive slope means the line rises from left to right.
  • A negative slope means the line falls from left to right.
  • A slope of zero indicates a horizontal line.
  • An undefined slope means the line is vertical.
FAQ

Slope, or gradient, measures the steepness and direction of a line. It tells you how much the y-value changes for every unit change in the x-value (rise over run). A higher absolute slope means a steeper line.

Rise is y₂ − y₁ and run is x₂ − x₁. Slope m = rise / run. The angle (in degrees) is arctan(m) × (180/π), measuring how the line tilts from horizontal.

Slope is crucial for understanding linear equations, graphing, and real-world applications like rates of change (speed, growth). It helps describe relationships between two variables.

Yes, if the x-coordinates of your two points are identical, the calculator will correctly identify the line as vertical, report slope as undefined, and show a 90° angle.

Companion article

Slope Calculator: How to Find the Gradient from Two Points

Related Calculators

Related Guides


How this calculator works

Understanding the slope of a line is a fundamental skill in algebra and geometry. It tells us how steep a line is and in which direction it's heading. Whether you call it slope or gradient, this concept is key to linear equations and graphing. Our calculator makes finding it simple.

Explanation

The slope of a line represents the 'rise over run' – how much the vertical position (y) changes for every unit change in the horizontal position (x). A positive slope means the line goes up from left to right, while a negative slope means it goes down. A horizontal line has a slope of zero, and a vertical line has an undefined slope.

Formula

The formula for calculating the slope 'm' between two points (x₁, y₁) and (x₂, y₂) is: m = (y₂ - y₁) / (x₂ - x₁)

Worked example

Let's say you have two points: P₁ (2, 4) and P₂ (8, 16). To find the slope, substitute these values into the formula: m = (16 - 4) / (8 - 2) m = 12 / 6 m = 2 So, the slope of the line passing through (2, 4) and (8, 16) is 2.

How to use this tool

To use the Slope from Two Points Calculator, simply enter the x and y coordinates for your first point (X₁ and Y₁) and your second point (X₂ and Y₂). Once you've entered all four values, the calculator will instantly display the slope of the line connecting those two points. It will also tell you if the slope is undefined for vertical lines.

Frequently asked questions

What does 'rise over run' mean?
'Rise over run' is a way to remember the slope formula. 'Rise' refers to the vertical change (difference in y-coordinates), and 'run' refers to the horizontal change (difference in x-coordinates). It's a visual way to understand slope.
What if the slope is zero?
A slope of zero means the line is perfectly horizontal. The y-value does not change as the x-value changes. For example, a line connecting (1, 5) and (7, 5) would have a slope of 0.
When is a slope undefined?
A slope is undefined when the line is perfectly vertical. This happens when the x-coordinates of your two points are the same, leading to division by zero in the slope formula. For instance, a line through (3, 2) and (3, 8) has an undefined slope.

Read the full guide →

About UsBlogChrome ExtensionFAQsTerms and ConditionsPrivacy PolicySitemap
EmailLinkedInFacebook

© 2025-2026 PromathTools. All rights reserved.

Built by KruskalCode – SaaS & Automation Experts · EverydayDevTools