Convert and calculate angles (DMS/Decimal) and temperature units with precision.
1. Angle Degree Converter (DMS to Decimal)
2. Decimal Degrees to DMS
3. Temperature Degree Converter
Celsius (°C)
Fahrenheit (°F)
Kelvin (K)
Understanding Degree Measurements
The term "degree" serves multiple purposes in science and mathematics. It most commonly refers to a measurement of plane angles (geometry) or a unit of temperature (thermodynamics). This calculator helps you navigate both worlds with accuracy.
Angle Degrees: DMS vs. Decimal
In geography and astronomy, angles are often expressed in the DMS (Degrees, Minutes, Seconds) format. This system is sexagesimal (base-60), similar to how we measure time.
1 Degree (°) = 60 Minutes (')
1 Minute (') = 60 Seconds (")
To convert DMS to Decimal Degrees, the formula is: Decimal Degrees = Degrees + (Minutes/60) + (Seconds/3600).
Temperature Degrees
Temperature measurement relies on established scales. While the United States uses Fahrenheit, most of the scientific world and other countries use Celsius. The Kelvin scale is used in physics to represent absolute temperature.
Common Formulas:
Celsius to Fahrenheit: (°C × 9/5) + 32 = °F
Fahrenheit to Celsius: (°F − 32) × 5/9 = °C
Celsius to Kelvin: °C + 273.15 = K
Example Calculation
If you have a coordinate of 34° 03′ 08″ North:
Degrees = 34
Minutes = 3/60 = 0.05
Seconds = 8/3600 = 0.00222
Total = 34.05222 Decimal Degrees
function calculateDMS() {
var d = parseFloat(document.getElementById("dms_deg").value) || 0;
var m = parseFloat(document.getElementById("dms_min").value) || 0;
var s = parseFloat(document.getElementById("dms_sec").value) || 0;
var decimal = d + (m / 60) + (s / 3600);
var resultDiv = document.getElementById("dms_result");
resultDiv.style.display = "block";
resultDiv.innerHTML = "Result: " + decimal.toFixed(6) + "°";
}
function calculateToDMS() {
var dd = parseFloat(document.getElementById("decimal_input").value);
if (isNaN(dd)) {
alert("Please enter a valid decimal number.");
return;
}
var d = Math.floor(Math.abs(dd));
var minFloat = (Math.abs(dd) – d) * 60;
var m = Math.floor(minFloat);
var s = (minFloat – m) * 60;
var sign = dd < 0 ? "-" : "";
var resultDiv = document.getElementById("decimal_result");
resultDiv.style.display = "block";
resultDiv.innerHTML = "Result: " + sign + d + "° " + m + "' " + s.toFixed(2) + "\"";
}
function calculateTemp() {
var val = parseFloat(document.getElementById("temp_val").value);
var unit = document.getElementById("temp_unit").value;
if (isNaN(val)) {
alert("Please enter a valid temperature value.");
return;
}
var c, f, k;
if (unit === "C") {
c = val;
f = (c * 9/5) + 32;
k = c + 273.15;
} else if (unit === "F") {
f = val;
c = (f – 32) * 5/9;
k = c + 273.15;
} else if (unit === "K") {
k = val;
c = k – 273.15;
f = (c * 9/5) + 32;
}
var resultDiv = document.getElementById("temp_result");
resultDiv.style.display = "block";
resultDiv.innerHTML = "Conversions:" +
c.toFixed(2) + " °Celsius" +
f.toFixed(2) + " °Fahrenheit" +
k.toFixed(2) + " Kelvin";
}