📈 Slope Calculator
Find the slope, angle and distance between any two points. Enter the coordinates and get an instant, accurate result — perfect for algebra, geometry and graphing.
What is this tool?
The slope of a line describes how steep it is and in which direction it travels. In algebra and coordinate geometry, slope is defined as the ratio of the vertical change (rise) to the horizontal change (run) between two points on the line. A positive slope rises from left to right, a negative slope falls, a slope of zero is perfectly flat, and an undefined (infinite) slope represents a vertical line. This slope calculator takes the coordinates of two points — (x₁, y₁) and (x₂, y₂) — and immediately returns the slope m, the angle of inclination in degrees, and the straight-line distance between the two points. These three results cover the most common questions that come up when graphing linear equations, analysing physical ramps and inclines, or solving geometry homework. Every calculation is performed locally in your browser, so the coordinates you enter never leave your device. The tool accepts both whole numbers and decimals, handles negative coordinates without any special syntax, and clearly warns you when the line is vertical (where slope is undefined) so you are never shown a misleading number.How it works
The slope is computed with the classic formula m = (y₂ − y₁) / (x₂ − x₁). The numerator is the rise (the difference in the y values) and the denominator is the run (the difference in the x values). When the run is zero the line is vertical and the slope is undefined, which the tool reports explicitly instead of attempting to divide by zero. The angle of inclination is derived from the arctangent of the slope: angle = atan(m), converted from radians to degrees. This angle is measured from the positive x-axis, so it ranges from −90° to +90° for non-vertical lines. The straight-line distance between the two points uses the distance formula derived from the Pythagorean theorem: d = √((x₂ − x₁)² + (y₂ − y₁)²). All three values are rounded to a sensible number of decimal places for display.How to use
- Enter the x₁ and y₁ coordinates of the first point.
- Enter the x₂ and y₂ coordinates of the second point.
- Click the Calculate button to evaluate the results.
- Read the slope m, the angle in degrees, and the distance between the points.
- Change any value and recalculate as often as you need.
Frequently Asked Questions
Frequently Asked Questions
What does it mean when the slope is undefined?
An undefined slope means the line is perfectly vertical, which happens when both points share the same x coordinate. Because the horizontal change (run) is zero, dividing by zero is impossible, so instead of showing a number the calculator reports the slope as undefined (infinite).
How is the angle calculated from the slope?
The angle of inclination is the arctangent of the slope, converted from radians to degrees. It represents how steeply the line rises or falls relative to the horizontal x-axis, ranging from −90° to +90° for non-vertical lines.
Can I use negative coordinates?
Yes. The calculator fully supports negative x and y values, which is essential for points in the second, third and fourth quadrants of the coordinate plane. Simply type the minus sign before the number, for example -3 or -7.5.
What is the difference between slope and distance?
Slope is a ratio that describes the steepness and direction of the line, while distance is the actual length of the straight segment connecting the two points. A line can have a steep slope but a short distance if the points are close together.
Tips & Advice
When the slope comes out as a fraction, it helps to interpret it as rise over run — a slope of 3/2 means the line rises 3 units for every 2 units it moves to the right. A negative slope simply means the line falls from left to right, which is common for lines describing depreciation or cooling. If you need the angle for a physical ramp, remember that accessibility guidelines usually express steepness as a ratio (such as 1:12) rather than degrees. Always double-check that your two points are distinct — entering the same point twice gives a distance of zero and makes the slope meaningless. The distance result is also handy as a quick double-check of your coordinate entry, since an unexpectedly large distance often signals a typo.
Related Tools
Basic Calculator
A clean, fast basic calculator for everyday math. Add, subtract, multiply, divide, use percentages and toggle signs — all running locally in your browser.
Circumference Calculator
Find the perimeter or circumference of common shapes in seconds. Pick a shape, enter its dimensions and get the total boundary length instantly.
Pythagorean Theorem Calculator
Solve right triangles with the Pythagorean theorem. Enter any two sides — legs a and b or hypotenuse c — and the missing side is calculated instantly.