Excel guide · 4 min read
How to calculate days payable outstanding (DPO) in Excel
=SUMIFS(D2:D13,F2:F13,"")/SUMIFS(D2:D13,C2:C13,">="&J2,C2:C13,"<="&J3)*(J3-J2+1). Here $12,700 of unpaid bills / $23,140 of purchases x 92 days is about 50 days.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Bill | Supplier | Bill date | Amount | Due date | Paid on | Setting | Value | ||
| 2 | B-201 | Millbrook Paper | Aug 3, 2026 | 1850 | Sep 2, 2026 | Aug 29, 2026 | Period start | Aug 1, 2026 | ||
| 3 | B-202 | Coastline Freight | Aug 11, 2026 | 960 | Aug 26, 2026 | Aug 25, 2026 | Period end | Oct 31, 2026 | ||
| 4 | B-203 | Apex Supplies | Aug 19, 2026 | 3200 | Sep 18, 2026 | Sep 25, 2026 | DSO from your receivables | 61 | ||
| 5 | B-204 | Millbrook Paper | Sep 2, 2026 | 2100 | Oct 2, 2026 | Oct 1, 2026 | Discount % (2/10 net 30) | 0.02 | ||
| 6 | B-205 | Tri-County Print | Sep 10, 2026 | 1450 | Oct 10, 2026 | Oct 16, 2026 | Discount days | 10 | ||
| 7 | B-206 | Apex Supplies | Sep 22, 2026 | 2750 | Oct 22, 2026 | Net days | 30 | |||
| 8 | B-207 | Coastline Freight | Sep 29, 2026 | 880 | Oct 14, 2026 | Oct 14, 2026 | ||||
| 9 | B-208 | Millbrook Paper | Oct 5, 2026 | 1980 | Nov 4, 2026 | |||||
| 10 | B-209 | Tri-County Print | Oct 13, 2026 | 1600 | Nov 12, 2026 | |||||
| 11 | B-210 | Apex Supplies | Oct 20, 2026 | 3400 | Nov 19, 2026 | |||||
| 12 | B-211 | Coastline Freight | Oct 26, 2026 | 920 | Nov 10, 2026 | |||||
| 13 | B-212 | Millbrook Paper | Oct 30, 2026 | 2050 | Nov 29, 2026 |
Download this sheet as an Excel practice file (.xlsx)
Step 1: Purchases in the period
Keep one row per supplier bill: the bill date, the amount, the due date and the date you paid it. Leave Paid on blank while the bill is open. Most accounting tools can export this as an "unpaid bills" or "AP" report; ask for all bills, paid and unpaid, for the period.
With the period start in J2 and the end in J3, SUMIFS adds every bill dated August 1 to October 31: $23,140. Textbook DPO divides by cost of goods sold, which suits businesses that buy stock to resell. For a service business, the bills you buy on credit are the better measure. Pick one and keep it every month.
Result: 23140 shows as $23,140 with Currency format
23140: supplier bills dated August 1 to October 31.
Step 2: Unpaid bills at period end, then DPO
Accounts payable (AP) is what you still owe suppliers: the bills with no paid date, $12,700 here. Days in the period is J3-J2+1 = 92, since subtracting two dates leaves out the first day.
DPO is $12,700 / $23,140 x 92, about 50.5 days. On average you take about 50 days of purchases to pay your suppliers. Compare that with the terms they give you: if most bills are net 30, a DPO of 50 means a lot of bills are paid late or sit near period end.
If you export after the period ends, some bills may be paid by then. They were still owed on October 31, so count them too: add SUMIFS(D2:D13,C2:C13,"<="&J3,F2:F13,">"&J3) to the open total. For October alone, use October's purchases ($9,950) and 31 days: 39.6 days, lower because the quarter's daily purchases are smaller than October's.
Result: 50.492653414
About 50.49: you take about 50 days of purchases to pay suppliers.
DPO next to DSO: the cash gap
DPO on its own says little. Put it next to days sales outstanding (DSO), how long customers take to pay you. The DSO in J4 (61 days) comes from your receivables sheet; the DSO guide shows how to calculate it from an invoice list.
DSO minus DPO is how many days you pay suppliers before customers pay you: 61 - 50.5 is about 10.5 days that your own cash has to cover. A business that holds stock adds days inventory outstanding as well, and the full cash conversion cycle is days inventory + DSO - DPO.
A higher DPO shrinks that gap, which is why it can look good on paper. Getting there by paying late isn't free: late fees, lost discounts and suppliers who stop giving you terms. Read DPO with the overdue count from the next section.
Result: 10.507346586
About 10.51: days between paying suppliers and getting paid by customers.
Bills due this week and next
For planning, the due dates matter more than the average. COUNTIFS and SUMIFS with two conditions on the Due date column find the open bills in a window. From October 31 (J3), the next 7 days hold 1 bill for $1,980 (Millbrook, due November 4). Days 8 to 14 hold 2 bills for $2,520.
For the second week, change the window to ">"&J3+7 and "<="&J3+14. Overdue bills are open ones with a due date on or before the date in J3: one, Apex's $2,750 bill that was due October 22.
In a live sheet, replace J3 with TODAY() so the windows move each day: =SUMIFS(D2:D13,F2:F13,"",E2:E13,">"&TODAY(),E2:E13,"<="&TODAY()+7).
Result: 1980 shows as $1,980 with Currency format
1980: open bills due in the 7 days after October 31.
What a skipped early-payment discount costs
Terms like 2/10 net 30 mean 2% off if you pay within 10 days, otherwise the full amount in 30. Put the discount, the discount days and the net days in input cells (J5:J7) so you can test other terms.
Skipping the discount means you pay 2% more to keep your cash for 20 more days. As a yearly rate that's 2% / 98% x 365 / 20, about 37.2%. Compare it with what your cash or credit line costs you; the sheet shows the number, the choice is yours.
To see a bill's discount deadline, add the discount days to the bill date: =C7+$J$6. On Apex's $2,750 bill the discount would have been $55.
Result: 0.37244897959 shows as 37.2% with Percent format
About 0.3724: the yearly cost of paying on day 30 instead of taking 2% on day 10.
Common mistakes
Dividing by all spending
Payroll, rent paid on the day and card purchases never become supplier bills. Use bills bought on credit (or cost of goods sold) and stick with it.
Dropping bills paid after period end
A bill paid on November 3 was still owed on October 31. Count open bills plus bills paid after the period end date.
Reading a high DPO as good news
Check the overdue count next to it. A DPO well above your supplier terms often means late payments, not better terms.
Mixing a quarterly and a monthly DPO
They use different daily purchases and won't match. Choose one period (often the last 90 days) for the trend.
FAQ
What is the DPO formula in Excel?
=accounts_payable/purchases*days. From a bill list: SUMIFS of unpaid bills, divided by SUMIFS of bills dated in the period, times (end date - start date + 1).
What is the difference between DPO and DSO?
DSO is how long customers take to pay you; DPO is how long you take to pay suppliers. DSO minus DPO is the number of days your own cash covers the gap.
How do I calculate average days to pay my bills?
Average the paid date minus the bill date for paid bills: =AVERAGE(IF(F2:F13<>"",F2:F13-C2:C13)) gives 26.2 days here. Unlike DPO, it ignores bills that are still open.
Is a higher DPO better?
It keeps cash in your account longer, but only up to the terms you agreed. Past that, it's late payment, which can cost fees and supplier trust.
Functions used
SUMIFSAdds with several conditionsCOUNTIFSCounts with several conditionsTODAYToday’s dateAVERAGEMean of numbersIFPicks a result from a test
Related guides
- How to calculate days sales outstanding (DSO) in Excel
- How to calculate cash runway in Excel
- How to calculate due dates and days overdue in Excel
- SUMIFS between two dates in Excel
- Excel formulas cheat sheet: the 25 everyone should know
- How to calculate a moving average in Excel
- How to count colored cells in Excel
Updated