Time Calculator
Use this Time Calculator to find the time between two clock times, calculate how long until a future time, see what time it will be a certain number of hours or minutes from now, work backward to a time in the past, or add and subtract time from a starting time. It is designed for everyday questions such as “how many hours from 8 AM to 5 PM,” “how long until 6 PM,” and “what time will it be in 7 hours?”
Choose the calculator mode that matches your question, enter the time or duration, and get an instant result in hours, minutes, decimal hours, and both 12-hour and 24-hour time where relevant. The calculator uses your device’s local time for “how long until,” “time from now,” and “time ago” calculations.
Time Calculator
Calculate time between two times, how long until a time, time from now, time ago, or add and subtract hours and minutes.
Table of Contents
How to Use the Time Calculator
The Time Calculator has five modes because people ask time questions in several different ways. Sometimes you know a start time and an end time and want the duration between them. Sometimes you know a future clock time and want to know how long remains until it arrives. In other situations, you may want to add several hours to the current time, find a time in the past, or add and subtract a duration from a specific starting time.
Choose the mode that best matches your question. The calculator then shows only the inputs needed for that calculation. This keeps the tool easy to use on a phone while still covering a wide range of time calculations.
Time Between Two Times
Use Time Between when you have a starting clock time and an ending clock time. Enter both times, optionally enter a break in minutes, and choose whether the ending time is on the same day, the next day, or should be detected automatically. The result includes hours and minutes, total minutes, gross time, break time, and decimal hours.
For example, from 8:00 AM to 5:00 PM is 9 hours. If you subtract a 30-minute break, the calculated duration becomes 8 hours 30 minutes, or 8.50 decimal hours. This can be useful for schedules, appointments, study sessions, travel planning, project timing, and everyday questions such as “how many hours from 8 to 5?”
If your calculation involves travel rather than only clock time, the Distance Calculator can calculate driving distance and estimated driving time between two locations.
How Long Until a Time
Use How Long Until when you want the remaining time from right now to a clock time later today. Enter the target time and the calculator compares it with your device's current local time. If the target has already passed, the default setting treats the target as tomorrow.
This makes questions such as “how long until 5 PM?”, “how many hours until 7 AM?”, “how long until midnight?”, and “how many minutes until noon?” easy to calculate.
Time From Now
Time From Now answers questions such as “what time will it be in 7 hours?” Enter a number of hours and optional minutes. The calculator adds the duration to your current device time and returns the resulting date and time in both 12-hour and 24-hour formats.
The calculation can also handle durations longer than one day. If you enter 30 hours, for example, the result moves forward one full day plus another six hours.
Time Ago
Time Ago works in the opposite direction. Enter the number of hours and minutes you want to subtract from the present moment. The calculator returns the corresponding time and date in the past. It can answer questions such as “what time was it 12 hours ago?” and “what time was it 90 minutes ago?”
Add or Subtract Time
Use Add / Subtract when you already know the starting clock time. Choose whether to add or subtract, enter a duration, and calculate the new clock time. For example, 3:15 PM plus 2 hours 45 minutes equals 6:00 PM. The calculator also tells you whether the calculation moves into the next day or previous day.
Time Calculator Formula
Most clock-time calculations become easier when the times are converted into minutes. A day contains 24 hours, and each hour contains 60 minutes, so a full day contains 1,440 minutes. Converting a clock time into minutes after midnight creates a single number that can be compared or adjusted.
For 8:30 AM, the calculation is 8 × 60 + 30 = 510 minutes after midnight. For 5:00 PM, first convert the hour to 24-hour time, which is 17:00. The calculation is 17 × 60 = 1,020 minutes after midnight. Subtracting 510 from 1,020 gives 510 minutes, which equals 8 hours 30 minutes.
Calculating Time Across Midnight
An overnight calculation needs one extra step because the ending time can appear numerically smaller than the starting time. For example, 10:00 PM is 1,320 minutes after midnight, while 6:00 AM is 360 minutes after midnight. A direct subtraction would produce a negative value even though the real elapsed time is eight hours.
The automatic overnight option applies this rollover when the entered end time is earlier than the start time. If both times are identical, automatic mode treats the elapsed time as zero. Select Next Day if you intentionally mean the same clock time on the following day, which produces a 24-hour duration.
Subtracting Break Time
Break minutes are deducted after the gross elapsed time is calculated. If a period from 9:00 AM to 5:00 PM lasts eight hours and you enter a 30-minute break, the net duration becomes seven hours 30 minutes.
The calculator prevents a break from being longer than the total elapsed period because that would create a negative usable duration.
Hours and Minutes Calculator
An hours and minutes calculator is useful because clock arithmetic works in groups of 60 rather than groups of 100. The difference between 8:45 AM and 10:15 AM is 1 hour 30 minutes. In decimal form, that is 1.50 hours because 30 minutes is half of 60 minutes.
This distinction matters when converting a time duration into decimal hours. Divide the remaining minutes by 60 and add the result to the whole hours. A duration of 2 hours 15 minutes equals 2.25 hours. A duration of 2 hours 45 minutes equals 2.75 hours.
| Hours and Minutes | Total Minutes | Decimal Hours |
|---|---|---|
| 30 minutes | 30 | 0.50 |
| 1 hour 15 minutes | 75 | 1.25 |
| 1 hour 30 minutes | 90 | 1.50 |
| 1 hour 45 minutes | 105 | 1.75 |
| 2 hours 30 minutes | 150 | 2.50 |
| 8 hours 30 minutes | 510 | 8.50 |
If you need to calculate percentages of time, increases, decreases, or differences, use the Percentage Calculator.
How Many Hours Between Two Times?
To find how many hours are between two times, convert each time to minutes after midnight and subtract the start from the end. If the period crosses midnight, add one day to the ending time. The calculator performs these steps automatically and converts the answer back into hours and minutes.
How Many Hours From 8 AM to 5 PM?
There are 9 hours from 8:00 AM to 5:00 PM when no break is subtracted. In 24-hour time, 8:00 AM is 08:00 and 5:00 PM is 17:00. Subtracting 8 from 17 gives 9 hours.
How Many Hours From 9 AM to 5 PM?
There are 8 hours from 9:00 AM to 5:00 PM. If you are calculating a work period and take a 30-minute unpaid break, the remaining time is 7 hours 30 minutes. A one-hour break leaves 7 hours.
How Many Hours From 7 AM to 3 PM?
There are 8 hours from 7:00 AM to 3:00 PM. The result is 480 total minutes or 8.00 decimal hours before any break is deducted.
How Many Hours From 10 PM to 6 AM?
There are 8 hours from 10:00 PM to 6:00 AM the following morning. Because this period crosses midnight, the calculator treats the 6:00 AM end time as occurring on the next day.
How Many Hours From 8:30 AM to 5 PM?
There are 8 hours 30 minutes from 8:30 AM to 5:00 PM. In decimal form, that is 8.50 hours before subtracting any breaks.
How Many Hours From 6 AM to 6 PM?
There are exactly 12 hours from 6:00 AM to 6:00 PM. The same 12-hour duration occurs from 6:00 PM to 6:00 AM the following day.
How Long Until a Certain Time?
Questions beginning with “how long until” depend on the current time, so the answer changes throughout the day. The How Long Until mode reads the current date and time from your browser when you press the calculate button and finds the duration to the target clock time.
If it is 2:20 PM and you ask how long until 5:00 PM, the answer is 2 hours 40 minutes. If it is already 6:00 PM and you ask how long until 5:00 PM with the default rollover setting, the calculator interprets the target as 5:00 PM tomorrow.
The same tool can answer questions such as how long until 3 PM, how long until 6 PM, how many hours until 7 AM, how many minutes until noon, how long until midnight, or how much longer until a scheduled event begins.
How Long Until Midnight?
Midnight marks the beginning of the next calendar day. The time remaining until midnight is the difference between the current local time and 12:00 AM tomorrow. At 9:30 PM, for example, there are 2 hours 30 minutes until midnight.
How Long Until Noon?
Noon is 12:00 PM. If the current time is before noon, subtract the current time from 12:00 PM. If noon has already passed and rollover is enabled, the calculator finds the time remaining until noon on the following day.
How Many Hours Until 5 PM?
The answer depends on your current local time. If it is 1:00 PM, there are 4 hours until 5:00 PM. If it is 4:30 PM, there are 30 minutes until 5:00 PM. Use the How Long Until mode for an answer based on the current time on your device.
Time From Now Calculator
The Time From Now mode is designed for questions such as “what time will it be in 5 hours?”, “what time is 12 hours from now?”, “what time will it be in 30 minutes?”, and “what time will it be 24 hours from now?”
The calculator adds the duration to the current date and time rather than assuming the answer stays within the same calendar day. If the current time is 9:00 PM, five hours from now is 2:00 AM tomorrow. If the current time is 11:30 PM, 90 minutes from now is 1:00 AM tomorrow.
What Time Will It Be in 1 Hour?
Add one hour to the current clock time. If it is 3:20 PM now, one hour from now is 4:20 PM. If it is 11:30 PM now, one hour from now is 12:30 AM tomorrow.
What Time Will It Be in 5 Hours?
Add five hours to the current time. The calculator automatically handles AM, PM, midnight, and a change to the next calendar day when necessary.
What Time Will It Be in 8 Hours?
Enter 8 in the Hours From Now field and calculate. The result shows the future time, the date on which it occurs, and the equivalent 24-hour time.
What Time Will It Be in 12 Hours?
Twelve hours from now is the opposite AM or PM portion of the clock. For example, 7:00 AM plus 12 hours is 7:00 PM. At 7:00 PM, 12 hours later is 7:00 AM the following day.
24 Hours From Now
Twenty-four elapsed hours from now normally produces the same clock reading on the next day. Daylight saving time transitions can complicate local wall-clock comparisons when clocks move forward or backward, so the calculator relies on the date and time handling provided by your browser and operating system.
Time Ago Calculator
The Time Ago mode subtracts hours and minutes from the current moment. If it is 3:00 PM now, 6 hours ago was 9:00 AM. If it is 4:00 AM now, 8 hours ago was 8:00 PM on the previous day.
The result includes the date as well as the clock time so it remains clear when the calculation crosses midnight into yesterday or an earlier date.
What Time Was It 1 Hour Ago?
Subtract one hour from the current time. At 4:45 PM, one hour ago was 3:45 PM. At 12:30 AM, one hour ago was 11:30 PM on the previous day.
What Time Was It 8 Hours Ago?
Enter 8 in the Hours Ago field. The calculator subtracts eight elapsed hours from the current moment and displays the resulting time and date.
What Time Was It 12 Hours Ago?
Twelve hours ago normally has the same hour and minute with the opposite AM or PM designation. For example, if it is 6:15 PM now, 12 hours ago was 6:15 AM.
12-Hour Time and 24-Hour Time
Many people use a 12-hour clock with AM and PM, while transportation, health care, the military, computing, and international schedules often use a 24-hour clock. This calculator displays both formats in relevant results so you do not have to convert them separately.
In 24-hour notation, the hours run from 00 through 23. Midnight at the beginning of a day is 00:00. Noon is 12:00. One PM is 13:00, five PM is 17:00, and eleven PM is 23:00.
| 12-Hour Time | 24-Hour Time |
|---|---|
| 12:00 AM | 00:00 |
| 1:00 AM | 01:00 |
| 8:00 AM | 08:00 |
| 12:00 PM | 12:00 |
| 1:00 PM | 13:00 |
| 5:00 PM | 17:00 |
| 11:00 PM | 23:00 |
Time Duration Calculator
A time duration is the amount of elapsed time between a starting point and an ending point. It is different from a clock time. A clock time identifies a position within a day, such as 2:30 PM. A duration describes how long something lasts, such as 2 hours 30 minutes.
The Time Between mode works as a time duration calculator. Enter two clock times and see the elapsed duration as hours and minutes, total minutes, and decimal hours.
Elapsed Time Examples
- 1:20 PM to 3:05 PM = 1 hour 45 minutes.
- 11:15 PM to 1:45 AM = 2 hours 30 minutes.
- 6:00 AM to 6:00 PM = 12 hours.
- 6:00 PM to 6:00 AM = 12 hours.
- 8:30 AM to 5:00 PM = 8 hours 30 minutes.
- 9:00 AM to 5:00 PM = 8 hours.
Adding Hours and Minutes to a Time
Adding time is easiest when both the starting time and duration are first represented as minutes. For example, 3:15 PM is 915 minutes after midnight. Two hours 45 minutes is another 165 minutes. Adding them gives 1,080 minutes after midnight, which is 6:00 PM.
If the result is greater than 1,439 minutes, it has passed midnight and moved into the following day. The calculator normalizes the result back to a standard 24-hour clock while also showing that the calculation moved to the next day.
Subtracting Hours and Minutes From a Time
Subtracting time works the same way in reverse. If you subtract three hours from 2:00 AM, the result is 11:00 PM on the previous day. The Add / Subtract mode identifies that date rollover instead of simply displaying the clock reading without context.
AM and PM Explained
AM covers the period from midnight through the morning before noon. PM covers the period from noon through the evening before the next midnight. The two times that commonly cause confusion are 12 AM and 12 PM.
- 12:00 AM = midnight.
- 12:00 PM = noon.
- 1:00 AM = one hour after midnight.
- 1:00 PM = one hour after noon.
Using 24-hour time eliminates this ambiguity because midnight begins at 00:00 and noon remains 12:00.
Decimal Hours Calculator
Decimal hours express a time duration as a normal decimal number. This can make multiplication, division, payroll estimates, productivity calculations, and other mathematical operations easier.
To convert minutes to decimal hours, divide the minutes by 60. Fifteen minutes is 0.25 hours, 30 minutes is 0.50 hours, and 45 minutes is 0.75 hours. Therefore, 7 hours 45 minutes equals 7.75 decimal hours.
Do not treat 7 hours 30 minutes as 7.30 hours. In decimal notation, 30 minutes equals half an hour, so the correct value is 7.50 hours.
Common Uses for a Time Calculator
- Finding the duration between appointments.
- Calculating study or practice sessions.
- Checking how long remains before a deadline.
- Planning travel departure and arrival windows.
- Adding preparation time before an event.
- Calculating how long a task took.
- Working backward from a scheduled time.
- Converting a duration into decimal hours.
- Finding the time several hours from now.
- Checking an overnight time span.
- Subtracting lunch or break time.
- Converting between 12-hour and 24-hour time.
If you are working with ratios such as tasks completed per hour or another rate calculation, the Ratio Calculator can simplify ratios and solve proportions.
Time Calculations for Work Hours
A basic time calculator can calculate the duration of one work period and subtract a break. For example, a shift from 7:00 AM to 5:30 PM is 10 hours 30 minutes. After a 30-minute unpaid lunch, the remaining time is 10 hours.
A complete weekly time-card calculation can become more complicated because overtime rules, multiple shifts, unpaid breaks, and pay rates may need to be considered. A dedicated Hours Worked Calculator is better suited to those calculations than using one start and end time repeatedly.
Time Calculations for School and Studying
Time calculations can help divide study periods, estimate how much time remains before an exam, or compare study sessions. A student might study from 6:15 PM until 8:45 PM, which is a duration of 2 hours 30 minutes.
For academic score calculations rather than time, the Grade Calculator can calculate percentages, weighted grades, and required scores.
Time Calculations and Age
Clock-time calculations measure hours and minutes within days, while age calculations measure the difference between calendar dates. If you need to calculate a person's age in years, months, and days, use the Age Calculator.
Daylight Saving Time
Daylight saving time can make certain elapsed-time calculations more complicated because local clocks may move forward by an hour or repeat an hour. A period that appears to cover eight clock hours around a daylight saving transition may not always represent eight actual elapsed hours.
The Time From Now, Time Ago, and How Long Until modes rely on your browser and device for local date and time handling. This allows the operating system's time-zone rules to be applied when JavaScript creates and changes dates.
For official information about U.S. daylight saving time and time standards, see the National Institute of Standards and Technology.
Time Zones
The Time Between mode compares the two clock readings you enter. It does not assume that the first time belongs to one city and the second time belongs to another city. If you enter 9:00 AM and 5:00 PM, the calculator treats them as clock times within the same local time system.
When comparing times in different time zones, first convert both times to the same time zone. Time-zone offsets can also change seasonally because some regions observe daylight saving time while others do not.
Why Use an Online Time Calculator?
Time calculations can be performed manually, but mistakes are easy when minutes need to be borrowed from an hour, AM and PM are mixed, or a time range crosses midnight. Converting the values into minutes first removes much of that confusion.
- Calculate hours between two times.
- Calculate minutes between two times.
- Find how long until a target time.
- Find what time it will be several hours from now.
- Find what time it was several hours ago.
- Add hours and minutes to a starting time.
- Subtract hours and minutes from a starting time.
- Calculate overnight time periods.
- Subtract break time.
- Convert elapsed time to decimal hours.
- See both 12-hour and 24-hour time.
Common Time Calculation Mistakes
One common mistake is treating clock minutes like decimal hundredths. Thirty minutes is 0.50 hours, not 0.30 hours. Another common mistake is forgetting that an end time earlier than the start time may belong to the following day.
AM and PM can also cause errors, particularly around noon and midnight. Remember that 12:00 AM is midnight and 12:00 PM is noon.
When using the How Long Until, Time From Now, or Time Ago modes, make sure the date, time, and time-zone settings on your device are correct because those calculations use your device clock.
Time Calculator Examples
Example 1: 8 AM to 5 PM
Enter 8:00 AM as the start time and 5:00 PM as the end time. The elapsed duration is 9 hours, or 540 minutes.
Example 2: Overnight Shift
Enter 10:00 PM as the start time and 6:00 AM as the end time. Automatic overnight detection recognizes that the end time occurs the following day and returns 8 hours.
Example 3: Subtract a Lunch Break
Enter 9:00 AM to 5:00 PM and a 30-minute break. The gross time is 8 hours. After subtracting the break, the calculated time is 7 hours 30 minutes.
Example 4: Add Time
Enter 3:15 PM as the starting time, choose Add Time, and enter 2 hours 45 minutes. The result is 6:00 PM.
Example 5: Subtract Across Midnight
Start at 2:00 AM and subtract 3 hours. The result is 11:00 PM on the previous day.
Time Calculator Frequently Asked Questions
How do I calculate the time between two times?
Enter the start time and end time in the Time Between mode. The calculator converts both times to minutes, subtracts the start from the end, handles an overnight rollover when necessary, subtracts any break, and converts the result back to hours and minutes.
How many hours are there from 8 AM to 5 PM?
There are 9 hours from 8:00 AM to 5:00 PM before subtracting any breaks.
How many hours are there from 9 AM to 5 PM?
There are 8 hours from 9:00 AM to 5:00 PM before subtracting any breaks.
How many hours are there from 7 AM to 3 PM?
There are 8 hours from 7:00 AM to 3:00 PM.
How many hours are there from 10 PM to 6 AM?
There are 8 hours from 10:00 PM to 6:00 AM the following day.
How do I calculate an overnight time?
If the end time is earlier than the start time, choose Automatically Detect Overnight or Next Day. The calculator adds one day to the end time before finding the difference.
What if the start and end time are identical?
Automatic and Same Day modes return zero. Choose Next Day if you mean the same clock time on the following day, which produces 24 hours.
How do I calculate how long until 5 PM?
Select How Long Until, enter 5:00 PM, and calculate. The tool compares 5:00 PM with your device's current local time. If 5:00 PM has already passed, the default option calculates until 5:00 PM tomorrow.
How do I find what time it will be in 8 hours?
Select Time From Now, enter 8 in the hours field, and calculate. The result adds eight hours to the current date and time.
How do I find what time it was 12 hours ago?
Select Time Ago, enter 12 hours, and calculate. The tool subtracts 12 hours from the current moment and displays the resulting time and date.
How do I add 45 minutes to a time?
Select Add / Subtract, enter the starting time, choose Add Time, enter 45 in the minutes field, and calculate.
How do I subtract hours from a time?
Select Add / Subtract, enter your starting time, choose Subtract Time, enter the number of hours and minutes, and calculate.
What are decimal hours?
Decimal hours express minutes as a fraction of 60. Thirty minutes equals 0.50 hours, 15 minutes equals 0.25 hours, and 45 minutes equals 0.75 hours.
Is 12 PM noon or midnight?
12:00 PM is noon. 12:00 AM is midnight.
Does the calculator use my time zone?
The modes that depend on the present moment use the local date and time supplied by your browser and device. Time Between and Add / Subtract operate on the clock values you enter.
Can I calculate more than 24 hours?
Yes. Time From Now and Time Ago can use durations longer than 24 hours. The date automatically moves forward or backward.
Can I subtract a lunch break?
Yes. The Time Between mode includes a break field measured in minutes.
Can this calculate time across midnight?
Yes. Time Between automatically detects an overnight period when the ending time is earlier than the starting time, or you can explicitly select Next Day.
What is the difference between elapsed time and clock time?
Clock time identifies a point in the day, such as 4:30 PM. Elapsed time describes the duration between two points, such as 2 hours 15 minutes.
Why does the calculator show decimal hours?
Decimal hours are useful when time needs to be used in ordinary arithmetic, such as multiplying hours by a rate or comparing durations.
Final Thoughts
Time calculations become much easier once hours and minutes are converted into a consistent unit. Whether you are finding the number of hours between two times, calculating how long until a target time, adding several hours to the current time, looking backward to a previous time, or working across midnight, the calculator above handles the arithmetic automatically.
Use Time Between for start and end times, How Long Until for countdown-style questions, Time From Now for future times, Time Ago for past times, and Add / Subtract when you want to change a specific clock time by a known duration.