geoprimsField-grade geospatial math

Latitude and longitude to MGRS

Encodes a WGS 84 latitude and longitude as an grid reference at any precision, truncating (never rounding) as the standard requires.

Go the other way: MGRS to latitude and longitude →

17TNE8630977770

The MGRS reference is 17T NE 86309 77770, a 1 m square.

Square outline
LatitudeLongitude
40.4461072 deg-79.9822333 deg
40.4461072 deg-79.9822303 deg
40.4461072 deg-79.9822274 deg
40.4461072 deg-79.9822244 deg
40.4461071 deg-79.9822215 deg
40.4461094 deg-79.9822215 deg
40.4461116 deg-79.9822214 deg
40.4461139 deg-79.9822214 deg
40.4461162 deg-79.9822214 deg
40.4461162 deg-79.9822243 deg
40.4461162 deg-79.9822273 deg
40.4461162 deg-79.9822302 deg
40.4461163 deg-79.9822332 deg
40.4461140 deg-79.9822332 deg
40.4461117 deg-79.9822332 deg
40.4461095 deg-79.9822333 deg
MGRS (spaced)
Square size
Provenance
Computed by
geodesy.grid-ref.mgrs-forward 1.3.0, core 0.1.0
Model
NGA MGRS over UTM and UPS: AA lettering, or AL on the legacy Clarke 1866 and Bessel 1841 ellipsoids
Accuracy
Exact; the reference names the square containing the point (truncation)
Notes
None
Cites
National Geospatial-Intelligence Agency, Military Grid Reference System, NGA.STND.0037; Karney, C. F. F., GeographicLib, GeographicLib MGRS and UTMUPS classes

Something look off?

Your values

Showing an example. Change anything.
More options 2
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: NGA MGRS over UTM and UPS: AA lettering, or AL on the legacy Clarke 1866 and Bessel 1841 ellipsoids

Show your work

  1. Grid position

    the UTM or UPS zone, easting, and northing the point falls at

    40.446111°, -79.982222° = zone 17, 586,310 m E, 4,477,770 m N

  2. Square

    how much of the easting and northing the chosen precision keeps

    precision 5 = 1 m across

  3. Reference

    zone, band, 100 km square, then the kept digits

    zone 17 at precision 5 = 17TNE8630977770

The same steps an agent gets from the MCP server with explain: true.

Accuracy: Exact; the reference names the square containing the point (truncation)

When to use this: Use this when a position has to be written the way military and emergency services read it: an MGRS reference at the precision you choose, from a 100 km square down to a meter. It is the form used on ground operations, in search and rescue, and on maps that carry the grid.

Limitations: The reference names the square that contains the point, because MGRS truncates rather than rounds: a ten-digit reference is a one-meter square whose south-west corner is the position given, and a shorter one names a larger square. It is defined on UTM and UPS, so it carries their zone structure, and the coordinates here are WGS 84.

Worked example: Pittsburgh at 1 m. Source: add-geodesy-suite scenario: 17TNE8630977770. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

Latitude
40.446111 deg
Longitude
-79.982222 deg

You get

MGRS
17TNE8630977770
MGRS (spaced)
17T NE 86309 77770
Square size
1 m

Review: Not yet independently reviewed by a geodesist.

Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.3.0, core 0.1.0. See this tool in the verification report.

Changes

Checked against: 32 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Constants this tool assumes

Values you do not enter, and where each comes from.

UTM scale factor on the central meridian k0
0.9996 — NGA.SIG.0012 UTM and UPS
UTM false easting
500000 m — NGA.SIG.0012 UTM and UPS
UTM false northing in the southern hemisphere
10000000 m — NGA.SIG.0012 UTM and UPS
UPS scale factor at the pole k0
0.994 — NGA.SIG.0012 UTM and UPS
UPS false easting and northing
2000000 m — NGA.SIG.0012 UTM and UPS

Sources

Terms

MGRS: Military Grid Reference System
UTM and UPS coordinates written as a zone, a latitude band, a two-letter 100 km square, and digits, like 17T NE 86309 77770. Source: NGA.STND.0037 MGRS

MGRS — Military Grid Reference System

UTM and UPS coordinates written as a zone, a latitude band, a two-letter 100 km square, and digits, like 17T NE 86309 77770.

Source: NGA.STND.0037 MGRS