Cellwise Start free

Excel guide · 4 min read

How to calculate days payable outstanding (DPO) in Excel

Quick answerDPO = accounts payable at the end of the period / purchases in the period x days in the period. From a bill list: =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.

ABCDEFGHIJ
1BillSupplierBill dateAmountDue datePaid onSettingValue
2B-201Millbrook PaperAug 3, 20261850Sep 2, 2026Aug 29, 2026Period startAug 1, 2026
3B-202Coastline FreightAug 11, 2026960Aug 26, 2026Aug 25, 2026Period endOct 31, 2026
4B-203Apex SuppliesAug 19, 20263200Sep 18, 2026Sep 25, 2026DSO from your receivables61
5B-204Millbrook PaperSep 2, 20262100Oct 2, 2026Oct 1, 2026Discount % (2/10 net 30)0.02
6B-205Tri-County PrintSep 10, 20261450Oct 10, 2026Oct 16, 2026Discount days10
7B-206Apex SuppliesSep 22, 20262750Oct 22, 2026Net days30
8B-207Coastline FreightSep 29, 2026880Oct 14, 2026Oct 14, 2026
9B-208Millbrook PaperOct 5, 20261980Nov 4, 2026
10B-209Tri-County PrintOct 13, 20261600Nov 12, 2026
11B-210Apex SuppliesOct 20, 20263400Nov 19, 2026
12B-211Coastline FreightOct 26, 2026920Nov 10, 2026
13B-212Millbrook PaperOct 30, 20262050Nov 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.

=SUMIFS(D2:D13,C2:C13,">="&J2,C2:C13,"<="&J3)

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.

=SUMIFS(D2:D13,F2:F13,"")/SUMIFS(D2:D13,C2:C13,">="&J2,C2:C13,"<="&J3)*(J3-J2+1)

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.

=J4-SUMIFS(D2:D13,F2:F13,"")/SUMIFS(D2:D13,C2:C13,">="&J2,C2:C13,"<="&J3)*(J3-J2+1)

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).

=SUMIFS(D2:D13,F2:F13,"",E2:E13,">"&J3,E2:E13,"<="&J3+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.

=J5/(1-J5)*365/(J7-J6)

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

Related guides

Updated