Ctrl K
Percentage
Arithmetic & Algebra
Fraction
Arithmetic & Algebra
Ratio
Arithmetic & Algebra
Average
Arithmetic & Algebra
Exponent & Root
Arithmetic & Algebra
Square Root & N-th Root
Arithmetic & Algebra
Linear Equation
Arithmetic & Algebra
Area & Perimeter
Geometry
Pythagorean Theorem
Geometry
Triangle Solver
Geometry
Circle Calculator
Geometry
Distance & Midpoint
Geometry
Prime Number
Number Theory
Factorial
Number Theory
GCD / HCF
Number Theory
LCM
Number Theory
Random Number
Number Theory
Number Base
Number Theory
Complex Numbers
Engineering Math
Vector Math
Engineering Math
Matrix Calculator
Engineering Math
Laplace Transform
Engineering Math
Scientific
Advanced
Logarithm
Advanced
Limit Calculator
Advanced
Percentile Calculator
Advanced
Differential Equation Solver
Advanced
Unit Converter
Utilities
Data Storage
Utilities
Speed Converter
Utilities
Fuel Efficiency
Utilities
Compound Interest
Utilities
Password Generator
Utilities
Function Transformations
Graphing
No tools found.
Distance & Midpoint calculator →
Distance & Midpoint guide
The Distance & Midpoint Calculator finds the straight-line distance, the exact halfway point, and the slope between any two coordinates (x₁, y₁) and (x₂, y₂) on a Cartesian plane.
Worked examples
Find the distance between two points
- Enter Point 1: X₁ = 0, Y₁ = 0.
- Enter Point 2: X₂ = 3, Y₂ = 4.
- Click Save to History to calculate.
Result: Distance = 5
Using the distance formula: √((3-0)² + (4-0)²) = √(9 + 16) = √25 = 5.
Find the midpoint between two points
- Enter Point 1: X₁ = -5, Y₁ = -2.
- Enter Point 2: X₂ = 4, Y₂ = 3.
- Review the Midpoint result.
Result: Midpoint = (-0.5, 0.5)
The midpoint is the average of the x’s and the y’s: ((-5+4)/2, (-2+3)/2) = (-0.5, 0.5).
Find the slope of a vertical line
- Enter Point 1: X₁ = 3, Y₁ = 0.
- Enter Point 2: X₂ = 3, Y₂ = 5.
- Review the Slope result.
Result: Slope = Undefined
The change in X is 0. Since slope = rise/run, and you cannot divide by zero, the slope of a vertical line is undefined.
Tips
- •The distance formula is derived from the Pythagorean theorem.
- •A horizontal line has a slope of 0. A vertical line has an undefined slope.
- •The midpoint is always exactly halfway along the straight line connecting the two points.
Frequently asked questions
What is the distance formula?
d = √((x₂ - x₁)² + (y₂ - y₁)²). It calculates the length of the straight line connecting two coordinates.
What is the midpoint formula?
M = ((x₁ + x₂)/2, (y₁ + y₂)/2). It finds the exact center point between two coordinates by averaging them.
What is the slope formula?
m = (y₂ - y₁) / (x₂ - x₁). It measures the steepness and direction of a line (rise over run).
Why is the slope of a vertical line undefined?
Because the formula divides by the change in X (run). For a vertical line, the run is 0, and division by zero is mathematically undefined.
What does a negative slope mean?
It means the line goes downwards from left to right (as X increases, Y decreases).
What does a zero slope mean?
It means the line is perfectly horizontal (the Y value does not change).
How is the distance formula related to the Pythagorean theorem?
If you draw a right triangle between the two points, the change in X and change in Y are the legs, and the distance is the hypotenuse (a² + b² = c²).
Can the distance be negative?
No. Distance is a physical length, so it is always positive or zero.
What is the distance between a point and itself?
It is 0, because there is no space between the identical coordinates.
Does this tool work in 3D?
No, this tool is for 2D coordinates. In 3D, you would add a (z₂ - z₁)² term to the distance formula.
What are the quadrants in a coordinate plane?
The plane is divided into four quadrants. Quadrant I is (+, +), II is (-, +), III is (-, -), and IV is (+, -).
Can I use decimals for the coordinates?
Yes, the calculator handles decimals perfectly.
What does the graph show?
The graph plots the two points, draws the connecting line, marks the midpoint, and shows the Δx/Δy right triangle used to find the distance.
What is the angle from the x-axis?
It is the angle of the line relative to a horizontal line, calculated using atan2(Δy, Δx).
How is midpoint used in real life?
It is used to find the center of a map area, split a road trip into two equal halves, or find the center of a line segment in CAD design.
Can the slope be a fraction?
Yes. If you enter (0,0) and (2,1), the slope is 1/2 or 0.5.
What is a collinear point?
Points that lie on the same straight line. They will share the same slope between any pairs.
Are the results rounded?
Yes, distance and midpoint coordinates are rounded to 4 decimal places for readability.