Math

Slope Calculator

Rise over run between two points — the fraction kept when it is clean, the angle in degrees, the line in intercept form, the distance (the 3-4-5 shadow), and the vertical refusal that keeps the definition honest.

Slope Calculator

Results recalculate instantly on every keystroke. Nothing you type is transmitted.

First point
Second point
Slope m
—
Angle & direction—
The line—
Distance—
Rise over run—

What this result does not account for

  • Exactly two points — no datasets, no regression
  • Fraction portrait only for small-integer rise and run
● Zero-Server Execution Updated 11 Aug 2026 Reviewed by Sana Khalid IEEE-754 Double Precision

In short: (1, 1) to (4, 5): the run is 3, the rise is 4, and the slope is m = 4/3 ≈ 1.333333 — up 4 for every 3 across. The angle is atan(4/3) ≈ 53.130102°, the line is y = (4/3)x − 1/3, and the point-to-point distance is √(9 + 16) = 5: the 3-4-5 triangle, disguised as coordinates. Same x? Refused — a vertical line has no slope, and the page says exactly that.

Formula

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

y = m·x + b with b = y₁ − m·x₁ · m₁·m₂ = −1 ⇔ perpendicular

every straight line is a slope and a starting height — this page measures both from two points.

Worked Example

  1. Rise and run. run = x₂ − x₁, rise = y₂ − y₁. Run zero is the vertical case — refused, not divided.
  2. Slope and angle. m = rise/run kept as a fraction when the pieces are small; θ = atan(m) converts the slope to degrees from horizontal.
  3. Anchor the line. b = y₁ − m·x₁ pins the line through YOUR first point; the distance card closes the right triangle the two points secretly form.

The perpendicular law lives here too: any line with slope −3/4 crosses this one at a right angle, because (4/3)·(−3/4) = −1 — flip the fraction and swap the sign, that is the whole rule. And the horizontal case is named, not just computed: rise 0 gives m = 0, the flattest line there is.

Strengths & Limits Of This Model

Where this engine is strong

  • The fraction survives — 4/3 stays 4/3 next to 1.333333
  • The vertical case refuses with the geometry named

Where it stops

  • No parallel/perpendicular LINE construction
  • No graph

Risk & accuracy notice. Two nearly-identical x values produce a gigantic slope whose digits are mostly noise amplification — near-vertical is numerically fragile even when not exactly vertical, and the page prints it honestly but the reader should hear the warning in it. Slope describes the line through the two points given, not the trend of anything else.

Practical Use Cases

Roof pitches and ramps

rise over run is the builder’s slope

Trend lines

how steep is the change, per unit across

Line equations

two points in, y = mx + b out

Methodology & Editorial Standards

run = x₂ − x₁ and rise = y₂ − y₁ in exact doubles; run = 0 refuses as the vertical case. m = rise/run, kept as a GCD-reduced fraction when both are small integers. θ = atan(m) in degrees; b = y₁ − m·x₁ gives the intercept form; distance = √(run² + rise²). The perpendicular law m·m⊥ = −1 is stated with the computed slope.

Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.

This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.

Sana Khalid Principal Front-End Engineer · ApexConverter

Numerical methods and floating-point precision engineering. Last reviewed: 11 August 2026.

Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.


Slope Calculator — 9 Expert FAQs

9 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.

What does slope measure, in one sentence?

How fast the line climbs per unit of horizontal travel — rise over run. A slope of 4/3 means 4 up for every 3 across; 0 means flat; negative means downhill left-to-right. It is the rate of change that the Derivative page measures one point at a time — here it is the constant version between two points.

Why is a vertical line’s slope refused?

Because the run is zero and dividing by zero has no answer: the line climbs infinitely fast in no horizontal distance at all. “Undefined slope” is not a failure of the calculator — it is the honest description. The page refuses and names the line as vertical instead of printing a fake number.

Why is the fraction form kept when possible?

Because 4/3 is the exact truth while 1.333333 is a portrait. Small-integer rises and runs print as the fraction (reduced by the GCD) beside the decimal, so the geometry survives the arithmetic — and the perpendicular law is trivial to check on a fraction: flip and negate.

How does the angle relate to the slope?

Exactly: θ = atan(m), in degrees. Slope 1 is 45°, slope 0 is flat, and the default 4/3 gives 53.130102° — the same angle the Vector page finds between (3, 4) and the x-axis, because rise 4 over run 3 IS that triangle. Two pages, one right triangle.

What is the line card giving me?

The full equation through your two points: slope m plus intercept b = y₁ − m·x₁, printed as y = mx + b in both fraction and decimal dress. Two points in, the entire line out — which is the payoff of the whole page: a line is completely determined by two facts, and now you own both.

What is the distance card computing?

The straight-line distance between the points: √(run² + rise²) — the Pythagorean theorem on the right triangle your two points form with the axes’ helper corner. On the default it is √(9 + 16) = 5, the oldest right triangle in the book. Slope is one side’s steepness; distance is the hypotenuse.

What does a negative slope mean?

The line falls as x grows — downhill left to right — and the angle lands past 90°. Nothing in the arithmetic changes: the rise is simply negative. Watch the sign on the line card’s intercept form, where the minus is printed rather than implied.

How do I test two lines for parallel or perpendicular?

Parallel: identical slopes — same 4/3, no meeting. Perpendicular: slopes multiply to −1 — this page’s 4/3 pairs with −3/4. Both rules are on the note card because they are the two questions every coordinate-geometry course asks next, and both are one glance away once the fraction form is visible.

Can the points be decimals or negatives?

All four coordinates accept any finite numbers. The fraction portrait appears when both rise and run are small integers; otherwise the decimal carries the answer at the site’s six-place honesty. The only refusal is the vertical case, which is the mathematics refusing — not the page.

Related Math Engines