Work hours: turn hours and minutes into an accurate decimal total

A common timesheet error happens before multiplication: treating minutes as hundredths of an hour. Convert each duration into minutes first, then sum it before calculating a weekly total or a fixed hourly amount.

Minutes are not decimal places

An hour contains 60 minutes. Dividing 45 by 60 gives 0.75, so 7 hours 45 minutes is 7.75 hours. By contrast, 7.45 hours means 7 hours 27 minutes.

Keep whole minutes while adding and round the displayed final result only when needed. Rounding every shift first can change the total across many shifts.

References: NIST — Units outside the SI: minute and hour

Breaks and shifts across midnight

The arithmetic net duration is end time minus start time minus the break you intend to exclude. A break cannot exceed the shift. Whether a break is paid depends on the working arrangement, not on subtraction.

For an evening start and a morning finish, specify that the finish is on the next day. A daylight-saving transition needs dates and time zones; a time-of-day-only calculation does not precisely measure that case.

References: MDN — Date.setDate and daylight-saving transitions

A simple amount is not a payroll statement

Hours multiplied by one hourly rate produce a fixed-rate gross calculation. It does not automatically incorporate overtime rates, tax, allowances or break entitlements.

Review each shift as an independent record and avoid entering the same period twice. Keep the start, finish and break when investigating a mismatch with another record.

Worked example: two shifts, one total

09:10 to 17:40 is 8 hours 30 minutes. Subtracting a 45-minute break leaves 7 hours 45 minutes, or 7.75 hours. At an illustrative fixed rate of 80 per hour, the product is 620 before any additional rules.

A second shift from 22:30 to 06:15 the next day lasts 7 hours 45 minutes. After a 30-minute break, it contributes 7.25 hours. The two shifts total 15 hours, producing a simple fixed-rate amount of 1200.

References