geoprimsField-grade geospatial math

MGRS to latitude and longitude

Decodes an or USNG grid reference to the south-west corner and center of the square it names, with the square's size.

Go the other way: Latitude and longitude to MGRS →

40.4461117°

The center of this 1 m square is 40.4461117°, -79.9822273°.

Center longitude
South-west corner latitude
South-west corner longitude
Square size
Provenance
Computed by
geodesy.grid-ref.mgrs-inverse 1.0.0, core 0.1.0
Model
NGA MGRS (AA lettering) over UTM and UPS on WGS 84
Accuracy
Exact; the true point is anywhere in the square
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.
Run many at once from a CSV

Loading…

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

Model: NGA MGRS (AA lettering) over UTM and UPS on WGS 84

Show your work

  1. Square the reference names

    the digits give a square, not a point: half as many digits, ten times the square

    17TNE8630977770 = 1 m across

  2. Its south-west corner

    the grid easting and northing the reference resolves to

    zone 17, 586,309 m E, 4,477,770 m N = 40.446107°, -79.982233°

  3. Centre of the square

    the middle of it, which is the position to use

    0.5 m from the corner = 40.4461117°

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

Accuracy: Exact; the true point is anywhere in the square

When to use this: Use this when an MGRS or USNG reference arrives by radio, from a report, or off a map and you need to plot it: it returns the south-west corner and the center of the square it names, with the square's size so the precision is explicit. It is also how to check the precision of a reference you were given: the square's size is reported, so an eight-digit reference is visibly a ten-meter square rather than a point.

Limitations: The reference is a square and the true point is anywhere within it: at six digits that is a hundred-meter square, at four a kilometer. The center is offered for plotting, not as the reported position. A reference without its grid zone is ambiguous over long distances, and this reports what it assumed. Polar references use UPS rather than UTM and follow different lettering, which this handles but which is worth knowing when a reference looks unusual.

Worked example: Decode a 1 m reference. Source: add-geodesy-suite scenario: 1 m square, center offset 0.5 m. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

MGRS reference
17TNE8630977770

You get

Center latitude
40.4461117°
Center longitude
-79.9822273°
South-west corner latitude
40.4461072°
South-west corner longitude
-79.9822333°
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.0.0, core 0.1.0. See this tool in the verification report.

Changes

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

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