Loading…

Slope and Angle Between Lines Tool

Math Geometry • Coordinate Geometry

View all topics

Compute slopes and the acute angle between two lines. Works for vertical lines too. The graph is interactive: drag to pan, wheel/trackpad to zoom, pinch on touch.

Inputs accept 1e-3, pi, e, sqrt(2), sin(), cos(), tan(), ln(), log(), abs(). Use * for multiplication.

Mode

Tip: “Slopes only” is fastest for angle checks (parallel/perpendicular). Intercepts are only used for the graph.

Line 1
Line 2
Graph options

Graph uses square units: 1 unit in \(x\) equals 1 unit in \(y\).

Ready
Choose a mode and click Calculate.
Two lines (pan/zoom enabled)

Drag to pan • wheel/trackpad to zoom • pinch on touch • “Reset view” fits the geometry.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

How do you calculate the slope of a line from two points?

For points A(x1, y1) and B(x2, y2), the slope is m = (y2 - y1)/(x2 - x1). If x2 = x1, the line is vertical and the slope is undefined.

What is the formula for the angle between two lines?

For two non-vertical lines with slopes m1 and m2, the acute angle can be found with theta = arctan(|(m2 - m1)/(1 + m1 m2)|). This returns an angle between 0 degrees and 90 degrees.

How does the calculator handle vertical lines when finding the angle?

Vertical lines have undefined slope, so the calculator uses a method that still works when a line is vertical. This avoids division-by-zero issues and still produces the acute angle between the lines.

When are two lines parallel or perpendicular based on slope?

Two non-vertical lines are parallel when m1 = m2, which corresponds to an angle of 0 degrees. They are perpendicular when m1 m2 = -1, which corresponds to an angle of 90 degrees (accounting for vertical-horizontal perpendicular pairs as well).