geoprimsField-grade geospatial math

Latitude and longitude to a British National Grid reference

Turns a position into its National Grid reference, like TQ 30624 78388, with the easting and northing behind it and the square it names.

Experimental: not yet fully verified. How results are checked

TG 51409 13177

That point is TG 51409 13177.

100 km square
Easting
Northing
Square the reference names
South edge
West edge
Provenance
Computed by
geodesy.grid-ref.bng-forward 1.0.0, core 0.1.0
Model
Latitude and longitude on WGS 84 carried to OSGB36 by Ordnance Survey's published seven-parameter transformation (EPSG 1314, position-vector), projected on the National Grid transverse Mercator (Airy 1830, true origin 49°N 2°W, scale 0.9996012717, false origin 400 km west and 100 km north), then lettered: the grid's 100 km squares carry a two-letter code with I left out, and the figures are truncated, never rounded
Accuracy
The projection is exact to the series' nanometre; from WGS 84 the seven-parameter transformation is about 2 m, which is what Ordnance Survey states for it, so a ten-figure reference is more precise than it is accurate
Notes
1 shown with the answer
Cites
Ordnance Survey, A Guide to Coordinate Systems in Great Britain

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: Latitude and longitude on WGS 84 carried to OSGB36 by Ordnance Survey's published seven-parameter transformation (EPSG 1314, position-vector), projected on the National Grid transverse Mercator (Airy 1830, true origin 49°N 2°W, scale 0.9996012717, false origin 400 km west and 100 km north), then lettered: the grid's 100 km squares carry a two-letter code with I left out, and the figures are truncated, never rounded

Show your work

  1. Onto OSGB36

    the coordinates are already on OSGB36

    52.6575703°, 1.7179216° = 52.6575703°, 1.7179216°

  2. On the National Grid

    transverse Mercator, Airy 1830, true origin 49°N 2°W

    52.6575703°, 1.7179216° = E 651409.903 m, N 313177.270 m

  3. Lettered

    the 100 km square's code, then the figures, truncated

    E 651410, N 313177 = TG 51409 13177

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

Accuracy: The projection is exact to the series' nanometre; from WGS 84 the seven-parameter transformation is about 2 m, which is what Ordnance Survey states for it, so a ten-figure reference is more precise than it is accurate

When to use this: Use this to turn a phone's or a chart's latitude and longitude into the grid reference a British map, a rights-of-way notice, or a rescue report is written in. Pick how many figures you need: two for a 10 km square, six for a 100 m square, ten for a metre. Give the datum your coordinates are on, WGS 84 or OSGB36 itself.

Limitations: This is the seven-parameter path, about 2 m, not the OSTN15 grid that Ordnance Survey publishes for centimetre work; a ten-figure reference is therefore more precise than it is accurate. The National Grid covers Great Britain and its near waters: outside the lettered area, 0 to 700 km east and 0 to 1,300 km north of the false origin, there is no reference to give. Ireland and Northern Ireland use the Irish Grid, which is a different system. Heights are untouched.

Worked example: The Ordnance Survey guide's own worked example, on OSGB36. Source: A Guide to Coordinate Systems in Great Britain v3.6, Annexe C: 52°39′27.2531″N 1°43′04.5177″E on OSGB36 gives E 651409.903 N 313177.270, which is TG 51409 13177. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

Datum of the latitude and longitude
OSGB36
Figures
10
Latitude
52.657570305 deg
Longitude
1.717921583 deg

You get

National Grid reference
TG 51409 13177
100 km square
TG
Easting
651,409.903 m
Northing
313,177.27 m
Square the reference names
1 m
South edge
52.657567835°
West edge
1.717908055°
North edge
52.657577271°
East edge
1.717923572°
How the datum was handled
The coordinates were taken as OSGB36, so no datum transformation was applied.

Review: Not yet independently reviewed by a geodesist.

Last verified: 2026-11-07, 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: 22 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources

Terms

OSGB36: Ordnance Survey Great Britain 1936
The legacy datum of the British National Grid, on the Airy 1830 ellipsoid. Source: EPSG Geodetic Parameter Dataset
WGS: World Geodetic System
The US Department of Defense global reference frame and ellipsoid that GPS uses; the current version is WGS 84. Source: Department of Defense World Geodetic System 1984

Experimental means this tool has not yet met the stable bar: at least 20 golden vectors, differential tests, and an independent worked example.