Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Time Until Target
10.43
hours from now
Hours and minutes 10 h 26 m
Total minutes 626 minutes

What this calculator does

This tool tells you exactly how many hours and minutes remain until a specific time of day. Enter the target time (for example 17:00 for 5 PM) and the current time, and it returns the gap in decimal hours, in hours-and-minutes form, and in total minutes. If the target time has already passed for today, the calculator automatically wraps to the same time tomorrow.

Clock face with a curved arrow spanning from the current time to a later target time
The calculator measures the gap from now to a target time of day.

How to use it

Set the Target hour and Target minute to the moment you are counting down to, using a 24-hour clock (0-23 for hours). The Current hour and Current minute default to your present time but can be changed to test any scenario. Press calculate to see the remaining time.

The formula explained

Both times are first converted to minutes past midnight: \(\text{target} = \text{hour} \times 60 + \text{minute}\), and \(\text{now} = \text{currentHour} \times 60 + \text{currentMinute}\). The raw difference is \(\text{target} - \text{now}\). Because a clock repeats every 24 hours (1440 minutes), if the difference is zero or negative we add 1440 so the result always lands in the next occurrence of that time. Finally, \(\text{hours} = \text{diff} \div 60\).

$$\begin{gathered} \text{Hours Until} = \frac{\left(\,\Delta + 1440 \bmod 1440\,\right)}{60} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} \Delta &= \left(60\cdot\text{Target Hour} + \text{Target Min}\right) \\ &\quad - \left(60\cdot\text{Now Hour} + \text{Now Min}\right) \\ &\text{add } 1440 \text{ if } \Delta \le 0 \end{aligned} \right. \end{gathered}$$

Worked example

Suppose it is 14:30 (2:30 PM) and you want to know how long until 17:00 (5 PM). Target = \(17\times60 = 1020\) minutes; now = \(14\times60 + 30 = 870\) minutes.

$$\text{diff} = 1020 - 870 = 150 \text{ minutes} = 2 \text{ hours } 30 \text{ minutes} = 2.5 \text{ hours}$$

FAQ

What if the target already passed today? The calculator adds 24 hours, so it counts down to the next time that clock reading occurs.

Does it use a 12 or 24-hour clock? Inputs use the 24-hour clock (0-23). For 5 PM enter 17, for 9 AM enter 9.

What happens if the times are equal? A difference of zero is treated as a full day away (24 hours), since the time has just passed.

Last updated: