Late Attendance Formula in Excel: Calculate It

Formulas & functions · Updated November 23, 2026

The simplest formula for late attendance in Excel is =IF(B2>TIME(9,0,0),"Late","On Time"), assuming the scheduled start time is 9:00 AM and the actual arrival time is in cell B2. This returns “Late” when the arrival time is after 9:00 AM and “On Time” otherwise. For a more detailed result that shows the minutes late, use =IF(B2>TIME(9,0,0),B2-TIME(9,0,0),0) and format the result as [m] to display minutes.

Understanding How Excel Stores Times

Excel stores times as decimal fractions of a 24-hour day. For example, 9:00 AM is stored as 0.375, and 9:30 AM is 0.395833. This means you can compare times directly with the greater-than (>) operator. However, if your attendance sheet includes dates and times together (like 2025-04-15 09:12:00), the comparison must account for the date part, or you need to extract the time using the MOD function: =IF(MOD(B2,1)>TIME(9,0,0),"Late","On Time").

Setting Up Your Attendance Sheet

Before writing any formula, decide on your layout. A typical sheet has:

  • Column A: Employee name or ID
  • Column B: Scheduled start time (e.g., 9:00 AM)
  • Column C: Actual arrival time
  • Column D: Status (Late/On Time) or minutes late

For example, with employee names in A2:A20, scheduled times in B2:B20, and actual times in C2:C20, you would put the formula in D2 and copy it down. Always enter times as actual time values (e.g., type 9:00 AM or 9:00 with the cell formatted as time), not as text, or the comparisons will fail.

Basic Late Attendance Formulas

Here are the most common formulas with examples:

  1. Status only (Late/On Time) – with scheduled time in B2 and actual in C2: =IF(C2>B2,"Late","On Time"). If the actual time is greater than the scheduled, it’s late.
  2. Minutes late (numeric) – with scheduled in B2 and actual in C2: =IF(C2>B2,(C2-B2)*1440,0). The difference in days is multiplied by 1440 (the number of minutes in a day) to get minutes. For example, 9:12 AM minus 9:00 AM equals 0.008333 days, times 1440 equals 12 minutes.
  3. Hours late (decimal) – use =IF(C2>B2,(C2-B2)*24,0) to get hours as a decimal (e.g., 0.2 hours for 12 minutes).
  4. Count of late arrivals – with status in D2:D20: =COUNTIF(D2:D20,"Late").

For the minutes formula, format the cell as a number (not time) or use the custom format [m] to display total minutes without hours.

Handling Grace Periods and Business Rules

Many workplaces allow a grace period of 5 or 10 minutes. To give a 5-minute grace period, compare the actual time to the scheduled time plus 5 minutes: =IF(C2>B2+TIME(0,5,0),"Late","On Time"). For minutes late after grace, use =IF(C2>B2+TIME(0,5,0),(C2-(B2+TIME(0,5,0)))*1440,0). If you have a different grace period per employee, put it in a separate column (e.g., E2) and reference it: =IF(C2>B2+E2,"Late","On Time").

Using Conditional Formatting to Highlight Late Arrivals

Conditional formatting makes late entries stand out visually. To highlight late cells in red:

  1. Select the range of actual times (C2:C20).
  2. Go to Home > Conditional Formatting > New Rule.
  3. Choose Use a formula to determine which cells to format.
  4. Enter the formula =C2>B2 (assuming B2 is the first scheduled time).
  5. Click Format, choose a red fill, then OK.

This works because the formula is applied relative to the top-left cell of the selection. On Mac, the path is the same but the dialog appears slightly different.

Common Problems and Solutions

Several issues trip up users:

  • Times entered as text – If you type 9:00 AM with a space and Excel doesn’t recognize it, the cell becomes text and comparisons fail. Fix by re-entering as time or using VALUE().
  • Dates included in the time cell – If the cell contains a full date and time, use MOD(C2,1) to extract the time part.
  • Negative results – If an employee arrives early, the difference is negative. Wrap the formula in MAX(0,...) to avoid negatives: =MAX(0,(C2-B2)*1440).
  • Blank cells – If a cell is empty, it evaluates as 0 (midnight), which may incorrectly show as early. Use =IF(OR(C2="",B2=""),"",IF(C2>B2,"Late","On Time")) to leave blanks.

Comparing with Pivot Tables for Summaries

Once you have a status column, you can summarize late attendance by employee or month using a pivot table. Select your data range, go to Insert > PivotTable, and drag the employee name to Rows and the Status column to Values (set to Count). This gives a quick count of late days per person. To count only “Late” entries, use a calculated field or filter the status. For example, a COUNTIF formula in a summary sheet works too: =COUNTIF('Attendance Log'!D:D,"Late").

Frequently Asked Questions

How do I calculate minutes late when the scheduled time is in one column and actual in another?

Use =IF(C2>B2,(C2-B2)*1440,0) where B2 is scheduled and C2 is actual. This returns the number of minutes late, or 0 if on time or early. Format the result as a number.

Can I use a formula to automatically mark late if the arrival time is after 9:00 AM?

Yes: =IF(C2>TIME(9,0,0),"Late","On Time"). Replace TIME(9,0,0) with your actual start time. If your start time is in a cell, use that cell reference instead.

Why does my formula return 0 for times like 12:00 PM?

Excel treats 12:00 PM as 0.5, which is greater than 9:00 AM (0.375), so the formula should work. If you get 0, check that the times are actually stored as times, not text. Select the cell and look at the formula bar – if it shows the time without quotes, it’s a real time.

How do I count the number of late arrivals in a month?

If you have a date column (A) and a status column (D), use =COUNTIFS(D:D,"Late",A:A,">="&DATE(2025,4,1),A:A,"<="&DATE(2025,4,30)) for April 2025. Adjust the dates as needed.

Is there a way to show late as a negative number if early?

Yes, remove the IF and just use =(C2-B2)*1440. This will show negative minutes for early arrivals. If you want to display “Early” instead, use =IF(C2<B2,"Early",IF(C2>B2,"Late","On Time")).

Can I use this formula in Google Sheets?

Yes, the same formulas work in Google Sheets. The only difference is that Google Sheets uses TIME similarly, but conditional formatting is under Format > Conditional formatting. The syntax for IF and COUNTIF is identical.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.