DMS to Decimal Lat/Lng Converter

Convert degrees, minutes, seconds coordinates to decimal form

Convert DMS (degrees, minutes, seconds) coordinates with N/S/E/W hemisphere letters into signed decimal latitude and longitude. Enter each component and get the precise decimal degrees used by mapping APIs, GPS and databases. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the formula for DMS to decimal degrees?

Decimal = degrees + minutes / 60 + seconds / 3600. The result is then made negative if the hemisphere is south (S) or west (W).

This tool converts DMS coordinates — degrees, minutes and seconds with a hemisphere letter — into signed decimal latitude and longitude, the format expected by Google Maps, Leaflet, PostGIS and almost every mapping API. Enter 51°30'26.5" N, 0°7'39.9" W and get back 51.507361, -0.127750.

Where DMS coordinates come from

DMS is the traditional format used in nautical charts, aviation publications, land surveys, topographic maps, and many GPS device displays. You will encounter it when:

  • Reading coordinates off a printed chart or OS map
  • Extracting position data from older GPS receivers that display in DMS by default
  • Working with geotagged survey data exported from GIS software
  • Looking up a historical location that was recorded before decimal degrees became the computing standard
  • Handling data from governments or institutions that still publish in DMS (many land title registries and survey standards use it)

Modern web mapping APIs (Google Maps JavaScript API, Mapbox, Leaflet, PostGIS ST_GeomFromText) all expect decimal degrees. Passing DMS directly — without conversion — produces incorrect or rejected results.

How it works

Each coordinate is rebuilt from its three sexagesimal parts:

decimal = degrees + (minutes / 60) + (seconds / 3600)

There are 60 minutes in a degree and 3600 seconds in a degree, so dividing by 60 and 3600 brings the smaller units back to fractions of a degree. The hemisphere letter then sets the sign: N and E stay positive, while S and W flip the value negative.

Worked examples

Example 1 — London (Big Ben): Input: 51°30'2.52" N, 0°7'27.84" W Calculation: lat = 51 + 30/60 + 2.52/3600 = 51.500700, lng = -(0 + 7/60 + 27.84/3600) = -0.124400

Example 2 — Sydney Opera House: Input: 33°51'24.36" S, 151°12'54.36" E Calculation: lat = -(33 + 51/60 + 24.36/3600) = -33.856767, lng = 151 + 12/60 + 54.36/3600 = 151.215100

Example 3 — boundary check: If someone gives you minutes of 60 or seconds of 60, those are invalid — 60 minutes is exactly one degree, and 60 seconds is exactly one minute. The values must each stay strictly below 60. Carry excess values up to the next unit before converting.

Precision guide

Decimal degrees beyond 4–5 places distinguish very small distances:

Decimal placesResolution (approx.)
1~11 km
2~1.1 km
3~111 m
4~11 m
5~1.1 m
6~11 cm

Six decimal places is more than sufficient for any consumer mapping application. If your DMS source only gives whole seconds, the output is accurate to only about 30 metres; sub-second decimal seconds improve this.

Tips and notes

  • Keep minutes and seconds below 60 — they behave like a clock.
  • If a source gives you 90 seconds, that is one minute and 30 seconds: carry the minute before converting.
  • Both latitude and longitude must be entered for a complete coordinate pair.
  • The conversion is pure arithmetic and runs entirely in your browser; nothing is sent anywhere.
  • To reverse the process (decimal back to DMS), use the companion Lat/Lng to DMS converter.