Two points in, full line out — slope, angle, distance, midpoint, y = mx + b and grade % — browser-only
- Runs locally
- Category Calculator
- Best for Getting a realistic range before a purchase, plan, workout, or schedule decision.
What this tool does
Free slope calculator that turns two points (x1, y1) and (x2, y2) into a complete picture of the line through them. It reports the slope m = (y2 - y1) / (x2 - x1), the inclination angle in degrees from atan2(Δy, Δx), the straight-line distance hypot(Δx, Δy), the midpoint, the y-intercept, the fully formatted line equation y = mx + b, and the civil- engineering grade percentage (m × 100). Vertical lines are handled honestly: when x2 = x1 the run is zero, so the slope is shown as "undefined (vertical line)" instead of a misleading Infinity or NaN. Every result is rounded to a readable precision and there is one button to copy all of them at once. Built for students checking homework on slope, point- slope and slope-intercept form, and for engineers reading a road or roof grade off two survey points. Everything runs in your browser and the share link rebuilds your exact two points. 100% client-side, nothing uploaded.
Tool details
- Input
- Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy + Preview
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 12 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Calculator · Student
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Slope Calculator fits into your work
Use it for fast estimates, comparisons, and planning numbers before you make the final call.
Calculation jobs
- Getting a realistic range before a purchase, plan, workout, or schedule decision.
- Comparing scenarios by changing one input at a time.
- Turning rough assumptions into a number you can discuss.
Calculation checks
- Double-check units, dates, rates, and rounding assumptions.
- Treat health, finance, tax, and legal outputs as planning aids, not professional advice.
- Save the inputs that produced an important result so you can reproduce it later.
Good next steps
These links move the current task into a more complete workflow.
- 1 Unit Converter Convert between length, weight, temperature, area, volume, speed, time — instant, browser-only Open
- 2 Percentage Calculator 5 common percentage calculations — "x% of y", "x is what% of y", percentage change, increase/decrease — instant, browser-only Open
- 3 Triangle Calculator Triangle solver — SSS, SAS, ASA, AAS, and the ambiguous SSA case via law of sines + law of cosines. All sides, angles, area, perimeter, type, drawn to scale. Open
Real-world use cases
Check a slope homework answer in seconds
Your worksheet asks for the slope of the line through (-2, 3) and (4, -9). Type both points, read m = -2, and confirm the angle, the equation y = -2x - 1, and the distance all at once. Instead of re-deriving rise over run by hand and second-guessing a sign, you see every related quantity and can check that your written work matches before you turn it in.
Read a road or driveway grade from two survey points
A surveyor hands you two elevation points along a centerline. Enter horizontal station as x and elevation as y, and the grade percentage drops out directly — a 6% grade flags a stretch that may be too steep for the design standard. The same numbers give you the slope and the inclination angle, so you can sanity-check the cross-section without opening a CAD package.
Find the equation of a line for a graph
You are plotting a trend or drawing a linear function and need its equation. Drop in two points the line passes through and the tool returns y = mx + b with the intercept already computed, handling the ugly cases (b = 0, m = 1, m = -1) so the equation reads cleanly. Paste it straight into your notes, a report, or a graphing tool.
Size a ramp or roof pitch to a slope limit
A ramp must stay under an 8.33% grade and a roof needs a target pitch. Enter the run as x and the rise as y, read the grade percent and the angle, and adjust the rise until both land inside spec. The midpoint and distance also tell you the ramp's true sloped length, not just its horizontal footprint.
Common pitfalls
Swapping the order of subtraction inconsistently. The slope is (y2 - y1) / (x2 - x1); if you do y2 - y1 on top but x1 - x2 on the bottom you flip the sign. Always subtract the two coordinates in the same order. The tool fixes the order for you, but on paper this is the number one slope error.
Calling a vertical line's slope "infinity" or zero. When x2 = x1 the slope is undefined, not infinite and definitely not 0 (that is a horizontal line). Writing 0 swaps vertical and horizontal completely. The tool prints "undefined (vertical line)" and gives the x = c equation instead.
Confusing grade percentage with the angle in degrees. A 100% grade is a 45 degree angle, not 90, because grade is rise over horizontal run while the angle is measured off the horizontal. Reading a "10% grade" as "10 degrees" overstates steep slopes and understates shallow ones.
Privacy
Every number here — slope, angle, distance, midpoint, the equation and the grade — is computed by plain JavaScript inside your browser tab. The two points you enter never leave the page and nothing is logged. The one caveat: the shareable URL encodes your points in the query string, so a link pasted into chat records those coordinates in the recipient server's access log. If the points are sensitive, copy the text output instead of sharing the URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Chinese Acupoint Locator 200+ meridian acupoints / WHO 2008 standard locations / with contraindications, manipulation, and combinations.
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only
- Anagram Solver Check if two words are anagrams, rearrange a set of letters into every ordering, and read the sorted letter fingerprint, all in your browser
- Angle Converter Degrees, radians, gradians, turns, arcminutes, arcseconds and NATO mils, all from one input, copyable, browser-only