Magnetic Declination (WMM2025)
Local magnetic declination, inclination, field intensity, and annual change from latitude, longitude, date.
Example
You enter
- Latitude (deg, -90 to 90) 39.7392
- Longitude (deg, -180 to 180) -104.99
- Altitude (km above WGS84 ellipsoid, optional) 0
- Date (YYYY-MM-DD) 2026-01-01
You get
- Declination (deg) 7.56
- Inclination (deg) 65.88
- Total intensity (nT) 51095
- Annual change (deg/yr) -0.08
Checked against published worked examples from: NOAA NCEI.
Details, formula, and sources
ScopeLocal magnetic declination, inclination, field intensity, and annual change from latitude, longitude, date, and (optional) altitude. NOAA NCEI World Magnetic Model 2025; valid 2025-2030. Bearing-correction helper built in.
Formula or tableSpherical-harmonic expansion of the geomagnetic potential V = a Σ_{n=1..12} (a/r)^{n+1} Σ_{m=0..n} [g_n^m cos(m λ) + h_n^m sin(m λ)] P_n^m(sin φ'); B = -∇V. WMM2025 coefficients g, h, dg/dt, dh/dt to degree 12 are bundled at data/field/wmm/coefficients.json (verbatim from NCEI WMM2025.COF). Geodetic latitude is converted to geocentric on the WGS84 ellipsoid; geocentric field components are rotated back to geodetic.
Source and editionNOAA NCEI World Magnetic Model 2025 (WMM2025) by name. Reference radius a = 6371.2 km; WGS84 ellipsoid (a = 6378.137 km, b = 6356.7523142 km).
Free accessWMM 2025 coefficients, technical report, and test-value table free at ncei.noaa.gov/products/world-magnetic-model. Coefficients are public domain (NCEI / NGA).
What governsGeometry is not forecasting. Avalanche advisory and incident commander govern.
API field nameslat_deg, lon_deg, alt_km, date, declination_deg, inclination_deg, total_intensity_nT, annual_change_deg_yr
- Reference radius 6371.2 kmNCEI WMM Tech Report
- Maximum degree 12WMM2025 standard
- Local field perturbations Solar storms, geological anomalies, and nearby ferrous gear can shift the local field by several degrees beyond the model.NCEI WMM user notes