# Days Sales Outstanding Formula (DSO) and Excel Example

- URL: https://betteranalyst.com/metrics/days-sales-outstanding
- Published: 2026-10-29
- Updated: 2026-10-29
- Author: David Bressler, Founder (https://betteranalyst.com/authors/david-bressler)

> **Summary:** DSO = (Accounts receivable ÷ Credit sales) × Number of days. It estimates how many days, on average, it takes customers to pay. A distributor with $1.402M of receivables at quarter-end and $3.735M of credit sales over the 92-day quarter has a DSO of about 34.5 days.

Category: [Finance](https://betteranalyst.com/metrics#finance)

Calculate days sales outstanding from receivables and credit sales. Quarterly worked example, Excel formula, and why DSO can mislead in growing months.

## Days sales outstanding (DSO) formula

```
DSO = (Ending accounts receivable ÷ Credit sales in the period) × Days in the period
```

- **Ending accounts receivable**: Unpaid customer invoices at the end of the period, from the balance sheet or AR aging report.
- **Credit sales**: Sales made on invoice terms during the period. Exclude cash or card sales paid at the time of purchase.
- **Days in the period**: Calendar days covered by the credit sales figure: 30 or 31 for a month, 90–92 for a quarter, 365 for a year.

## How to calculate days sales outstanding (DSO) in Excel and Google Sheets

Excel, using the cells in the worked example below:

```
=D4/SUM(C2:C4)*SUM(B2:B4)
```

## Worked example

A B2B packaging distributor sells on net-30 terms and wants its Q3 DSO for the monthly cash meeting. Everything it sells is invoiced, so all sales are credit sales.

*Q3 credit sales and month-end receivables (table starts in cell A1)*

| Month | Days | Credit sales | Ending AR |
| --- | --- | --- | --- |
| July | 31 | $1,240,000 | $1,288,000 |
| August | 31 | $1,310,000 | $1,365,000 |
| September | 30 | $1,185,000 | $1,402,000 |

1. Credit sales for the quarter = 1,240,000 + 1,310,000 + 1,185,000 = $3,735,000.
2. Days in the quarter = 31 + 31 + 30 = 92.
3. Ending AR at September 30 = $1,402,000.
4. DSO = 1,402,000 ÷ 3,735,000 × 92 = 34.5 days.
5. September alone: 1,402,000 ÷ 1,185,000 × 30 = 35.5 days. Receivables rose while sales fell, which is the early signal to chase overdue accounts.

**Result:** 34.5 days DSO for Q3

## How to interpret days sales outstanding (DSO)

Compare DSO with your payment terms: on net-30 terms, a DSO in the low-to-mid 30s means most customers pay roughly on time, while a DSO drifting well past 40 means a growing share is paying late. Because DSO divides a point-in-time balance by a flow, it moves with sales volume: a big sales month at period-end raises DSO even if nobody paid late. Pair it with an AR aging report (current, 1–30, 31–60, 61–90, 90+ days past due) to see whether the change is collections or just timing.

## Common mistakes

- Including cash sales in the denominator. That makes DSO look shorter than customers actually take to pay.
- Using total-year sales against a single month-end balance in a seasonal business. Match the sales period to the balance date, or use a countback method month by month.
- Comparing DSO across periods of different length without adjusting the day count (28 vs 31 days changes the result by roughly 10%).
- Reading DSO alone. Write-offs reduce AR and make DSO look better; check bad-debt expense and the aging buckets too.

## Calculate days sales outstanding (DSO) with Better Analyst

Connect your data or upload a spreadsheet, then ask in plain English. Better Analyst writes and runs the calculation and shows the steps, so you can check the number.

- “Calculate monthly DSO for the last 12 months from our invoices and payments tables.”
- “Build an AR aging report with 0–30, 31–60, 61–90 and 90+ day buckets by customer.”
- “Which customers have pushed our DSO up the most this quarter?”

Usually calculated from: [Microsoft SQL Server](https://betteranalyst.com/data-connectors/mssql), [PostgreSQL](https://betteranalyst.com/data-connectors/postgresql), [MySQL](https://betteranalyst.com/data-connectors/mysql), [Snowflake](https://betteranalyst.com/data-connectors/snowflake), [Google Sheets](https://betteranalyst.com/data-connectors/google-sheets), [Google BigQuery](https://betteranalyst.com/data-connectors/bigquery).

[Try Better Analyst free](https://betteranalyst.com/signup)

## Further reading

- [Connect SQL Server](https://betteranalyst.com/data-connectors/mssql)
- [SUMIFS function](https://betteranalyst.com/excel/sumifs-function)
- [DATEDIF for days past due](https://betteranalyst.com/excel/datedif-function)
- [Analyze monthly cash inflows and outflows](https://betteranalyst.com/blog/how-to-analyze-monthly-cash-inflows-and-outflows)
- [Better Analyst for finance teams](https://betteranalyst.com/solutions/finance)

## Frequently asked questions

### What is a good DSO?

Judge DSO against your own payment terms and history. On net-30 terms, a DSO near 30–40 days is typical of customers paying roughly on time; a rising trend matters more than any single reading.

### Should I use average or ending accounts receivable for DSO?

Both are common. Ending AR shows the position today; average AR ((opening + ending) ÷ 2) smooths swings. Pick one, label it, and use it consistently.

### How is DSO different from the AR turnover ratio?

AR turnover = Credit sales ÷ Average AR, the number of times receivables are collected per period. DSO converts that into days: Days in period ÷ AR turnover.

## Related metrics

- [Inventory Turnover Ratio: Formula, Example and Excel Steps](https://betteranalyst.com/metrics/inventory-turnover)
- [Net Profit Margin Formula: Calculate It in Excel (Example)](https://betteranalyst.com/metrics/net-profit-margin)
