Slope Calculator
Find the slope, angle, intercept and distance between two points on a graph. Get the line equation instantly.
Slope m
1.33
Angle of incline
53.13 deg
Line equation
y = 1.33x + 0.67
Distance between points
5
dx = 3, dy = 4
Slope = (y2 - y1) / (x2 - x1). A vertical line has an undefined slope.
Last updated: February 2026
How this calculator is verified
Checked by True Calculator automated test suite on
- Formula verified against a published worked example in the automated test suite
- Edge cases (zero, negative, boundary and unit-mismatch inputs) covered by unit tests
The full verification method is on our how we verify page. Found an error? Tell us and we will re-check it.
When to Use This Calculator
A slope calculator serves anyone who measures steepness or builds with gradients. Civil engineers and surveyors use it for road gradients, drainage slopes and embankment design, where a wrong slope can cause waterlogging or erosion. Architects and builders check roof pitches and floor drainage falls with it. Students studying coordinate geometry rely on it to verify slope, line equations and distances between points. Gardeners and landscapers plan the fall of lawns and pathways so rainwater drains away from buildings, and interior designers use it when installing accessibility ramps. Even data analysts use slope informally to describe the trend of a line on a chart. The tool returns the slope, angle in degrees, intercept and distance in one go, replacing tedious manual formula work with instant results.
How to Use This Calculator
- Step 1: Enter the x and y coordinates of the first point, such as (1, 2).
- Step 2: Enter the x and y coordinates of the second point, such as (4, 6).
- Step 3: Read the slope m, the angle of incline, the distance between the points and the line equation.
- Step 4: Use the equation in y = mx + b form to draw the line or predict more points on it.
Worked Example
An engineering student in Chennai is analysing a road gradient between two survey points. Point one is at (1, 2) metres and point two is at (4, 6) metres. The calculator reports a slope of 1.33, meaning the road rises 1.33 metres for every metre of horizontal run. The angle of incline is 53.13°, and the distance between the points is exactly 5 m. The line equation comes out as y = 1.33x + 0.67, so the student can estimate the height at any horizontal distance. For a flatter section between (2, 3) and (5, 3), the slope is 0, confirming level ground with no rise at all.
Tips and Common Mistakes
- •Tip 1: A positive slope means the line rises from left to right; a negative slope means it falls.
- •Tip 2: For ramp designs in India, keep the slope gentle: a 6% ramp rises 6 units over 100 units of run.
- •Tip 3: Use the distance result to double-check slope calculations, since slope equals rise divided by run.
- ✗Mistake 1: Swapping the points, which keeps the slope value the same but flips the sign of the intercept in the equation.
- ✗Mistake 2: Entering identical x-coordinates and expecting a number, since a vertical line has an undefined slope by definition.
Frequently Asked Questions
How is the slope calculated?
Slope m equals (y₂ − y₁) divided by (x₂ − x₁). It measures how steeply the line rises or falls for each unit it moves to the right.
What does a slope of zero mean?
A slope of zero means the line is perfectly horizontal, like flat ground. The y-value stays the same no matter how far you move along the x-axis.
Why is a vertical line's slope undefined?
A vertical line has the same x-coordinate everywhere, so the horizontal change is zero. Dividing by zero is undefined, and the calculator shows the line as vertical instead.
What is the angle of incline?
It is the angle the line makes with the horizontal x-axis, measured in degrees. A 45-degree line has a slope of 1, since the rise equals the run.
Can I use the slope calculator for real-world gradients?
Yes. It works for road and ramp gradients, staircase slopes, drainage pitches and mountain trail steepness. The same slope formula applies everywhere.
Compare these tools
- Percentage Calculator — Calculate percentages, percentage difference and percentage change instantly
- Rounding Calculator — Round any number to the nearest value, or up and down, to any decimal places
- Standard Form Calculator — Convert numbers to and from standard form (scientific notation) with one click
You might also need
Related calculators from other categories
Statistics
Covariance Calculator
Calculate sample or population covariance between two paired series, with the correlation coefficient. See how two variables move together.
Date
Age Difference Calculator
Find the age difference between two dates in years, months and days, plus total days, weeks and months. See who is older at a glance.
Statistics
Correlation Coefficient Calculator
Compute the Pearson correlation coefficient between two data series. See r, r² and the direction and strength of the relationship.
Date
Date Difference Calculator
Count the exact days, weeks, months, years and business days between two dates, with hours and minutes too. Perfect for deadlines, leave and projects.