Loading...
Calculate distance between 2D, 3D coordinates & geographic locations instantly. Get Euclidean distance, Haversine distance with step-by-step solutions & midpoint calculations.
Calculate distance between points in 2D, 3D space or geographic coordinates
The distance formula calculates the straight-line distance between two points in space. It's derived from the Pythagorean theorem and is fundamental in coordinate geometry.
2D Distance Formula:
d = ā[(xā-xā)² + (yā-yā)²]
3D Distance Formula:
d = ā[(xā-xā)² + (yā-yā)² + (zā-zā)²]
Haversine Formula (Geographic):
Used for calculating great-circle distances between latitude/longitude coordinates on Earth's surface, accounting for spherical geometry.
š” Tip: For geographic coordinates, use decimal degrees format (e.g., 40.7128, -74.0060 for New York City).
The straight-line distance between two points in 2D or 3D space. Most commonly used in mathematics, physics, and computer graphics for precise geometric calculations.
d = ā(Īx² + Īy² + Īz²)
Calculates the great-circle distance between two points on Earth's surface using latitude and longitude. Essential for navigation and geographic applications.
Accounts for Earth's curvature, accurate within 0.5% for most distances
Sum of absolute differences of coordinates. Represents distance traveled along grid-like paths, useful in urban planning and pathfinding algorithms.
d = |xā-xā| + |yā-yā|
Calculate distances between cities, plan optimal routes, and estimate travel distances for logistics and transportation.
Calculate distances between game objects, implement collision detection systems, and create AI pathfinding algorithms.
Clustering algorithms, similarity measures, k-nearest neighbors, and various machine learning applications.
CAD design, structural analysis, spatial planning calculations, and architectural measurements.
For 2D points, use the Euclidean distance formula: d = ā[(xā-xā)² + (yā-yā)²]. For 3D points, extend the formula by adding (zā-zā)² under the square root. For geographic coordinates (latitude/longitude), use the Haversine formula which accounts for Earth's curvature to provide accurate great-circle distances.
The distance formula in coordinate geometry is d = ā[(xā-xā)² + (yā-yā)²] for 2D space. This formula is derived from the Pythagorean theorem and calculates the straight-line (Euclidean) distance between two points in a coordinate plane.
To find the distance between two cities, use the Haversine formula with their latitude and longitude coordinates. This formula accounts for Earth's spherical shape and calculates the great-circle distance, which is the shortest path between two points on a sphere's surface.
The 3D distance formula is d = ā[(xā-xā)² + (yā-yā)² + (zā-zā)²]. It extends the 2D Euclidean distance formula by including the z-coordinate difference, allowing you to calculate distances in three-dimensional space.
The Haversine formula provides accuracy within 0.5% for most distances on Earth. It treats Earth as a perfect sphere with a radius of approximately 6,371 kilometers, which is sufficiently accurate for most navigation and geographic distance calculations.