We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Line Slope Calculator
If this tool helped you, you can buy us a coffee ☕
Quickly calculate the slope of a line by entering the coordinates of two points. Free online slope calculator for math and geometry.
Formulas
m = (y₂ − y₁) / (x₂ − x₁)
Distance Between Two Points: d = √[(x₂ − x₁)² + (y₂ − y₁)²]
Midpoint Coordinates: M = ((x₁ + x₂)/2, (y₁ + y₂)/2)
Angle with Positive X-axis: θ = arctan(m)
When x₁ = x₂, the line is vertical and the slope is undefined. When y₁ = y₂, the line is horizontal and the slope is 0.
y = 2x-2x + y = 0y - 2 = 2 · (x - 1)
Circle Area Calculator
Quickly calculate the area of a circle by entering the radius, diameter, or circumference. Supports custom units and precision settings.

Trigonometry Calculator
Calculate six trigonometric functions from radian values with custom decimal precision.

Prime and Composite Number Calculator
Instantly identify prime, composite, or special numbers. Supports batch checking and mathematical property analysis.
Calculating the slope of a line by hand in analytic geometry or math homework can be prone to errors. This tool automatically calculates and outputs the slope of a line based on the coordinates of two points entered by the user, helping you quickly verify results or complete calculations. The slope represents the steepness of a line relative to the horizontal axis, and its value is equal to the ratio of the difference in the y-coordinates to the difference in the x-coordinates (m = (y₂ - y₁) / (x₂ - x₁)).
Please ensure that the entered coordinates are valid numbers; do not leave them blank or enter non-numeric characters. When the line is vertical, the tool will indicate "slope is undefined" rather than throwing an error. All calculations are performed locally in your browser without uploading any data, ensuring your privacy is protected. If you need to perform another calculation, simply modify the values and click calculate again.
The slope m is also equal to the tangent of the line's angle of inclination (tanθ). When the slope and one point on a line are known, you can write the point-slope equation: y - y₁ = m(x - x₁). In practical problem-solving, if the coordinates of the two points are large, it is recommended to use the calculator to get the exact slope first before substituting it into the equation. Common examples: Points (0,0) and (5,10) yield a slope of 2; Points (-2,3) and (4,-1) yield a slope of -2/3 ≈ -0.6667.