converts from degrees, minutes, and seconds to decimal degrees.


converts from a DMS string to decimal degrees.


converts from a latitude-longitude string to latitude and longitude in decimal degrees.


  • FromDMS["dms"] supports all common DMS string formats, with delimiters such as °, ', ", and d, m, s.
  • FromDMS["dms"] allows strings containing cardinal directions N, S, E, W. N and E give positive angles; S and W give negative angles.
  • FromDMS["latlon"] supports latitude-longitude formats, with or without cardinal directions explicitly specified.
  • Results in decimal degrees can be converted to radians by multiplying by Degree.


open allclose all

Basic Examples  (4)

Convert from a DMS list to an angle in decimal degrees:

Convert from a DMS string:

Convert from a DMS string with cardinal directions:

Convert from a latitude-longitude specification:

Scope  (4)

Convert a DMS list into a numeric angle in degrees:

For exact input, the result is also an exact number:

A signed angle:

The sign can also be specified using a cardinal direction:

Convert a DMS string into a numeric angle in degrees:

The input can be given in multiple forms:

Signs in a DMS string can also be specified using cardinal directions:

Generalizations & Extensions  (4)

Act on both angles of a double DMS string:

The result always has {lat,lon} order:

Indicate whether the input has latitude first or longitude first:

FromDMS on a numeric quantity interprets it as already being an angle in degrees:

Convert a Quantity angle into a numeric angle in degrees:

Properties & Relations  (3)

If the input contains an inexact number, the result will be inexact:

Only when all numbers are exact will the result be exact:

The action of FromDMS on a DMS list can be inverted with DMSList:

With exact numbers:

The action of FromDMS on a DMS string can be inverted (modulo notation) with DMSString:

With exact numbers:

Introduced in 2008