Degrees Minutes Seconds (DMS) Converter Formula

Understand the math behind the degrees minutes seconds (dms) converter. Each variable explained with a worked example.

Formulas Used

Deg Part

deg_part = floor(abs(decimal_deg))

Min Part

min_part = floor(mod(abs(decimal_deg) * 60, 60))

Sec Part

sec_part = mod(abs(decimal_deg) * 3600, 60)

Radians

radians = decimal_deg * pi / 180

Variables

VariableDescriptionDefault
decimal_degDecimal Degrees(deg)45.7625

How It Works

Degrees, Minutes, Seconds (DMS)

Conversion

1 degree = 60 minutes = 3600 seconds

Decimal to DMS

1. Degrees = integer part of the decimal 2. Multiply the fractional part by 60 → Minutes = integer part 3. Multiply the remaining fraction by 60 → Seconds

Example: 45.7625°

  • Degrees: 45
  • 0.7625 × 60 = 45.75 → Minutes: 45
  • 0.75 × 60 = 45 → Seconds: 45
  • Result: 45° 45' 45"
  • Worked Example

    Convert 45.7625° to DMS.

    decimal_deg = 45.7625
    1. 01Degrees = floor(45.7625) = 45°
    2. 02Remaining = 0.7625 × 60 = 45.75
    3. 03Minutes = 45'
    4. 04Remaining = 0.75 × 60 = 45
    5. 05Seconds = 45"
    6. 06Result: 45° 45' 45"