How It WorksPublished 8 min read

Converting Latitude and Longitude Between DMS and Decimal: Reading Exif Values and Precision by Digits

The latitude and longitude in a photo's Exif are a series of fractions like "35/1, 40/1, 5245/100" that you can't paste straight into a map. Map apps show "35.681236, 139.767125," guide maps show "35°40'52" N," XMP shows "35,40.8742N": the same place has many notations. This article covers how to convert between degrees-minutes-seconds and decimal, how to read Exif values, the rough precision of each number of decimal places, and common conversion mistakes.

The same place has many latitude and longitude notations

Latitude and longitude express an angle in degrees. Notations differ in whether finer parts than 1 degree are shown as base-60 minutes and seconds, or as a decimal. Using the area around Tokyo Station as an example, the common notations are as follows.

NotationExampleMain uses
Decimal35.681236, 139.767125Google Maps, programs, spreadsheets
Degrees, minutes, seconds35°40'52.45"N 139°46'1.65"EMap labels, car navigation, surveying
DMS (in words)35 degrees 40 minutes 52.45 seconds north, 139 degrees 46 minutes 1.65 seconds eastWritten documents
Degrees and decimal minutes35°40.8742'N 139°46.0275'EGPS receivers, XMP
Exif valuesN: 35/1, 40/1, 5245/100 / E: 139/1, 46/1, 165/100Photo Exif (GPSLatitude, GPSLongitude)

All five point to the same spot. Only the notation differs, and you can convert back and forth between them.

Converting DMS to decimal

1 degree = 60 minutes and 1 minute = 60 seconds, so divide minutes by 60 and seconds by 3,600, and add them to the degrees.

  1. 1

    Set up the formula

    Decimal degrees = degrees + minutes ÷ 60 + seconds ÷ 3,600

  2. 2

    Enter the numbers

    For 35 degrees 40 minutes 52.45 seconds: 35 + 40 ÷ 60 + 52.45 ÷ 3,600 = 35 + 0.666667 + 0.014569 = 35.681236

  3. 3

    Add a minus sign for south and west

    In decimal, north and east are positive, and south and west are negative. Forget the sign for somewhere west like New York, and you'll point to 74 degrees east in Central Asia, near the border between Kyrgyzstan and China.

Converting decimal to DMS

  1. 1

    The whole number part is the degrees

    For 35.681236, it's 35 degrees.

  2. 2

    The whole number part of the decimal × 60 is the minutes

    0.681236 × 60 = 40.87416, so 40 minutes.

  3. 3

    The remaining decimal × 60 is the seconds

    0.87416 × 60 = 52.45, so 52.45 seconds. Together that's 35 degrees 40 minutes 52.45 seconds.

Reading GPSLatitude in Exif

In a photo's Exif, latitude and longitude are each stored as three fractions (rationals) for degrees, minutes and seconds. North or south, and east or west, are in separate fields, GPSLatitudeRef and GPSLongitudeRef, as the single letter N, S, E or W.

FieldExample valueMeaning
GPSLatitudeRefNNorth latitude
GPSLatitude35/1, 40/1, 5245/10035 degrees, 40 minutes, 52.45 seconds
GPSLongitudeRefEEast longitude
GPSLongitude139/1, 46/1, 165/100139 degrees, 46 minutes, 1.65 seconds

Divide the fractions to get degrees, minutes and seconds, then convert to decimal with the formula in the earlier section. Some devices store minutes as a decimal and seconds as 0, as in "35/1, 4087416/100000, 0/1." The same formula works here too, with the same result.

The Photo Exif & Location Checker automatically converts a photo's latitude and longitude to decimal, and gives links to Google Maps, GSI Map (from Japan's Geospatial Information Authority) and OpenStreetMap. In its lat/long conversion tab, you can convert DMS entered by hand, or pasted Exif rationals, into six notations.

Decimal places and rough precision

1 degree of latitude is about 111 km anywhere on Earth. So the number of decimal places gives a guide to how finely a value can pinpoint a location.

