Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Calculating Time in Excel: A Complete Step-by-Step Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To calculate time in Excel, subtract the start time from the end time using a simple formula (=End_Time - Start_Time) and apply the correct cell formatting to display the result as hours and minutes. Because Excel treats one full day as a value of 1, time is stored as a fraction of a day, meaning proper formatting is the most critical step to ensure your totals look correct.

What You'll Need

  • Microsoft Excel (any modern version)
  • A dataset containing start times and end times (entered in a recognized time format, such as 8:00 AM or 17:00)

Step-by-Step

  1. Enter Your Data: Input your start times in one column (e.g., Column A) and your end times in another (e.g., Column B). Ensure you use a colon to separate hours and minutes. For example, type "9:00 AM" or "14:30".
  2. Insert the Subtraction Formula: Click on the cell where you want the duration to appear (e.g., Cell C2). Type the equals sign, click the end time cell, type a minus sign, and click the start time cell.
    Example: =B2-A2
  3. Press Enter: Excel will calculate the difference. If the result looks like a decimal (e.g., 0.33) or a strange time of day, do not worry; this is a formatting issue, not a formula error.
  4. Format the Result:
    • Right-click the result cell and select Format Cells.
    • In the Category list on the left, select Time.
    • Choose the format that best fits your needs (e.g., "13:30"). Click OK.
  5. Calculate Total Hours (Summing Time): If you have a list of durations and want to add them together, use the SUM function.
    Example: =SUM(C2:C10)
  6. Apply the Square Bracket Format: By default, if your total hours exceed 24, Excel "resets" the clock to zero. To show the actual total hours (e.g., 45 hours instead of 21 hours), you must use a custom format:
    • Right-click the total cell and select Format Cells.
    • Select Custom from the Category list.
    • In the Type box, manually type: [h]:mm
    • The square brackets tell Excel to accumulate hours rather than rolling them over into a new day.
  7. Convert Time to Decimals (for Payroll): If you need to multiply hours by a hourly rate (e.g., 8 hours 30 mins * $20), you must convert the time to a decimal number.
    • Multiply the time result by 24.
    • Example: =(B2-A2)*24
    • Crucial: Change the cell format of this result to Number or General. If it stays as "Time," the result will be incorrect.

Common Mistakes

  • Wrong Cell Formatting: The most common error is leaving a total sum cell in the standard "Time" format. This causes totals over 24 hours to appear as if they have restarted from zero. Always use [h]:mm for totals.
  • Mixing Text and Time: Typing "8 hours" instead of "8:00" turns the cell into a text string. Excel cannot perform math on text. Only enter numbers and colons.
  • Ignoring the Date: If a shift starts at 10:00 PM and ends at 6:00 AM the next day, a simple End-Start formula will result in a negative number (which Excel displays as a string of hashtags #######).
  • Forgetting the *24 Multiplier: Trying to multiply a time-formatted cell (like 08:00) by a currency value will produce a tiny, incorrect number because Excel is multiplying the currency by the fraction of a day (0.33) rather than the number of hours (8).

Tips

  • Quick Entry: Use Ctrl + Shift + : (colon) to instantly insert the current time into a selected cell.
  • Military Time: To avoid confusion between AM and PM, enter time using the 24-hour clock (e.g., 15:00 instead of 3:00 PM). Excel recognizes both, but 24-hour entry is faster and less prone to error.
  • Consistency: Keep your start and end times in separate columns. This makes it much easier to audit your data and apply formulas across hundreds of rows using the "fill handle" (the small square at the bottom-right of a cell).

Troubleshooting

If your calculations are not working as expected, try these steps in order:

  • Check for "#####" errors: This usually means the result is a negative time. If your time spans midnight, use this formula instead: =IF(B2. The "+1" tells Excel to add one full day to the end time.
  • Verify Data Types: Select your time cells and look at the "Number" dropdown in the Home tab. If it says "Text," the formula won't work. Re-enter the times using colons.
  • Reset Formatting: If a cell is showing a decimal like 0.5 when it should be 12:00, go to Format Cells > Time and select a standard time format.
  • Check for Hidden Spaces: Sometimes data imported from other software contains hidden spaces. Use the =TRIM() function to clean the cells if the math isn't triggering.

Frequently Asked Questions

Why does my total time reset after 24 hours?

Excel's default time format treats 24 hours as a complete cycle. To see the cumulative total, you must use the Custom format [h]:mm.

How do I calculate the difference between two dates and times?

If your cells include both date and time (e.g., "2026-12-01 08:00"), you can simply subtract them (=End_Cell - Start_Cell). Excel will calculate the total days and hours automatically.

Can I calculate time using a formula if I don't have an end time yet?

Yes. You can use the NOW() function to represent the current time. For example, =NOW()-A2 will show how much time has elapsed since the start time in cell A2.

How do I subtract a break (like 30 minutes) from a total?

You can subtract time by entering it in quotes within the formula or referencing a cell. Example: =(B2-A2)-TIME(0,30,0) to subtract 30 minutes.

Why is my time showing as a decimal like 0.75?

Excel stores time as a fraction of a 24-hour day. 0.75 represents 75% of a day, which is 18 hours. Change the cell format to "Time" to see it in a readable format.