---
title: "Slope Calculator | Method Calculator"
description: "Find the slope of a line from two points, plus the distance, midpoint, angle, y-intercept and the equation of the line in slope-intercept form."
canonical_url: "https://methodcalculator.com/slope-calculator"
meta:
  "og:description": "Find the slope of a line from two points, plus the distance, midpoint, angle, y-intercept and the equation of the line in slope-intercept form."
  "og:image": "https://methodcalculator.com/_og/s/o_089bd28d84f75ba3.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Slope Calculator – Free Online Tool"
  "twitter:image": "https://methodcalculator.com/_og/s/o_089bd28d84f75ba3.png"
---

> Index of every page on this site: [llms.txt](https://methodcalculator.com/llms.txt)

# **Slope Calculator**

Enter the coordinates of two points and the calculator finds the slope of the line through them, together with its angle, the distance and midpoint between the points, the intercepts and the equation of the line.

## **Result**

Slope (m)

**2**

<dl>

<dt>Equation of the line</dt>
<dd>**y = 2x**</dd>

<dt>Angle of incline</dt>
<dd>63.43°</dd>

<dt>Distance between points</dt>
<dd>6.7082</dd>

<dt>Midpoint</dt>
<dd>(2.5, 5)</dd>

<dt>Y-intercept</dt>
<dd>0</dd>

<dt>X-intercept</dt>
<dd>0</dd>

<dt>Perpendicular slope</dt>
<dd>-0.5</dd>

<dt>Rise over run (Δy / Δx)</dt>
<dd>6 / 3</dd>

<dt>Percent grade</dt>
<dd>200%</dd>

</dl>

## What is slope?

Slope measures how steep a straight line is and which way it leans. It is the ratio of the vertical change (the **rise**) to the horizontal change (the **run**) between any two points on the line, and it is usually written as *m*. A slope of 2 means the line climbs 2 units for every 1 unit it moves to the right. The same number appears as the *m* in the equation y = mx + b, as the gradient of a road or roof, and as the rate of change on any graph: the slope of a distance–time graph is speed, and the slope of a cost line is the price per unit.

## Slope formula (rise over run)

**m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ run**

*Worked example:* for the points (1, 2) and (4, 8), the rise is 8 − 2 = 6 and the run is 4 − 1 = 3, so m = 6 ÷ 3 = **2**. The line climbs 6 units while moving 3 units to the right. Its angle of incline is tan⁻¹(2) ≈ **63.43°**. It does not matter which point you call point 1 as long as you subtract in the same order for both coordinates: (2 − 8) ÷ (1 − 4) = −6 ÷ −3 = 2 again.

## Slope-intercept form

Every non-vertical line can be written as **y = mx + b**, where b is the y-intercept, the point where the line crosses the vertical axis. To find b, substitute either point into the equation: b = y₁ − m × x₁ = 2 − 2 × 1 = 0. The line in the example is therefore **y = 2x**. The x-intercept, where y = 0, is −b ÷ m = 0, so this line passes through the origin. In point-slope form the same line is y − 2 = 2(x − 1). Any line parallel to it also has slope 2; any line perpendicular to it has the negative reciprocal slope, −1 ÷ 2 = −0.5.

## Distance and midpoint

The straight-line distance between the two points comes from the distance formula, **d = √\[(x₂ − x₁)² + (y₂ − y₁)²]**, which is the [Pythagorean theorem](https://methodcalculator.com/pythagorean-theorem-calculator) with the run and rise as the two legs of a right triangle. For the example: √(3² + 6²) = √(9 + 36) = √45 ≈ **6.7082**.

The midpoint is simply the average of the coordinates: **((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)** = ((1 + 4) ÷ 2, (2 + 8) ÷ 2) = **(2.5, 5)**.

## Interpreting the slope

| Slope | What the line does | Example |
| --- | --- | --- |
| Positive | Rises from left to right | y = 2x |
| Negative | Falls from left to right | y = −x + 4 |
| Zero | Horizontal (rise is 0) | y = 3 |
| Undefined | Vertical (run is 0) | x = 2 |

The size of the slope tells you the steepness: a slope of magnitude 1 makes a 45° angle, anything larger is steeper than 45° and anything smaller is flatter. Fractions and decimals are both fine; a slope of ¾ and a slope of 0.75 describe the same line.

## How to use this calculator

1. Enter the x and y coordinates of the first point. Decimals and negative numbers are allowed.
2. Enter the second point. The results update as you type.
3. Read the slope, the equation of the line and the other values. If both x values are equal the line is vertical and the slope is shown as undefined; if the two points are identical no line is defined.

## Slope in the real world: percent grade

Engineers and road builders quote slope as a percentage: **grade = slope × 100**. A 6% highway grade rises 6 meters for every 100 meters of horizontal distance, an angle of only 3.4°. Accessibility codes limit wheelchair ramps to 1:12, which is 8.33% or 4.8°. Railways rarely exceed 2–3%, a 4:12 roof pitch is a 33% grade (18.4°), and most stairs sit around 30–37°. Remember that 100% grade means a 45° angle, not a vertical wall. The example line, with its 200% grade, is far steeper than any road.

## Common mistakes

- **Mixing the order of subtraction:** (y₂ − y₁) over (x₁ − x₂) flips the sign of the slope.
- **Dividing run by rise:** slope is always vertical change over horizontal change.
- **Calling a vertical line's slope zero:** zero slope is horizontal; vertical is undefined.
- **Confusing percent and degrees:** 50% grade is 26.57°, not 50°. Use the inverse tangent to convert.
- **Reading slope off a graph with unequal axis scales:** the line may look steeper or flatter than its true slope. Use the coordinates, not the picture.

## **Frequently asked questions **

### **What is the slope of a vertical line?**

It is undefined. The run (x₂ − x₁) is zero, and dividing the rise by zero has no value. The line has the equation x = c, where c is the shared x-coordinate, and the calculator reports the slope as "Undefined" with an angle of 90°.

### **How do I find the slope from an equation?**

Rearrange it into y = mx + b; the coefficient of x is the slope. For 2x + 3y = 6, subtract 2x and divide by 3 to get y = −⅔x + 2, so the slope is −⅔ and the y-intercept is 2. Alternatively, pick any two x values, compute the matching y values and enter the two points here.

### **What is the difference between slope, gradient and grade?**

They describe the same ratio of rise to run. "Gradient" is the usual word in British English and engineering, while "grade" normally means the slope expressed as a percentage (slope × 100) or as a ratio such as 1:12. A 10% grade, a gradient of 0.1 and a slope of 1/10 are identical.

### **How do I convert a slope to an angle?**

Take the inverse tangent: angle = tan⁻¹(slope). A slope of 1 is 45°, a slope of 2 is 63.43° and a slope of 0.5 is 26.57°. Note that a 100% grade is 45°, not 90°; the angle approaches 90° only as the slope grows without limit.

### **How are parallel and perpendicular slopes related?**

Parallel lines have exactly the same slope. Perpendicular lines have slopes that are negative reciprocals of each other, so their product is −1: a line with slope 2 is perpendicular to any line with slope −½. The only exception is the horizontal–vertical pair, where one slope is 0 and the other is undefined.

## **Related calculators **

- [**Pythagorean Theorem Calculator**](https://methodcalculator.com/pythagorean-theorem-calculator)
- [**Quadratic Equation Calculator**](https://methodcalculator.com/quadratic-equation-calculator)
- [**Area Calculator**](https://methodcalculator.com/area-calculator)
- [**Ratio Calculator**](https://methodcalculator.com/ratio-calculator)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://methodcalculator.com/#website","@type":"WebSite","description":"Free online calculators for finance, health and fitness, math and everyday life. Simple, accurate and fast.","name":"Method Calculator","url":"https://methodcalculator.com/","publisher":{"@id":"https://methodcalculator.com/#identity"}},{"@id":"https://methodcalculator.com/slope-calculator#webpage","dateModified":"2026-11-02T20:28:45+01:00","datePublished":"2026-11-02T20:28:45+01:00","description":"Find the slope of a line from two points, plus the distance, midpoint, angle, y-intercept and the equation of the line in slope-intercept form.","name":"Slope Calculator","url":"https://methodcalculator.com/slope-calculator","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://methodcalculator.com/slope-calculator#breadcrumb"},"isPartOf":{"@id":"https://methodcalculator.com/#website"},"mainEntity":[{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/1"},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/2"},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/3"},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/4"},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/5"}],"potentialAction":[{"@type":"ReadAction","target":["https://methodcalculator.com/slope-calculator"]}],"primaryImageOfPage":{"@id":"https://methodcalculator.com/#logo"}},{"@id":"https://methodcalculator.com/#identity","@type":"Organization","name":"Method Calculator","url":"https://methodcalculator.com","logo":{"@id":"https://methodcalculator.com/#logo"}},{"@id":"https://methodcalculator.com/slope-calculator#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://methodcalculator.com","position":1},{"@type":"ListItem","name":"Math Calculators","item":"https://methodcalculator.com/math-calculators","position":2},{"@type":"ListItem","name":"Slope Calculator","position":3}]},{"@id":"https://methodcalculator.com/slope-calculator#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"UtilitiesApplication","description":"Find the slope of a line from two points, plus the distance, midpoint, angle, y-intercept and the equation of the line in slope-intercept form.","isAccessibleForFree":true,"name":"Slope Calculator","operatingSystem":"Any","url":"/slope-calculator","offers":{"@type":"Offer","availability":"https://schema.org/InStock","price":0,"priceCurrency":"USD","priceValidUntil":"2027-12-30T00:00:00.000Z"}},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/1","@type":"Question","inLanguage":"en","name":"What is the slope of a vertical line?","acceptedAnswer":{"@type":"Answer","text":"It is undefined. The run (x₂ − x₁) is zero, and dividing the rise by zero has no value. The line has the equation x = c, where c is the shared x-coordinate, and the calculator reports the slope as \"Undefined\" with an angle of 90°."}},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/2","@type":"Question","inLanguage":"en","name":"How do I find the slope from an equation?","acceptedAnswer":{"@type":"Answer","text":"Rearrange it into y = mx + b; the coefficient of x is the slope. For 2x + 3y = 6, subtract 2x and divide by 3 to get y = −⅔x + 2, so the slope is −⅔ and the y-intercept is 2. Alternatively, pick any two x values, compute the matching y values and enter the two points here."}},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/3","@type":"Question","inLanguage":"en","name":"What is the difference between slope, gradient and grade?","acceptedAnswer":{"@type":"Answer","text":"They describe the same ratio of rise to run. \"Gradient\" is the usual word in British English and engineering, while \"grade\" normally means the slope expressed as a percentage (slope × 100) or as a ratio such as 1:12. A 10% grade, a gradient of 0.1 and a slope of 1/10 are identical."}},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/4","@type":"Question","inLanguage":"en","name":"How do I convert a slope to an angle?","acceptedAnswer":{"@type":"Answer","text":"Take the inverse tangent: angle = tan⁻¹(slope). A slope of 1 is 45°, a slope of 2 is 63.43° and a slope of 0.5 is 26.57°. Note that a 100% grade is 45°, not 90°; the angle approaches 90° only as the slope grows without limit."}},{"@id":"https://methodcalculator.com/slope-calculator#/schema/question/5","@type":"Question","inLanguage":"en","name":"How are parallel and perpendicular slopes related?","acceptedAnswer":{"@type":"Answer","text":"Parallel lines have exactly the same slope. Perpendicular lines have slopes that are negative reciprocals of each other, so their product is −1: a line with slope 2 is perpendicular to any line with slope −½. The only exception is the horizontal–vertical pair, where one slope is 0 and the other is undefined."}},{"@id":"https://methodcalculator.com/#logo","@type":"ImageObject","caption":"Method Calculator","contentUrl":"https://methodcalculator.com/favicon.svg","inLanguage":"en","url":"https://methodcalculator.com/favicon.svg"}]}
```

## Sitemap

See the full [sitemap](https://methodcalculator.com/sitemap.md) for all pages.
