Spreadsheet Practice

How to calculate a late fee based on days overdue in Excel

Formula (Excel and Google Sheets)

=IF(C2>B2,MIN($G$2,(C2-B2)*$G$1),0)

Charge the daily fee for each day late, up to a cap: =IF(C2>B2,MIN($G$2,(C2-B2)*$G$1),0).

Result on the example
one result per row in D2, filled down to D6
Works in
Every current version
Google Sheets
Same formula

See it work

The formula is already in D2, filled down to D6. Change any input and the result updates, or edit the formula to experiment.

How it works

Subtracting the due date from the return date gives the days late. When that is positive, the fee is days × daily fee, and MIN keeps it at or below the cap: R-4 is 13 days late, which would be 32.50, so it is charged 20.

=IF(C2>B2,MIN($G$2,(C2-B2)*$G$1),0)

Result0

  1. C210/9/2026

    The value in C2.

  2. B210/10/2026

    The value in B2.

  3. C2>B2FALSE

    The > operator tests greater than.

  4. $G$2$20.00

    The value in G2.

  5. C2-B2-1

    The - operator subtracts.

  6. $G$1$2.50

    The value in G1.

  7. C2-B2)*$G$1-2.5

    The * operator multiplies.

  8. MIN($G$2,(C2-B2)*$G$1)-2.5not used

    MIN: Smallest number.

    • number1$G$2$20.00
    • number2C2-B2)*$G$1-2.5
  9. IF(C2>B2,MIN($G$2,(C2-B2)*$G$1),0)0

    IF: Returns one value if a test is true, another if false.

    • logical_testC2>B2FALSE
    • value_if_trueMIN($G$2,(C2-B2)*$G$1)-2.5not used
    • value_if_false0

In Google Sheets

The same formula works in Google Sheets: =IF(C2>B2,MIN($G$2,(C2-B2)*$G$1),0). We ran it in Google Sheets mode on the same data and it returns the same results.

Other ways to do it

Each one was run on the same example sheet.

FormulaResultWhen to use it
=MIN($G$2,MAX(0,C2-B2)*$G$1)$0.00, $7.50, $0.00…No IF: MAX(0,…) turns early returns into 0 days, and MIN applies the cap.
=IF(C2>B2,(C2-B2)*$G$1,0)$0.00, $7.50, $0.00…Different resultWithout a cap. R-4 is charged 32.50 instead of the 20 maximum.

Common mistakes

  • Items not yet returned have no return date and show 0. Charge them up to today with IF(C2="",TODAY(),C2) in place of C2.
  • Format the fee column as currency. If it picks up a date format from the date columns, 7.5 shows as a date.

Try it yourself

Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.

Calculate a late fee based on days overdue

In D2, charge the fee in G1 for each day the item came back late, capped at the maximum in G2, and 0 when it wasn't late. Fill down to D6.

Questions

How do I allow a 2-day grace period?

Subtract it from the days late: =MIN($G$2,MAX(0,C2-B2-2)*$G$1).

How do I count only working days late?

Use NETWORKDAYS: =MAX(0,NETWORKDAYS(B2,C2)-1)*$G$1.

Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.