# RavingDesk Geodesic Distance & Bearing Calculator > Exact distance, bearings and midpoint between coordinates or along a route on WGS84. Measures the shortest path between two or more points on the WGS84 ellipsoid with Karney’s geodesic algorithm (nanometre accuracy, also for nearly antipodal points where Vincenty’s method fails): leg distances, initial and final bearings, midpoints, the total route length and how far the spherical Haversine formula is off. Coordinates can be written in decimal degrees, DMS, UTM, MGRS, plus codes or Maidenhead. It is the distance engine of RavingDesk’s Data & charts geo layer. Part of usefulweb.app (https://usefulweb.app/). Part of [RavingDesk](https://ravingdesk.usefulweb.app/) (ownerApp: ravingdesk). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://ravingdeskgeodesicdistance.usefulweb.app/ (interactive tool at https://ravingdeskgeodesicdistance.usefulweb.app/tool) - JSON API: POST https://ravingdeskgeodesicdistance.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://ravingdeskgeodesicdistance.usefulweb.app/api/v1/tool) - OpenAPI: https://ravingdeskgeodesicdistance.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://ravingdeskgeodesicdistance.usefulweb.app/mcp - tool `ravingdesk_geodesic_distance` ## Inputs - points (table): Points in order - One point per row, e.g. 52.5163, 13.3777 · 52°31′N 13°24′E · 33U 391779 5820072 · 33UUU9177920072 · 9F4MGCC4+22. - closeLoop (boolean): Return to the first point (closed loop) - ellipsoid (select): Ellipsoid ## Method - Each leg solves the inverse geodesic problem on the chosen ellipsoid with Karney’s algorithm (6th-order series in the third flattening, Newton iteration on the azimuth, astroid start for nearly antipodal points). Accuracy is about 15 nanometres on WGS84. - The initial bearing is the azimuth at the start of the leg; the final bearing is the forward azimuth on arrival. Both are measured clockwise from true north (not magnetic north). The midpoint lies half the leg distance along the geodesic. - For comparison every leg is also computed with the Haversine formula on a sphere of radius 6,371,008.8 m (IUGG mean radius). The difference is typically up to about 0.5 % and depends on direction and latitude. - Coordinates may be decimal degrees, DMS or DDM with N/S/E/W, UTM/UPS, MGRS, plus codes or Maidenhead locators. MGRS, plus codes and locators stand for a square; the centre of the square is used. - Heights are ignored: distances are measured on the ellipsoid surface, not along the terrain.