Decimal placesExampleApprox. resolution (north-south)
235.68About 1.1 km (a neighborhood)
335.681About 110 m (a city block)
435.6812About 11 m (a building)
535.68124About 1.1 m (a building entrance)
635.681236About 11 cm

In DMS, 1 second is about 31 m and 0.01 seconds is about 30 cm. Smartphone photo Exif often records seconds to around two decimal places, fine enough to identify a building entrance. 1 degree of longitude is about 111 km at the equator and about 91 km near 35° north, getting shorter at higher latitudes.

Four common conversion mistakes

  • Order of latitude and longitude: Google Maps uses latitude, longitude, but some formats such as GeoJSON use longitude, latitude. Near Japan, remembering that around 35 is latitude and around 135 is longitude helps you spot a swap.
  • Signs for south and west: decimal uses a minus sign. Exif keeps the value itself positive and shows the direction with the one letter in Ref, so the sign is easy to forget when converting.
  • Confusing minutes and seconds: a notation separated by periods like "35.40.52" means 35 degrees 40 minutes 52 seconds, not 35.4052 degrees.
  • Different geodetic datums: current maps and GPS use world datums (WGS84, JGD2011). Values in the old Tokyo datum found in older Japanese documents are off by around 400 m near Tokyo.

How to check whether a photo has location data and remove it before publishing is in How to Remove Location Data from Photos, and how to remove only location data while keeping the date and time is in How to Remove Exif Without Quality Loss.

FAQ

What's the formula to convert DMS to decimal?
Decimal degrees = degrees + minutes ÷ 60 + seconds ÷ 3,600. 35 degrees 40 minutes 52.45 seconds becomes 35.681236. For south and west, add a minus sign to the result.
How do I read "35/1, 40/1, 5245/100" in Exif?
It's degrees, minutes and seconds each written as a fraction, meaning 35 degrees 40 minutes 52.45 seconds. North or south is stored as N or S in a separate field, GPSLatitudeRef. In decimal, it's 35.681236.
How many decimal places are enough for latitude and longitude?
North-south, 4 places give about 11 m, 5 places about 1.1 m, and 6 places about 11 cm. To show a building on a map, 5 places are enough. But many digits don't mean GPS measured to that precision.
How do I open a photo's latitude and longitude in Google Maps?
Convert DMS to decimal, and paste it into the Google Maps search box as latitude, longitude separated by a comma, like "35.681236, 139.767125." Put the photo into the Photo Exif & Location Checker and it does this conversion and gives map links automatically.

Tools in this article

Related articles

How It Works7 min read

What Exif Orientation Means: Values 1 to 8 and Why Photos Turn Sideways

You take a portrait photo on your phone, and the moment you put it on your computer or blog it lies on its side. Or you strip the Exif data and the photo falls over. Almost every case comes down to one Exif field: Orientation. This article explains what each Orientation value from 1 to 8 means, why photos are saved sideways in the first place, how to fix a photo that displays sideways, and how to keep just the orientation when you remove Exif.

Read article →
Security7 min read

Can a Cropped Photo Still Show the Original? Checking and Removing Embedded Exif Thumbnails

You cropped out an address at the edge of a photo, or covered a face with a sticker, and posted it feeling safe. Yet sometimes the part you removed can still be found in the file. The culprit is a small preview image stored inside the photo: the embedded Exif thumbnail. This article explains what the thumbnail is, why it can keep the unedited picture, how to tell whether one is left, and how to remove just the thumbnail.

Read article →
Security7 min read

Can a Photo Reveal Your Camera’s Serial Number? Checking and Removing It from Exif

Few people realise that the serial number of their camera can be read from photos they post on a blog or social media. Photos from DSLRs and mirrorless cameras may have the serial numbers of the camera body and lens recorded in their Exif. This article explains which fields hold serial numbers, what can happen if someone reads them, how phone photos differ, and how to check for and remove them.

Read article →