ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Logic
  3. Late Fee Formula in Excel: Days Overdue Times a Daily Rate

Late Fee Formula in Excel: Days Overdue Times a Daily Rate

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

A late fee formula in Excel multiplies the days overdue by a daily rate. With the due date in B2, the paid date in C2 and the rate in G1, use =MAX(0,C2-B2)*$G$1. MAX stops early payments from giving a negative fee. Subtract grace days inside the MAX, and wrap the result in MIN to cap the fee at a maximum.

Key takeaways

  • Days overdue is the paid date minus the due date; MAX(0, ...) turns early payments into 0.
  • Multiply days overdue by a daily rate in a locked cell: =MAX(0,C2-B2)*$G$1.
  • Subtract a grace period inside MAX, and use MIN to cap the fee at a maximum amount.
  • For unpaid invoices, use an as-of date (or TODAY in a live file) when the paid date is blank.
On this page+
  1. The example data
  2. Step 1: Count the days overdue
  3. Step 2: Multiply by a daily rate
  4. Add a grace period
  5. Cap the fee with MIN
  6. Late fees on invoices that aren't paid yet
  7. Other late fee structures
  8. Practise it

A late fee formula in Excel works out how many days a payment is late and multiplies that by a daily rate. The core is =MAX(0,C2-B2)*$G$1: paid date minus due date, never below zero, times the fee per day. This guide builds it step by step, then adds a grace period, a maximum fee and unpaid invoices. It is for anyone who tracks invoices, rent or bills in a spreadsheet. The fee amounts are examples only: the real terms come from your contract and the rules where you work, so this guide covers the spreadsheet, not legal advice.

The example data#

The examples use five invoices and a small settings area. Keep the fee settings in their own cells so you can change them without editing formulas:

ABCD
1InvoiceDue datePaid dateAmount
2INV-10130 Sep 202618 Oct 20261,200
3INV-1025 Oct 20263 Oct 2026850
4INV-10310 Oct 202615 Oct 20262,400
5INV-10415 Oct 2026600
6INV-10520 Sep 202630 Oct 20261,500

Settings: G1 daily fee 2.50, G2 grace days 5, G3 maximum fee 50, G4 as-of date 31 Oct 2026. INV-104 has not been paid yet.

Step 1: Count the days overdue#

Excel stores dates as numbers, one per day, so subtracting two dates gives the days between them. To keep early payments at zero, wrap the subtraction in MAX:

Excel formula
=MAX(0,C2-B2)

MAX returns the larger of its numbers. For INV-101, C2-B2 is 18, so MAX returns 18. For INV-102, paid two days early, C3-B3 is -2, and MAX returns 0. The MAX function guide covers the syntax, and the article on days between dates explains DAYS and DATEDIF as other ways to count.

If the result shows as a date such as 18/01/1900, the cell has picked up date formatting. Change it to General or Number on the Home tab.

Check that both columns hold real dates, not text that looks like a date. A real date sits on the right of the cell by default, and =ISNUMBER(B2) returns TRUE for it. Text dates give a #VALUE! error when you subtract them, so convert them with DATEVALUE or Text to Columns first.

Step 2: Multiply by a daily rate#

Multiply the days overdue by the daily fee in G1:

Excel formula
=MAX(0,C2-B2)*$G$1
InvoiceDays overdueLate fee
INV-1011845.00
INV-10200.00
INV-103512.50
INV-10540100.00

The $ signs lock G1, so the formula still points at the fee when you fill it down (Windows: Ctrl+D; Mac: ⌘D). Without them, the row below would look in G2.

You can write the same logic with IF: =IF(C2>B2,(C2-B2)*$G$1,0). It returns the same results; MAX is just shorter. The IF function guide and the article on how the IF function works show more two-outcome tests like this.

Add a grace period#

A grace period is a number of days after the due date when no fee applies. Subtract it inside MAX:

Excel formula
=MAX(0,C2-B2-$G$2)*$G$1

With 5 grace days, INV-101 is charged for 13 days: 32.50. INV-103, paid exactly 5 days late, now pays 0. INV-105 pays for 35 days: 87.50.

Some terms work differently: once the grace period passes, the fee counts from the original due date. For that rule, use IF: =IF(C2-B2>$G$2,(C2-B2)*$G$1,0). Read your terms carefully and pick the formula that matches them.

Cap the fee with MIN#

Wrap the fee in MIN to set a maximum. MIN returns the smaller of its numbers, so the fee can never pass the cap in G3:

Excel formula
=MIN($G$3,MAX(0,C2-B2-$G$2)*$G$1)
InvoiceFee before capFinal fee
INV-10132.5032.50
INV-1030.000.00
INV-10587.5050.00

INV-105's fee of 87.50 is above the cap, so MIN returns 50. The MIN function guide explains the syntax. To set a minimum instead, for example a flat 10 for any late payment, use MAX on the outside.

Late fees on invoices that aren't paid yet#

When the paid date is blank, count up to an as-of date instead. IF chooses which date to use:

Excel formula
=MIN($G$3,MAX(0,IF(C5="",$G$4,C5)-B5-$G$2)*$G$1)

For INV-104, due 15 Oct and still unpaid on 31 Oct, that is 16 days minus 5 grace days, times 2.50: 27.50.

In a live tracker, replace $G$4 with TODAY() so the fee grows each day. In a report you send to someone, a fixed as-of date is safer, because the numbers won't change when the file is opened tomorrow. A bill tracker in Excel uses the same due date and paid date columns, and you can highlight overdue dates with conditional formatting so late items stand out.

