Calculators
Slope Calculator
Calculate the slope, y-intercept, line equation, and distance between two points locally in your browser.
Enter two points (x1, y1) and (x2, y2) from -1000000 to 1000000 to see the slope ((y2 - y1) / (x2 - x1)), y-intercept, line equation, distance, and line type. The calculation runs locally in your browser; your values are not uploaded or stored.
Find a line slope without uploading anything.
Enter two points (x1, y1) and (x2, y2) from -1000000 to 1000000000 to see the slope, y-intercept, line equation, distance, and line type. Everything runs locally in your browser, so your values are not uploaded or stored.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
What does the slope calculator show?
Enter two points (x1, y1) and (x2, y2) from -1000000 to 1000000000. The calculator returns the slope ((y2 - y1) divided by (x2 - x1)), the y-intercept, the line equation, the Euclidean distance, and the line type (rising, falling, horizontal, or vertical). For example, (0, 0) and (4, 2) give slope 0.5, y-intercept 0, equation y = 0.5x, distance 4.472135955, and rising line type.
Which formulas does the slope calculator use?
It uses slope = (y2 - y1) / (x2 - x1), y-intercept = y1 - slope x x1, line equation y = slope x x + y-intercept, and distance = square root of ((x2 - x1) squared + (y2 - y1) squared). A horizontal line has slope 0 with equation y = b, and a vertical line (x1 = x2) has undefined slope with equation x = x1.
Which inputs are accepted?
Enter numbers for x1, y1, x2, and y2 from -1000000 to 1000000000. Decimal values are accepted. Non-numeric text and values outside the limit show a clear error, as do two identical points. A vertical line reports undefined slope instead of a numeric result.
Do my numbers stay private?
Yes. The calculation and copy action run locally in your browser. CodeASystem does not upload or store the values you enter.