Data Source and Methodology
Authoritative reference: OpenStax, Algebra and Trigonometry (2017; updated 2022), Section 3.2 “Slope of a Line” and Section 1.4 “Angles”. Available at openstax.org.
Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.
The Formula Explained
Two points:
$$ m \;=\; \frac{y_2 - y_1}{x_2 - x_1} $$
Rise and run:
$$ m \;=\; \frac{\Delta y}{\Delta x} $$
Angle relationship:
$$ m \;=\; \tan(\theta), \qquad \theta \;=\; \arctan(m) $$
Grade (%):
$$ \text{grade}(\%) \;=\; 100 \times \frac{\Delta y}{\Delta x} \;=\; 100m $$
Line equations:
$$ y \;=\; mx + b \qquad\text{and}\qquad y - y_1 \;=\; m(x - x_1) $$
Glossary of Variables
- x₁, y₁; x₂, y₂
- Coordinates of two distinct points on the line.
- Δy (rise)
- Vertical change between two points. Positive upwards.
- Δx (run)
- Horizontal change between two points. Positive to the right.
- m (slope)
- Rate of change in y per unit x. Undefined for vertical lines.
- b (y-intercept)
- Value of y when x = 0 in the slope–intercept form y = mx + b.
- θ (theta)
- Inclination angle of the line. θ = arctan(m). Vertical lines are at ±90°.
- Grade (%)
- Percent slope: 100 × rise/run.
- Pitch (Rise:Run)
- Integer ratio describing vertical to horizontal change, simplified.
Worked Example
How It Works: A Step-by-Step Example
Suppose you have points A(2, 3) and B(8, 9). Compute the slope and equation.
- Apply the slope formula: m = (y₂ − y₁) / (x₂ − x₁) = (9 − 3) / (8 − 2) = 6 / 6 = 1.
- Find b using y = mx + b and point A: b = y − mx = 3 − 1·2 = 1.
- Equation: y = x + 1.
- Angle: θ = arctan(1) = 45°; Grade: 100 × 1 = 100%.
Frequently Asked Questions (FAQ)
What is the difference between slope, grade, and pitch?
Slope is a unitless ratio m = rise/run. Grade expresses slope as a percentage (100m). Pitch commonly denotes the simplified ratio Rise:Run with integers.
How do I interpret a negative slope?
A negative slope means the line goes down as x increases. The angle is between −90° and 0°, and the grade is negative.
What happens if x₁ = x₂ or Run = 0?
The line is vertical. Slope is undefined, the equation is x = c, the angle is 90°, and grade is infinite.
Can I enter angles beyond ±90°?
Angles beyond ±90° represent the same line direction modulo 180°. This tool accepts any degree value and computes m = tan(θ).
How precise is the fraction output?
We approximate the decimal slope as a reduced fraction using a continued-fraction algorithm with a bounded denominator for stability.
Do units matter?
No. Slope, grade, and pitch are ratios and are unitless, as long as rise and run use the same length unit.
How does this compare to other tools?
This calculator supports multiple input modes (points, rise/run, angle, slope-intercept), returns fraction, percent, angle, and full equations, with accessible UX and live validation.