How this calculator works
WMM2025 represents the main geomagnetic field with degree-12 spherical harmonics and linearly changing Gauss coefficients. This implementation converts WGS84 geodetic coordinates to geocentric coordinates, evaluates the magnetic potential gradient and rotates the result back to north, east and down. Coefficients are from NOAA/BGS, epoch 2025.0. The valid dates are 2025-01-01 through 2029-12-31 and the height range is -1 to 850 km above the ellipsoid. It is a model estimate rather than a local compass survey.
Formula
V = a sum_n=1..12 (a/r)^(n+1) sum_m=0..n [g_nm(t) cos(m longitude) + h_nm(t) sin(m longitude)] P_nm(cos(theta)); B = -gradient(V). D = atan2(Y,X), I = atan2(Z,H), H = sqrt(X²+Y²).
Worked example
NOAA test values for 2025-01-01 at 80°N, 0°E and ellipsoid height 0 km give X = 6521.6 nT, Y = 145.9 nT and Z = 54791.5 nT, with declination about 1.28° east. At 0°N, 120°E the model gives about 0.16° west.
Advertisement
Frequently asked questions
Is positive declination east or west?
East is positive. To express a magnetic heading as a true heading, add east declination using consistent angular conventions.
Can I use GPS elevation directly?
Only if it is height above the WGS84 ellipsoid. Mean-sea-level height requires a geoid correction first.
Why can my compass disagree?
WMM describes the large-scale main field. Nearby metal, crustal anomalies, magnetic storms and weak horizontal fields can cause substantial differences.