Magnetic Declination (WMM2025)
Local magnetic declination, inclination, field intensity, and annual change from latitude, longitude, date.
Example
You enter
- Lat (deg) 39.7392
- Lon (deg) -104.99
- Alt (km) 0
- Date 2026-01-01
You get
- Declination (deg) 7.56
- Inclination (deg) 65.88
- Total intensity (nT) 51095
- Annual change (deg/yr) -0.08
Details, formula, and sources
Local 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.
Spherical-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.
NOAA NCEI World Magnetic Model 2025 (WMM2025) by name. Reference radius a = 6371.2 km; WGS84 ellipsoid (a = 6378.137 km, b = 6356.7523142 km).
WMM 2025 coefficients, technical report, and test-value table free at ncei.noaa.gov/products/world-magnetic-model. Coefficients are public domain (NCEI / NGA).
Geometry is not forecasting. Avalanche advisory and incident commander govern.
Field names used by the API: lat_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