Калькулятор Наклона

Калькулятор Наклона находит наклон линии между двумя точками по формуле m = (y₂ − y₁) / (x₂ − x₁). Помимо самого наклона возвращает уравнение линии (y = mx + b), угол с осью x, расстояние между точками и середину. Вертикальные линии (где x₁ = x₂) обнаруживаются и сообщаются как 'неопределенный наклон' вместо деления на ноль.

Point 1
Point 2

Try a worked example

Как использовать

  1. 1

    Введите координаты точки 1 (x₁, y₁) — например, (0, 0).

  2. 2

    Введите координаты точки 2 (x₂, y₂) — например, (4, 8).

  3. 3

    Наклон появляется мгновенно с подставленной формулой.

  4. 4

    Если линия вертикальная (x₁ = x₂), калькулятор показывает 'неопределенный'.

  5. 5

    Под наклоном вы также получаете уравнение y = mx + b, угол к оси x, расстояние и середину.

  6. 6

    Нажмите на любой пример, чтобы загрузить классические случаи.

Часто задаваемые вопросы

Ratings & Reviews

Rate this tool

Sign in to rate and review this tool.

Loading reviews…

What is the slope of a line?

The slope measures how steep a line is and which direction it tilts on a coordinate plane. It's the rate of change of y with respect to x — for every unit you move horizontally, how many units does the line move vertically?

Slope is calculated using two points on the line, (x₁, y₁) and (x₂, y₂), and the rise-over-run formula:

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

The numerator (y₂ − y₁) is the "rise" — the vertical change between the two points. The denominator (x₂ − x₁) is the "run" — the horizontal change. Divide rise by run and you get the slope, written as m in math (the letter comes from the French monter, "to climb").

A positive slope means the line goes up as you move from left to right. A negative slope means the line goes down. A slope of zero means the line is horizontal — y never changes. And a slope that's "undefined" means the line is vertical — x never changes, so the rise-over-run formula would have you divide by zero.

How to use the slope calculator

Five steps:

  1. Enter the coordinates of point 1 in the x₁ and y₁ fields. For example, x₁ = 0, y₁ = 0.
  2. Enter the coordinates of point 2 in the x₂ and y₂ fields. For example, x₂ = 4, y₂ = 8.
  3. The slope appears instantly with the formula plugged in below it: (8 − 0) / (4 − 0) = 2.
  4. Below the slope, the calculator also shows the slope-intercept equation (y = mx + b), the angle the line makes with the x-axis, the distance between the two points, and the midpoint of the segment.
  5. Tap any worked example to load classic cases — positive slope, negative slope, horizontal line, vertical line — and watch the results update.

If you enter two points that share the same x-coordinate (a vertical line), the calculator detects this and reports the slope as "undefined" rather than dividing by zero. If they share the same y-coordinate (a horizontal line), the slope is 0 and the equation simplifies to y = constant.

Worked examples

Let's run through the most common cases so you can sanity-check the calculator's output.

Example 1 — Positive slope

Points: (0, 0) and (4, 8).

m = (8 − 0) / (4 − 0) = 8 / 4 = 2.

The line rises 2 units for every 1 unit of horizontal travel — a steep upward slope. The equation: y = 2x. The angle with the x-axis: arctan(2) ≈ 63.43°.

Example 2 — Negative slope

Points: (-2, 4) and (2, -4).

m = (-4 − 4) / (2 − (-2)) = -8 / 4 = -2.

The line drops 2 units for every unit of horizontal travel — equally steep, but going downward. The equation: y = -2x + 0, since the line passes through the origin. Angle: arctan(-2) ≈ -63.43°.

Example 3 — Slope of zero (horizontal line)

Points: (0, 5) and (10, 5).

m = (5 − 5) / (10 − 0) = 0 / 10 = 0.

