geoprimsField-grade geospatial math

British National Grid reference to latitude and longitude

Reads a National Grid reference like TQ 30 80 and gives the square it names: its south-west corner, its center, its size, and the latitude and longitude of that center.

Experimental: not yet fully verified. How results are checked

51.508369°

That reference names a 1,000 m square centered on 51.508369°, -0.1209693°.

  • Without the OSTN15 grid this uses Ordnance Survey's published seven-parameter transformation, which they state as about 2 m, not the centimetres OSTN15 gives.
Longitude of the center
Easting of the south-west corner
Northing of the south-west corner
Square the reference names
100 km square
South edge
Provenance
Computed by
geodesy.grid-ref.bng-inverse 1.0.0, core 0.1.0
Model
The two letters give the 100 km square, the figures the offset inside it, truncated, so a reference names a square rather than a point: its south-west corner, and its center half a square further. The center is unprojected from the National Grid transverse Mercator onto OSGB36, and carried to WGS 84 by Ordnance Survey's published seven-parameter transformation (EPSG 1314) when WGS 84 is asked for
Accuracy
The square's corner and size are exact. The latitude and longitude on OSGB36 are exact to the series' nanometre; on WGS 84 the seven-parameter transformation is about 2 m, which is what Ordnance Survey states for it
Notes
2 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 1
Run many at once from a CSV

Loading…

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

Model: The two letters give the 100 km square, the figures the offset inside it, truncated, so a reference names a square rather than a point: its south-west corner, and its center half a square further. The center is unprojected from the National Grid transverse Mercator onto OSGB36, and carried to WGS 84 by Ordnance Survey's published seven-parameter transformation (EPSG 1314) when WGS 84 is asked for

Show your work

  1. The square

    two letters for the 100 km square, then the figures inside it

    TQ 30 80 = E 530000 m, N 180000 m, 1000 m square

  2. Its center

    half a square further east and north

    E 530500.0 m, N 180500.0 m = 51.508369°

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

Accuracy: The square's corner and size are exact. The latitude and longitude on OSGB36 are exact to the series' nanometre; on WGS 84 the seven-parameter transformation is about 2 m, which is what Ordnance Survey states for it

When to use this: Use this to read a British grid reference off a map, a notice, or a rescue call and find where it is. It answers with the square the reference actually names, not a false point: two figures name a 10 km square, six a 100 m square, ten a metre, and the result gives the size as well as the corner and the center.

Limitations: A reference names a square, and the latitude and longitude given are its center, so a two-figure reference is good to 5 km by construction. On WGS 84 the answer runs through the seven-parameter transformation, about 2 m, not the OSTN15 grid. The National Grid covers Great Britain; Ireland and Northern Ireland use the Irish Grid, which is a different system and is not read here. Heights are untouched.

Worked example: TQ 30 80, the convention's own example. Source: A Guide to Coordinate Systems in Great Britain v3.6 §7.1: the two letters give the 100 km square and the figures the offset inside it, so TQ 30 80 is the 1 km square whose south-west corner is E 530000 N 180000.

You enter

Datum of the latitude and longitude
WGS84
National Grid reference
TQ 30 80

You get

Latitude of the center
51.508369°
Longitude of the center
-0.1209693°
Easting of the south-west corner
530,000 m
Northing of the south-west corner
180,000 m
Square the reference names
1,000 m
100 km square
TQ
South edge
51.50376014°
West edge
-0.12835394°
North edge
51.512977477°
East edge
-0.113583165°
How the datum was handled
Without the OSTN15 grid this uses Ordnance Survey's published seven-parameter transformation, which they state as about 2 m, not the centimetres OSTN15 gives.

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: 10 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.