Distância Haversine
- Created by
- Renato Passos, Eng. de Software
- Reviewed by
- Renato Passos, Eng. de Software
Last updated: Apr 18, 2026
About this calculator
The Haversine Distance Calculator computes the distance in kilometers between two geographic coordinates (latitude and longitude). It is particularly useful for calculating distances on spherical surfaces like Earth with greater accuracy than simplified methods. The formula accounts for the Earth's curvature and converts coordinates to radians for trigonometric calculations.
It works using the Haversine formula, derived from circle arc calculations. First, it subtracts the origin and destination coordinates to determine angular differences. Then, trigonometric functions (sine, cosine) calculate the corresponding arc. The result is converted to kilometers using Earth's mean radius.
Use this tool to calculate distances between cities, plan travel routes, analyze geographic data, or validate GPS locations. It is ideal for short to medium distances but may show minor inaccuracies at polar extremes or on rugged terrain.
Cautions: The formula assumes Earth is a perfect sphere, which it isn't. For high precision, use ellipsoidal models (like WGS84). Ensure coordinates are in decimal degrees format: latitude ranges -90 to +90°, longitude -180 to +180°.
Frequently asked questions
Why use the Haversine formula?
It provides higher accuracy for distances on spherical surfaces like Earth compared to linear or planar methods.
What units are used?
Coordinates must be in decimal degrees (e.g., -23.5505° for São Paulo's latitude). Output is in kilometers.
Is the calculator accurate everywhere?
Accuracy is high for medium distances but may vary in polar regions or rugged terrain due to Earth's simplification as a sphere.
How to convert degrees-minutes-seconds to decimals?
Use: decimal degrees = degrees + (minutes/60) + (seconds/3600). Ex: 45°30'15"N = 45 + 30/60 + 15/3600 = 45.50417°.
Can I get distances in other units?
The calculator outputs kilometers, but you can manually convert to miles (1 km ≈ 0.621371 mi) or meters (1 km = 1000 m).