EPSG guidance note #7-2, http://www.epsg.org
For earlier EGM84 and EGM96 models see Geographic3D to GravityRelatedHeight (EGM), method code 9661.
This transformation involves the application of a geoid-ellipsoid separation value interpolated from a geoid model. The model provides separation values at the nodes on a regular grid of latitude and longitude intersection points. The geodetic latitude and longitude used to interpolate within the grid are not affected by this transformation. The grid is referenced to a specific geographic CRS (the horizontal component of the source CRS) and interpolation must be made in the latitude and longitude of this system. Calculation of the separation is achieved through a bi-linear interpolation of the grid, using the latitude and longitude of the point. This step provides the geoid-ellipsoid separation (N) above the ellipsoid of the source Geographic 3D CRS. Then: H = h - N where h = the height above the ellipsoid in the source geographic 3D CRS and H = the gravity-related height in the target vertical CRS.