Other late fee structures#

Not every fee is a fixed amount per day. Two other common shapes:

Flat fee plus a daily rate. Charge 25 once, then 2.50 per day:

Excel formula
=IF(C2>B2,25+(C2-B2)*$G$1,0)

INV-101 pays 25 + 18 × 2.50 = 70.

A yearly percentage of the amount. Charge a yearly rate, such as 12% in G5, for each day late:

Excel formula
=D2*$G$5/365*MAX(0,C2-B2)

INV-101 pays 1,200 × 12% ÷ 365 × 18 = 7.10 (rounded). Wrap it in ROUND, as in =ROUND(D2*$G$5/365*MAX(0,C2-B2),2), so the fee is in whole cents. Which structure, rate and cap you may use depends on your agreement and local rules. To group unpaid invoices by how late they are, build an aging report in Excel.

Practise it#

Try the exercise on this page: one formula combines the days overdue, the grace period and the cap. Then practise the IF function in a live spreadsheet and practise counting days between dates. Both lessons check your formula the moment you press Enter.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Work out the late fee for INV-101. Click E2 and subtract the due date and the grace days (G2) from the paid date, keep it at 0 or more with MAX, multiply by the daily fee (G1), and cap it at the maximum fee (G3) with MIN. Press Enter.

fx
ABCDEFGH
1
Invoice
Due date
Paid date
Amount
Late fee
Daily fee
2.5
2
INV-101
46295
46313
1200
Grace days
5
3
INV-102
46300
46298
850
Max fee
50
4
INV-103
46305
46310
2400
5
INV-105
46285
46325
1500
6
7
8

Tip: Build it inside out: C2-B2-$G$2 is the chargeable days, MAX(0, ...) stops negatives, multiply by $G$1, then MIN($G$3, ...) applies the cap.

Practise this in a lesson

LessonThe IF functionMake a cell show one result or another depending on a condition, like Pass/Fail or Over/Under budget.LessonDays between dates: DAYS, DATEDIF and TODAYMeasure the gap between two dates in days, months and years, and calculate tenure as of today.Function guideIFLearn Excel's IF function with practical examples: flag budgets, label rows and return blanks. Avoid the classic mistakes and practice live.Function guideMAXFind the largest value in Excel with MAX: top sales, latest dates and the rep behind them. Common mistakes, plus a live exercise to try.Function guideMINUse Excel's MIN to find the lowest price or shortest time, and to cap a value at a limit. Examples, common mistakes and a live exercise.

Frequently asked questions

How do I calculate days overdue in Excel?

+

Subtract the due date from the payment date: =C2-B2. Wrap it in MAX to ignore early payments: =MAX(0,C2-B2). Format the result as a number, not a date.

How do I add a grace period to a late fee formula?

+

Subtract the grace days inside MAX: =MAX(0,C2-B2-$G$2)*$G$1. Payments within the grace period then give 0, and later ones are charged only for the days after it.

How do I cap a late fee at a maximum amount?

+

Wrap the fee in MIN with the cap: =MIN($G$3,MAX(0,C2-B2-$G$2)*$G$1). MIN returns the smaller of the two, so the fee never goes above the cap.

How do I calculate a late fee for an invoice that hasn't been paid yet?

+

Use today's date when the paid date is blank: =MAX(0,IF(C2="",TODAY(),C2)-B2)*$G$1. In a report, an as-of date in a cell instead of TODAY gives results that don't change every day.

Sources

  • MAX function - Microsoft Support
  • MIN function - Microsoft Support
  • IF function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. The example data
  2. Step 1: Count the days overdue
  3. Step 2: Multiply by a daily rate
  4. Add a grace period
  5. Cap the fee with MIN
  6. Late fees on invoices that aren't paid yet
  7. Other late fee structures
  8. Practise it

Keep reading

Dates· 5 min read

Highlight Overdue and Upcoming Dates in Excel

To highlight overdue dates in Excel, select the rows, go to Home > Conditional Formatting > New Rule, choose Use a formula, and enter =AND($C2<>"",$C2<TODAY()), where C holds the due dates. Pick a red fill. For dates due within the next 7 days, add a second rule: =AND($C2>=TODAY(),$C2<=TODAY()+7). The colours update every day.

Logic· 6 min read

The Excel IF Function Explained Simply

The Excel IF function checks a condition and returns one value when it's TRUE and another when it's FALSE. The syntax is =IF(logical_test, value_if_true, value_if_false). For example, =IF(B2>=70,"Pass","Fail") shows Pass for a score of 70 or more and Fail for anything lower. Text results go in double quotes.

Dates· 6 min read

Days Between Two Dates in Excel (and DATEDIF)

To count the days between two dates in Excel, subtract the earlier date from the later one: =C2-B2. DAYS does the same with the end date first: =DAYS(C2,B2). For whole months or years, use DATEDIF with the start date first and a unit in quotes, like =DATEDIF(B2,C2,"Y").

More on logic

  • Nested IF in Excel: Grades, Bands and Tiers
  • Pass/Fail Formula in Excel With IF
  • Status Formula in Excel: Overdue, Due Soon or Done
  • The SWITCH Function in Excel (Turn Codes Into Labels)
  • TRUE and FALSE in Excel: What They Mean in Formulas
  • XOR Function in Excel: Exactly One Condition True
All logic articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free