How the Decimal Degrees to Degrees Minutes Seconds Converter works
Angles — most commonly geographic coordinates like latitude and longitude — can be written two ways: as a single decimal degrees (DD) number such as 40.7128°, or in the traditional degrees, minutes, seconds (DMS) sexagesimal format such as 40° 42′ 46.08″. GPS devices, spreadsheets, and mapping APIs typically use decimal degrees, while paper charts, surveying documents, and many older systems use DMS. This calculator converts a decimal degree value into its exact DMS equivalent, including the correct N/S or E/W direction letter for coordinates.
Formula and method
Let d be the decimal degree value. The conversion peels off one sexagesimal unit at a time:
- Degrees: D = ⌊|d|⌋ — the whole-number part of the absolute value.
- Minutes: M = ⌊(|d| − D) × 60⌋ — multiply the leftover fraction by 60 (since 1° = 60′) and take the whole-number part.
- Seconds: S = (((|d| − D) × 60) − M) × 60 — multiply the next leftover fraction by 60 again (since 1′ = 60″).
For example, with d = 40.7128: D = 40, the leftover 0.7128 × 60 = 42.768 gives M = 42, and the leftover 0.768 × 60 = 46.08 gives S = 46.08, so d = 40° 42′ 46.08″.
Sign convention and direction letters
Degrees, minutes, and seconds are always reported as non-negative magnitudes — the sign of the original decimal value is instead encoded as a direction. For latitude, a positive value is North (N) and a negative value is South (S). For longitude, a positive value is East (E) and a negative value is West (W). For a generic angle (not a coordinate), this calculator keeps a leading minus sign instead of a direction letter, since generic angles have no N/S/E/W meaning.
Common sources of error
- Forgetting to take the absolute value first: splitting a negative number directly into whole and fractional parts (instead of working with |d|) produces the wrong minutes and seconds.
- Truncating instead of rounding seconds: if the seconds value rounds to 60.00 or higher, it must carry into the minutes column (and minutes into degrees) rather than being displayed as-is.
- Mixing up N/S with E/W: latitude uses North/South; longitude uses East/West. Using the wrong pair silently produces a coordinate on the wrong axis.
Checking your result
You can sanity-check a DMS result by converting it back to decimal degrees: decimal = D + M/60 + S/3600 (with the sign restored from the direction letter). If that does not match your original input, recheck which value you rounded. Also confirm the degrees value stayed within range — latitude between 0° and 90°, longitude between 0° and 180° — since a DMS coordinate outside those bounds signals an input error upstream.
Applications
DD-to-DMS conversion is used constantly in navigation and mapping: GPS receivers and web maps store coordinates in decimal degrees, but many marine charts, aviation approach plates, and legal land descriptions still specify latitude and longitude in degrees-minutes-seconds. Surveyors and astronomers also use the same sexagesimal system for measuring angles and celestial coordinates, where "arcminutes" and "arcseconds" are the standard units for small angular separations.