Distance, Slope & Midpoint

Distance, midpoint, slope and the equation of a line through two points — plus where two lines cross, and the area of any polygon from its corners.

Instant answers Works offline once loaded Nothing you type is sent anywhere Distance and midpoint Line intersection Shoelace area

Distance between them

Midpoint
Slope m
Slope as an angle
Rise (Δy)
Run (Δx)
Slope as a percentage grade
Slope-intercept form
Point-slope form
Standard form
x-intercept
y-intercept
Perpendicular bisector
line 1 / shape line 2 key point
Drag to pan, scroll to zoom.
Instructions

How to use this calculator

Step by step

  1. On Two points, type the coordinates of each point. The distance, midpoint and slope appear immediately, along with the line through them written four different ways.
  2. The faint dashed right triangle on the graph is the distance formula made visible — the two legs are the rise and run, and the distance is the hypotenuse.
  3. On Two lines, enter each line as Ax + By = C. The crossing point is found by Cramer's rule, and the answer is substituted back so you can check it.
  4. Parallel lines are reported as never crossing, and identical lines as coinciding everywhere. Neither is an error — both are legitimate answers.
  5. On Polygon, list the corners one per line, going round the outline in order. The area comes from the shoelace formula, which handles any shape without splitting it up.
  6. Drag the graph to pan and scroll to zoom. Fit to view frames whatever the current tab is working on.

Good to know

  • Slope is rise over run: how far up for each step across. A slope of 0.25 is the same as a 25% grade, which is how road engineers write it.
  • Perpendicular slopes multiply to −1. That single fact is behind the perpendicular bisector, the normal line, and most "shortest distance" problems.
  • The shoelace formula needs the corners in order around the outline. Listing them out of order produces a self-crossing shape and a meaningless area.
  • The sign of the shoelace sum tells you the winding direction — positive for counter-clockwise. It is the standard way to detect orientation in surveying and computer graphics.
  • For a land parcel, enter the corner coordinates in feet and the area comes out in square feet; divide by 43,560 for acres.
  • A polygon is convex when every corner turns the same way. One reflex corner — an interior angle over 180° — makes it concave, and the calculator says which.

The maths behind it

  • Distance d = √( (x₂−x₁)² + (y₂−y₁)² ) Pythagoras applied to the rise and run.
  • Midpoint M = ( (x₁+x₂)/2 , (y₁+y₂)/2 ) Simply the average of each coordinate.
  • Slope m = (y₂ − y₁) ÷ (x₂ − x₁) Undefined when the line is vertical.
  • Slope-intercept y = mx + b b is where the line meets the y-axis.
  • Point-slope y − y₁ = m(x − x₁) The most direct form when you have a point and a slope.
  • Perpendicular slope m⊥ = −1 ÷ m The two slopes always multiply to −1.
  • Intersection (Cramer) x = (C₁B₂ − C₂B₁) ÷ D, y = (A₁C₂ − A₂C₁) ÷ D, D = A₁B₂ − A₂B₁ D = 0 means the lines are parallel.
  • Shoelace area A = ½|Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)| Works for any simple polygon, convex or not.
Why is my slope "undefined"?

Because the two points share the same x, making the line vertical. The run is zero and the rise-over-run division has no answer. A vertical line has no slope-intercept form either; it is written simply as x = a constant, which is what the calculator shows instead.

My polygon area looks far too small.

Almost always the corners are out of order. The shoelace formula walks from each corner to the next, so listing them in a scrambled order traces a self-crossing star whose overlapping parts cancel out. Go round the outline in sequence, clockwise or counter-clockwise, and the area will be right.

Should I repeat the first corner at the end of the list?

No — the shape closes automatically from the last corner back to the first. Repeating it adds a zero-length edge, which is harmless for the area but adds a spurious row to the table.

How do I enter a vertical line in the two-lines tool?

As 1x + 0y = 3 for the line x = 3. Standard form handles vertical lines cleanly, which is exactly why the tool uses it rather than y = mx + b.

What units does the area come out in?

Square units of whatever your coordinates are in. Enter metres and you get square metres; enter feet and you get square feet. The calculator never assumes a unit, so the answer inherits yours.