Skip to main content
📈

Slope Calculator

Calculate the slope of a line from two points, find the equation of a line, determine y-intercept, and check if points are collinear. Get slope as rise over run, fraction, decimal, and percentage.

Input Values

Point 1 (x₁, y₁)
Point 2 (x₂, y₂)

Results

Enter two points to calculate the slope.

Slope Formulas Reference

Slope Formula
m = (y₂ - y₁) / (x₂ - x₁)
Rise over Run
Slope-Intercept Form
y = mx + b
m = slope, b = y-intercept
Point-Slope Form
y - y₁ = m(x - x₁)
Using a point and slope
Parallel Lines
m₁ = m₂
Same slope
Perpendicular Lines
m₁ x m₂ = -1
Negative reciprocals
Slope as Percentage
% = m x 100
Grade or gradient %

About This Calculator

The slope of a line is one of the most fundamental concepts in mathematics, representing the rate of change between two points on a coordinate plane. Expressed as 'rise over run,' slope measures how much a line goes up or down (rise) for every unit it moves horizontally (run). This simple yet powerful concept forms the foundation of linear algebra, calculus, and countless real-world applications. Whether you're a student learning coordinate geometry, an engineer calculating road grades, an architect designing wheelchair ramps, or a contractor determining roof pitch, understanding slope is essential. Our slope calculator instantly computes the slope from two points, displays it as a fraction, decimal, and percentage, finds the equation of a line in slope-intercept form, calculates parallel and perpendicular slopes, and even checks if multiple points are collinear. The slope formula m = (y2 - y1) / (x2 - x1) is straightforward, but having a reliable tool to verify calculations saves time and prevents errors in homework, professional projects, and everyday problem-solving scenarios.

Trusted Sources

How to Use the Slope Calculator

  1. 1Enter values and click calculate

Understanding Rise Over Run

The concept of 'rise over run' is the most intuitive way to understand slope. Rise refers to the vertical change between two points (how much you go up or down), while run refers to the horizontal change (how much you go left or right). When you divide rise by run, you get the slope. A positive slope means the line goes upward from left to right, while a negative slope means it goes downward. A slope of zero indicates a horizontal line, and an undefined slope (when run equals zero) indicates a vertical line. For example, if you move from point (1, 2) to point (4, 8), your rise is 8 - 2 = 6 and your run is 4 - 1 = 3, giving a slope of 6/3 = 2. This means for every 1 unit you move right, the line goes up 2 units.

Slope-Intercept Form: y = mx + b

The slope-intercept form is one of the most commonly used ways to express a linear equation. In this form, y = mx + b, 'm' represents the slope and 'b' represents the y-intercept (where the line crosses the y-axis). This form is particularly useful because you can immediately identify both the steepness of the line and where it starts on the y-axis. To convert from two points to slope-intercept form, first calculate the slope using m = (y2 - y1) / (x2 - x1), then substitute one of the points into y = mx + b and solve for b. Our calculator performs these calculations automatically, giving you the complete equation instantly.

Point-Slope Form and Finding Points on a Line

Point-slope form, written as y - y1 = m(x - x1), is invaluable when you know a point on the line and its slope. This form directly shows the relationship between any point (x, y) on the line and a known point (x1, y1). It's particularly useful for finding additional points on a line or writing an equation when you don't immediately know the y-intercept. To find any point on the line, simply substitute the x-value you're interested in and solve for y. Our Find Point mode automates this process, making it easy to determine coordinates for any x-value along your line.

Parallel and Perpendicular Lines

Understanding the relationship between slopes of parallel and perpendicular lines is crucial in geometry and practical applications. Parallel lines never intersect and have exactly the same slope. If one line has a slope of 3, any line parallel to it must also have a slope of 3. Perpendicular lines intersect at 90-degree angles, and their slopes are negative reciprocals of each other. This means if one line has a slope of m, a perpendicular line has a slope of -1/m. For example, if a line has a slope of 2/3, a perpendicular line has a slope of -3/2. When the original slope is zero (horizontal line), the perpendicular is vertical (undefined slope), and vice versa.

Real-World Applications: Roofs and Construction

