Decimal hours

Convert hours and minutes to decimal hours and back.

Changing modes clears your inputs and result.

Non-negative duration, not a time of day. Minutes range from 0 to 59; enter 0 if there are none. Example: 1 h 30 min = 1.5 h, not 1.30 h.

Both dots and commas are accepted as decimal separators.

Your dates and times stay in your browser and are not stored.

Method and assumptions

Method version 1.0.0 · Updated

Hours and minutes → decimal

Formula: h + min / 60

Non-negative duration, not a time of day. Minutes range from 0 to 59; enter 0 if there are none. Example: 1 h 30 min = 1.5 h, not 1.30 h.

hours
Whole hours
minutes
Minutes
Decimal → hours and minutes

Formula: Total minutes = round(h × 60)

Rounded to the nearest minute; half a minute rounds up. Example: 1.025 h = 1 h 02 min. Converting back to decimals may therefore differ from the original input.

hours
Decimal hours

Gregorian calendar from years 0001 to 9999. Date, duration and rounding conventions are specified for each mode.

Calculate with code

These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.

JavaScript
const decimalHours = 2 + 30 / 60;
console.log(decimalHours); // 2.5
TypeScript
const decimalHours: number = 2 + 30 / 60;
console.log(decimalHours); // 2.5
Python
hours, minutes = 2, 30
print(hours + minutes / 60)  # 2.5
Java
double decimalHours = 2 + 30 / 60.0;
System.out.println(decimalHours); // 2.5
C#
double decimalHours = 2 + 30 / 60.0;
Console.WriteLine(decimalHours); // 2.5