Both points share y = 5, so the line is horizontal. The equation: y = 5 (no x term, because x doesn't matter). Angle: 0°.

Example 4 — Undefined slope (vertical line)

Points: (3, 1) and (3, 9).

m = (9 − 1) / (3 − 3) = 8 / 0 = undefined.

Both points share x = 3, so the line is vertical. Vertical lines can't be expressed in the form y = mx + b — instead, they're written as x = 3. The angle is 90°.

From slope to slope-intercept form

Once you have the slope, finding the full equation of the line takes one more step. The slope-intercept form is:

y = mx + b

where m is the slope and b is the y-intercept (the y-value where the line crosses the y-axis). To find b, plug one of your known points into the equation and solve:

b = y₁ − m × x₁

For points (1, 5) and (3, 11): m = (11 − 5) / (3 − 1) = 6/2 = 3. Then b = 5 − 3 × 1 = 2. The equation is y = 3x + 2. Verify by plugging in the second point: y = 3 × 3 + 2 = 11. ✓

The calculator does this automatically and shows the full slope-intercept equation alongside the slope. For vertical lines, where the slope is undefined, it reports the equation as x = constant instead.

Slope and angle — the same idea, two ways to express it

Slope and angle are mathematically equivalent: every slope corresponds to exactly one angle of inclination relative to the x-axis, and vice versa. The conversion is:

angle = arctan(slope) (in degrees, after converting from radians)

Some intuitive cases:

  • Slope 0 → angle 0° (horizontal)
  • Slope 1 → angle 45° (perfectly diagonal)
  • Slope ≈ 1.732 → angle 60°
  • Slope 2 → angle ≈ 63.43°
  • Slope 10 → angle ≈ 84.29° (almost vertical)
  • Slope ∞ → angle 90° (vertical)
  • Slope -1 → angle -45° (downward diagonal)

Why have two ways to express the same idea? Slope is more useful in algebra (it slots directly into y = mx + b). Angle is more useful in geometry, physics, and engineering (where you're talking about ramps, roads, roofs, and trajectories). The calculator gives you both, so you don't have to convert by hand.

Rise over run — the visual interpretation

The phrase "rise over run" is more than a mnemonic — it's the literal geometric meaning of slope. Pick any two points on the line. The "rise" is how far up (or down) you'd walk to get from one to the other; the "run" is how far across. Slope is rise divided by run.

This is why slope is sometimes written as a fraction. A slope of 3/4 means the line goes up 3 units for every 4 units to the right. A slope of -1/2 means it drops 1 unit for every 2 units to the right. The calculator shows this fractional form when it simplifies cleanly — useful for graphing by hand or for understanding the line's "character" (e.g., is it a gentle ramp or a steep cliff?).

Construction sites, road signs, and roof framers all express slope as a ratio for the same reason: it's intuitive. A road grade of 6% means 6 units of rise per 100 units of run — a gentle uphill. A roof pitch of 12/12 means 12 inches of rise per 12 inches of run — a 45° angle, the classic A-frame shape.

When slopes matter beyond math class

Slope shows up everywhere two quantities change together at a steady rate.

  • Construction — roof pitch, ramp grade, drainage gradient. ADA-compliant wheelchair ramps require a slope of at most 1/12 (about 4.76°), so for every inch of vertical rise, you need 12 inches of horizontal run.
  • Roads — highway grade signs ("6% downgrade") report slope as a percentage. Steep grades require runaway truck ramps and lower speed limits.
  • Economics — supply and demand curves are graphed with price on the y-axis and quantity on the x-axis. The slope tells you the elasticity — how much demand changes for each unit price change.
  • Physics — on a position-vs-time graph, slope is velocity. On a velocity-vs-time graph, slope is acceleration. The slope IS the rate of change.
  • Sports — a fitness tracker plotting heart rate over time shows your warmup intensity as the slope of the curve. Coaches use this to gauge how aggressively you're training.
  • Skiing — slope ratings (green / blue / black) describe steepness: green is roughly 6-25% (3.4°-14°), blue is 25-40% (14°-22°), black is 40%+ (22°+). Black-diamond runs aren't a different kind of mountain — they're just steeper.

In all of these, "slope" means the same thing it means in algebra: rise over run, the rate at which one quantity changes per unit of another.

Common mistakes to avoid

  • Subtracting in different orders. If you compute (y₂ − y₁) on top, you must compute (x₂ − x₁) on the bottom — same order. Mixing (y₂ − y₁) over (x₁ − x₂) gives you the negative of the correct slope.
  • Forgetting that slope is undefined for vertical lines. A common error is to "compute" 8/0 as a very large number or as 0. It's neither — division by zero is undefined. Treat vertical lines as a separate case.
  • Confusing slope with the line's equation. Slope is just one number (a real number or "undefined"). The full equation of the line needs the slope AND the y-intercept (or one point on the line). The calculator gives you both.
  • Reading slope from a graph by eye. If you look at a sketched line, your eye easily over- or underestimates how steep it is. Always pick two clear lattice points and use the formula instead of guessing.

What the calculator gives you, summarized

From two points, you get:

  • Slope (m) — the headline result, in decimal form, with a fractional simplification when one exists.
  • Slope-intercept equation — y = mx + b for normal lines, or x = constant for vertical lines.
  • Angle to the x-axis — the line's inclination in degrees.
  • Distance between the points — straight-line distance using the Pythagorean theorem.
  • Midpoint — the (x, y) coordinates exactly halfway between the two points.

All five outputs come from the same two-point input. Once you know the slope, the line is fully determined, and these other quantities are just different ways of describing the same line.