In construction, slope is critical for designing roofs, determining drainage, and ensuring structural integrity. Roof pitch is typically expressed as rise over a 12-inch run (e.g., a 4:12 pitch rises 4 inches for every 12 inches of horizontal distance). Steeper pitches shed water and snow more effectively but require more materials and are harder to walk on. A typical residential roof has a pitch between 4:12 and 9:12. Drainage slopes for patios and driveways usually require a minimum slope of 1-2% (1/8 to 1/4 inch per foot) to prevent water pooling. Understanding these calculations helps homeowners communicate with contractors and verify work specifications.

Real-World Applications: Ramps and Accessibility

The Americans with Disabilities Act (ADA) specifies that wheelchair ramps must have a maximum slope of 1:12, meaning 1 inch of rise for every 12 inches of run (approximately 8.33% grade or 4.76 degrees). This requirement ensures safe access for wheelchair users and people with mobility challenges. For very long ramps, landings are required every 30 inches of vertical rise. Understanding slope calculations helps architects, builders, and facility managers design compliant accessible routes. Our calculator can quickly verify if a proposed ramp meets these requirements by entering the start and end point elevations.

Real-World Applications: Roads and Transportation

Road grades significantly impact vehicle performance, safety, and fuel consumption. Highway grades rarely exceed 6% in the United States, while mountain roads might reach 8-10%. Steeper grades require more engine power to climb and more braking on descents, increasing wear and fuel usage. Railroad grades are even more restrictive, typically limited to 2-3% because trains have difficulty gaining traction on steel rails. Understanding road grades helps drivers anticipate challenges, especially when towing heavy loads or driving large vehicles. Engineers use slope calculations extensively when planning routes to balance construction costs with safety and practicality.

Collinear Points and Their Applications

Three or more points are collinear if they all lie on the same straight line. Testing for collinearity has practical applications in surveying, computer graphics, and data analysis. Our calculator uses the area method: three points are collinear if the triangle they form has zero area. This is calculated using the formula Area = 0.5 * |x1(y2 - y3) + x2(y3 - y1) + x3(y1 - y2)|. If the area is zero (or extremely close to zero, accounting for floating-point precision), the points are collinear. This check is useful for verifying that measured points are aligned, detecting errors in coordinate data, or simplifying geometric shapes in computer programs.

Pro Tips

  • 💡Always identify which point is (x1, y1) and which is (x2, y2) before calculating. The order doesn't affect the final slope value, but consistency prevents sign errors.
  • 💡When the slope is a repeating decimal, express it as a fraction for exact accuracy. Our calculator automatically simplifies fractions to their lowest terms.
  • 💡Remember that a larger absolute value of slope means a steeper line. A slope of 5 is steeper than a slope of 2, and a slope of -5 is steeper than a slope of -2.
  • 💡To quickly sketch a line, plot the y-intercept first, then use the slope as 'rise over run' to find additional points.
  • 💡For perpendicular slopes, remember: positive becomes negative, and the fraction flips. Slope 2/3 becomes -3/2.
  • 💡When converting slope to angle in degrees, use the arctangent function: angle = arctan(slope). A slope of 1 corresponds to a 45-degree angle.
  • 💡In construction, always verify slope measurements with a level and measuring tape. Small errors in measurement can result in significant deviations over long distances.
  • 💡For drainage applications, remember that water flows perpendicular to contour lines, so the drainage path follows the steepest slope direction.
  • 💡When checking collinearity, slight rounding in coordinates can make points appear non-collinear. Our calculator uses a small tolerance to account for floating-point precision.
  • 💡Slope can be expressed four ways: as a ratio (3:4), a fraction (3/4), a decimal (0.75), or a percentage (75%). Choose the format most appropriate for your application.
  • 💡For road grades, a 100% slope would be a 45-degree angle. Most roads stay well below 10% for safety reasons.
  • 💡When graphing, a positive slope 'rises to the right' and a negative slope 'falls to the right.' This visual cue helps verify your calculations.

Frequently Asked Questions

Use the slope formula: m = (y2 - y1) / (x2 - x1). Subtract the y-coordinates (rise) and divide by the difference in x-coordinates (run). For example, for points (2, 3) and (6, 11), the slope is (11 - 3) / (6 - 2) = 8 / 4 = 2.

NB
Written byNina Bao
Updated January 16, 2026

More Calculators You Might Like