Decimal Degrees to DMS Converter Formula

Understand the math behind the decimal degrees to dms converter. Each variable explained with a worked example.

Formulas Used

Degrees

degrees = deg_part

Minutes

minutes = min_part

Seconds

seconds = sec_part

Radians

radians = value * pi / 180

Variables

VariableDescriptionDefault
valueDecimal Degrees(°)40.7128
deg_partDerived value= floor(abs(value))calculated
min_totalDerived value= (abs(value) - floor(abs(value))) * 60calculated
min_partDerived value= floor((abs(value) - floor(abs(value))) * 60)calculated
sec_partDerived value= ((abs(value) - floor(abs(value))) * 60 - floor((abs(value) - floor(abs(value))) * 60)) * 60calculated

How It Works

Decimal Degrees to DMS

Conversion Steps

1. Degrees = floor of the decimal degree value 2. Minutes = floor of (fractional part x 60) 3. Seconds = remaining fraction x 60

Example

40.7128° = 40° 42' 46.08"

DMS format is commonly used on maps, in navigation, and for GPS coordinates.

Worked Example

Convert 40.7128° (New York City latitude) to DMS.

value = 40.7128
  1. 01Degrees = 40
  2. 02Fractional = 0.7128 x 60 = 42.768 minutes
  3. 03Minutes = 42
  4. 04Seconds = 0.768 x 60 = 46.08 seconds
  5. 05Result: 40° 42' 46.08"

Ready to run the numbers?

Open Decimal Degrees to DMS Converter