ECEF X/Y/Z to Lat/Long/Height Converter
Converts ECEF geocentric XYZ coordinates to geodetic latitude, longitude and height by iterating the latitude to a 1e-14 rad tolerance, with exact handling of the poles.
Inputs
Earth-centred X, Y, Z → geodetic latitude, longitude and ellipsoidal height, with the pole and the centre handled explicitly.
Enter the values and press Calculate.
Or load an example to see a worked result.
Batch from CSV
One row per calculation, with a header row. Values use the units currently selected in the form above. Up to 10,000 rows; nothing is uploaded.
How the method works
A fixed worked example to explain the method — it is not your result.
Before you rely on this: First-pass guide only. Verify safety-critical or regulated work against the relevant standards, your project requirements and a qualified professional.
How to use this calculator
- Enter X, Y and Z in metres.
- Choose the ellipsoid the coordinates were computed on (WGS84 unless you know otherwise).
- Press Calculate. Read latitude, longitude and ellipsoidal height, plus the round-trip residual and the number of iterations.
How it works
Longitude is atan2(Y, X).
Latitude is iterated as φ = atan2(Z + e²N sin φ, p), with p = √(X² + Y²), starting from Bowring's estimate. It stops when the change is below 1×10⁻¹⁴ rad, or reports an error after 50 iterations; it never returns an unconverged guess.
Height is p / cos φ − N, or Z / sin φ − N(1 − e²) above 45° latitude, whichever is better conditioned.
On the polar axis (X = Y = 0) the answer is exact: latitude ±90°, h = |Z| − b, and the longitude is undefined. The Earth's centre has no geographic position and is refused.
Worked example
X −2,362,768.761, Y 4,874,588.155, Z −3,355,754.763 m. Returns −31.95°, 115.86° and an ellipsoidal height of 50.000 m on WGS84 — the Perth example from the forward converter, recovered.
Common mistakes
- Reading the height as sea level or AHD. It is the height above the ellipsoid; subtract the geoid separation to get an orthometric height.
- Assuming a datum from the size of the numbers. XYZ do not say which realisation or epoch they belong to.
- Expecting a longitude at the pole. Every meridian meets there, so it is reported as undefined.
Frequently asked questions
Is the height ellipsoidal or above sea level?
Ellipsoidal (above the chosen ellipsoid). Use the orthometric-height converter to get height above mean sea level.
Why not use Bowring's formula on its own?
One pass of Bowring is sub-millimetre on the ground but drifts with height: measured against an independent engine it was 2.4 cm out in low orbit and 25 cm at GNSS altitude. Iterating to a stated tolerance removes that error everywhere.
Related tools
- Lat/Long/Height to ECEF Converter
- Ellipsoidal to Orthometric Height Converter
- Lat/Long to UTM Converter (WGS84)
- UTM to Lat/Long Converter
- Vincenty Ellipsoidal Distance Calculator
- Geocentric vs Geodetic Latitude Converter
Explore more in Surveying, Coordinates, GIS & CAD.
Cite this tool
Zerdly. (2026). ECEF X/Y/Z to Lat/Long/Height Converter. Retrieved from https://www.zerdly.com/tools/ecef-x-y-z-to-lat-long-height-converter/
Tip: Enter any known values to calculate the remaining results.
Designed to run locally in your browser. Tool inputs are not intentionally stored by Zerdly unless stated otherwise.



