Skip to content
ToolSuite

Slope Calculator

Find the slope of a line through two points, plus its angle, intercept, perpendicular slope and equation.

Processed in your browser

Your result will appear here as soon as you add some input.

How to use it

  1. 1Enter your values in the fields above.
  2. 2The answer and the working appear immediately below.
  3. 3Check the working to see the formula with your numbers substituted.

Example

Input

A(1, 2) and B(4, 8)

Output

Slope = 2, line y = 2x + 0

Formulas used

  • m = (y2 - y1) / (x2 - x1)
  • y = mx + c

About the Slope Calculator

Slope is rise over run - how far the line climbs for each unit it moves to the right. A slope of 2 means two units up for every one across; a slope of -0.5 means half a unit down.

The y-intercept is found by substituting one of the points back into y = mx + c, which gives the full equation of the line. Both are shown in the working.

The perpendicular slope is the negative reciprocal: multiply the two slopes together and you get -1. That is the quickest way to check whether two lines meet at a right angle.

A vertical line has no slope at all. The run is zero, so the division is undefined - the calculator says so rather than returning infinity.

Questions people ask

Is your figures uploaded to a server?

No. This tool runs entirely in your browser using standard web APIs, so your figures never leaves your device. You can confirm it by opening your browser's network panel while the tool runs, or by disconnecting from the internet after the page has loaded.

Is it free, and do I need an account?

Yes, it is free, and there is no account, no sign-up and no watermark on the result. The project is funded by optional donations.