Slope and Line Equation Calculator

Find the slope, intercepts and equation of a line through two points, with parallel and perpendicular lines.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Step 1: Open Slope and Line Equation Calculator and add your input

    Type your numbers or text, add your file, or pick the options you need. Nothing is uploaded: everything stays in your browser.

  2. 2
    Step 2: What Slope and Line Equation Calculator does

    Find the slope, intercepts and equation of a line through two points, with parallel and perpendicular lines.

  3. 3
    Step 3: Read the result and compare

    The result appears at once. Change one value to see how the answer moves, then keep the figure that fits your case.

  4. 4
    Step 4: Copy or save it

    Copy the result or download it. For an important decision, confirm it with the official source or an adviser.

About this tool

Enter two points. The calculator gives the slope, y-intercept, x-intercept, the line in slope-intercept, point-slope and standard form, the length and angle of the segment, and the slopes of parallel and perpendicular lines. Add a third point to get its distance to the line and the parallel and perpendicular lines through it.

Formulas

slope m = (y₂ − y₁) ÷ (x₂ − x₁); y = mx + b with b = y₁ − m·x₁; standard form Ax + By = C with A = Δy, B = −Δx. Parallel lines have the same slope, perpendicular lines have slopes whose product is −1.

Distance to a line

For a point P and the line Ax + By = C the distance is |A·Px + B·Py − C| ÷ √(A² + B²).

Worked example

Through (1, 2) and (4, 8): slope 2, y-intercept 0, y = 2x, standard form 6x − 3y = 0, perpendicular slope −0.5. The point (3, −1) is 3.1305 from the line.

Tips for best results

Check every box before you rely on a result, because one wrong digit changes the whole answer. Use the exact figures from your payslip, bill, certificate or contract, and keep a note of the date you calculated. Rates, thresholds and rules change from time to time, so for tax, fees and legal matters treat the output as an estimate and confirm with the official source named on this page. You can run as many scenarios as you like; nothing is saved or sent, and refreshing the page clears the boxes.

Quick facts

Embed this calculator on your site

Copy this code to show the calculator on your own page. A link back to shobfree.com is included.

Frequently asked questions

What if the line is vertical?

The slope is undefined and the line is x = constant.

What is the perpendicular slope?

The negative reciprocal, −1/m.

Which point is P?

A third point for the distance and the parallel and perpendicular lines through it.

Can both points be the same?

No, two different points are needed.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages