The clock maths behind the result
Two native time inputs sit side by side: Start Time (mcStart) defaults to 09:00 and End Time (mcEnd) to 17:30. Pressing Calculate splits each value at the colon, turns hours and minutes into minutes since midnight by multiplying the hour by sixty and adding the minutes, then subtracts the start from the end. If that difference is negative the page adds 1440, so an end time earlier than the start is read as rolling past midnight instead of an error.
A worked example
With the shipped values the end 17:30 becomes 1050 minutes since midnight and the start 09:00 becomes 540, so 1050 minus 540 puts 510 in the green panel under the words Total Minutes. Change the pair to 22:00 and 02:00 and you get 120 minus 1320, which is minus 1200; adding 1440 gives 240, the four-hour shift that crosses midnight.
What you get back
The answer is a single whole number of minutes, and the result card stays hidden until the first click. There is no hours-and-minutes breakdown and no decimal part, and nothing recalculates while you edit; every change needs another press of Calculate.
Where it stops
- The clock inputs resolve to the minute, so durations carrying seconds cannot be entered.
- The same value in both boxes returns 0, and a full 24-hour span cannot be expressed.
- No date is involved, so anything longer than one clock day is out of reach.
- Clearing either field hides the result and asks for both times, rather than attempting a partial calculation.
Questions people ask
Does it handle shifts that cross midnight?
Yes. When the end reads earlier than the start the tool wraps it forward around the same 24-hour clock, so 22:00 to 02:00 counts 240 minutes.
Why must I click Calculate again after editing?
The page attaches no live listeners to the two time fields; the arithmetic only runs when the button calls it.
Hours Calculator, Time Duration Calculator and Seconds Calculator cover the finer and longer spans this page skips.