EVERYDAY MATH

Coordinate geometry calculator

Calculate horizontal and vertical displacement, distance, midpoint, slope, direction and line classification between two Cartesian points.

Formula verified
Regional presentationOptional · private to this browser

Neutral presentation is active.

No regional currency, unit or language profile is applied. This choice does not convert values or change formulas, results, routes or legal guidance.

Distance between the points

5The directed line is rising
Horizontal displacement (Δx)
3
Vertical displacement (Δy)
4
Midpoint
(2.5, 4)
Slope
1.333333
Direction from point 1
53.130102°
Line classification
rising
Direction is measured counter-clockwise from the positive x-axis. A vertical line has undefined slope; coincident points have neither a unique slope nor direction.
Saved toolsPrivate to this browser

Save useful calculators here for a quick return. Nothing is sent to an account or server.

Verification and calculation details

Purpose
Coordinate geometry calculator
Variables and units
Use the labelled fields and units shown in the calculator. Results use those units unless a conversion is stated.
Formula and method
The exact formula and worked example are shown below. Deterministic formula executed locally in the browser.
Assumptions
Only entered values and stated assumptions are included. Local fees, rules and professional requirements are excluded unless explicitly shown.
Engine version
1.0.0
Production verification baseline
Release 63 · source 998803f
Verification run
release-v63-2026-09-20
Last verified
— Automated release checks passing

Read the Calculation Standard · Report a calculation or source issue

How this calculator works

For points (x₁,y₁) and (x₂,y₂), calculate Δx=x₂−x₁ and Δy=y₂−y₁. Distance is √(Δx²+Δy²), midpoint is ((x₁+x₂)/2,(y₁+y₂)/2), slope is Δy/Δx when Δx is non-zero, and direction is atan2(Δy,Δx) normalized from 0° to less than 360°.

Variables and inputs

Point 1 x-coordinate
Required numeric input. finite value from −1 trillion to 1 trillion.
Point 1 y-coordinate
Required numeric input. finite value from −1 trillion to 1 trillion.
Point 2 x-coordinate
Required numeric input. finite value from −1 trillion to 1 trillion.
Point 2 y-coordinate
Required numeric input. finite value from −1 trillion to 1 trillion.

How to interpret the result

The calculator returns horizontal and vertical displacement, Euclidean distance, midpoint coordinates, slope or an undefined vertical-line result, direction angle, line classification. Read each output against the assumptions you entered, compare alternatives one variable at a time, and use the result as an estimate rather than a promise.

Common mistakes to avoid

  • Mixing units or entering a rate as a decimal when the field requests a percentage.
  • Rounding intermediate values instead of the final displayed result.
  • Leaving out a cost, timing rule or local requirement listed in the assumptions below.

Practical uses

Use the coordinate geometry calculator to check a real scenario, compare a changed assumption and explain the arithmetic before relying on a quote, specification or decision.

Worked example

From (1,2) to (4,6), Δx=3 and Δy=4, so the distance is 5, the midpoint is (2.5,4), the slope is 4/3 and the direction is approximately 53.13°.

Assumptions and limitations

  • coordinates describe points in a two-dimensional Euclidean Cartesian plane
  • both axes use the same scale when interpreting geometric distance and direction
  • direction is measured counter-clockwise from the positive x-axis
  • vertical lines have undefined slope
  • coincident points have no unique slope or direction
  • displayed decimals are rounded only after calculation

Important notes

Results are estimates based on the values entered. Confirm rates, prices, units and professional requirements that apply in your location. Review the Answer Atlas Calculation Standard and corrections policy for formula, privacy and correction rules.

Frequently asked questions

Why is the slope undefined for a vertical line?

A vertical line has Δx=0, so the slope expression Δy/Δx would divide by zero. The calculator reports the line as vertical instead of returning a misleading number.

What happens when both points are the same?

Distance and displacement are zero and the midpoint is that point, but infinitely many lines pass through one point, so slope and direction are not uniquely defined.

Can I use negative and decimal coordinates?

Yes. Finite negative, zero and decimal coordinates are supported within the stated magnitude bound.

Related tools