DSO formula: how to calculate days sales outstanding
The DSO formula worked through one quarter: ending vs average receivables, the countback method, best possible DSO and the input mistakes that distort it.
Supreet Gupta, Co-founder
· 10 min read

On this page
- What is the days sales outstanding formula?
- How to calculate days sales outstanding, step by step
- Step 1: Pick the period and count its days
- Step 2: Total the credit sales for that period
- Step 3: Take the receivables balance
- Step 4: Divide, then multiply by the days
- A worked DSO calculation for one quarter
- Should you use ending or average receivables?
- What is the countback method for DSO?
- Annualised DSO vs period DSO
- Watch out for: one quarter of sales over 365 days
- What is best possible DSO?
- What counts as credit sales in the DSO formula?
- How is DSO different from AR days?
- Which mistakes distort a DSO calculation?
- Seasonality: renewals that bunch into one quarter
- Unapplied cash: deposits nobody has matched
- What is a good DSO?
- Before you report DSO: a short check
The DSO formula is DSO = (accounts receivable ÷ credit sales in the period) × days in the period. The answer is how many days of credit sales are still unpaid. For example, $300,000 of receivables against $900,000 of credit sales in a 90-day quarter gives a DSO of 30 days.
What is the days sales outstanding formula?
The days sales outstanding formula divides what customers still owe you by what you sold them on credit, then scales the result to the length of the period. The DSO glossary entry has the short definition. The rest of this page covers the choices behind each input, because they move the answer more than the arithmetic does.
DSO = (accounts receivable ÷ credit sales in the period) × days in the period
- Accounts receivable: the open balance on invoices you've sent and customers haven't paid, taken at period end or averaged across the period. See accounts receivable.
- Credit sales: what you invoiced on payment terms during the same period, less credit notes.
- Days in the period: the calendar days those credit sales cover: 28 to 31 for a month, 90 to 92 for a quarter, 365 for a year.
Another way to read it: credit sales ÷ days is your average credit sales per day, and DSO is how many of those days are sitting in receivables.
How to calculate days sales outstanding, step by step
To calculate days sales outstanding, pick a period, total its credit sales, take the receivables balance for the same period, then divide and multiply by the days. Each step has one choice that changes the result, so write the choice down and make the same one every month.
Step 1: Pick the period and count its days
Use a month, a quarter or a trailing 12 months, and count the real days: July to September is 92 days, not 90. What goes wrong here is mixing periods, such as one quarter of sales with 365 days.
Step 2: Total the credit sales for that period
Add up the invoices raised on credit terms in the period and subtract the credit notes issued against them. Leave out sales a customer paid by card at checkout, since those never became receivables.
Step 3: Take the receivables balance
Use the open balance on sent invoices at period end, or an average of balances across the period. Pull it from the same ledger as the sales figure, after the period's deposits have been matched to invoices.
Step 4: Divide, then multiply by the days
Divide receivables by credit sales and multiply by the days from step 1. One decimal place is enough; the inputs aren't precise enough to support more.
A worked DSO calculation for one quarter
Example: Lattice API, an invented API company, bills its customers on net 30 terms. Here are its numbers for July to September, a 92-day quarter.
| Month | Credit sales | Receivables at month end |
|---|---|---|
| June (opening balance) | $520,000 | |
| July | $400,000 | $560,000 |
| August | $450,000 | $610,000 |
| September | $500,000 | $680,000 |
| Quarter total | $1,350,000 |
With the ending balance, DSO = ($680,000 ÷ $1,350,000) × 92 = 46.3 days.
The same quarter gives a different answer under each common method:
| Method | Receivables used | Calculation | DSO |
|---|---|---|---|
| Ending balance | $680,000 | ($680,000 ÷ $1,350,000) × 92 | 46.3 days |
| Average of opening and closing | ($520,000 + $680,000) ÷ 2 = $600,000 | ($600,000 ÷ $1,350,000) × 92 | 40.9 days |
| Average of three month ends | ($560,000 + $610,000 + $680,000) ÷ 3 = $616,667 | ($616,667 ÷ $1,350,000) × 92 | 42.0 days |
| Countback | $680,000 against September, then August | 30 + ($180,000 ÷ $450,000 × 31) | 42.4 days |
More than five days separate the highest and lowest result, and none of them is wrong. Lattice API's sales grew every month, so the September balance is heavy with September's invoices, while the denominator also includes a quieter July. Pick one method and name it on the report, so next month's figure is comparable.
Should you use ending or average receivables?
Use ending receivables when you want DSO to tie to the balance sheet and your billing is steady. Use an average when billing is lumpy or growing, because a single day's balance can be unusually high or low.
The Credit Research Foundation, a US association for credit professionals, averages three month-end balances in the definitions for its quarterly receivables survey: the last three month-end receivable balances × 30, divided by the quarter's credit sales. That's the third row of the table above, with 30 standing in for the days in each month.
An average of only the opening and closing balance is the easiest to get from two balance sheets, but it ignores the months in between. If you have month-end balances, use them.
What is the countback method for DSO?
The countback method works backwards from the latest month: it takes each month's credit sales away from the receivables balance until the balance runs out, and adds up the days used. Because it reads recent sales first, growth or a seasonal spike doesn't distort it the way an average does.
For Lattice API on 30 September:
- Start with receivables of $680,000.
- September's credit sales were $500,000. They fit inside the balance, so count all 30 days and carry $180,000 back.
- August's credit sales were $450,000. The remaining $180,000 covers 40% of them, so count 0.4 × 31 = 12.4 days.
- Countback DSO = 30 + 12.4 = 42.4 days.
According to CFGI's 2025 paper Demystifying DSO, the standard calculation "eliminates sales linearity and payment terms", and the countback method is how you check whether uneven sales are the issue. Countback earns its keep when billing swings, for example when annual renewals bunch into one quarter. On flat sales it lands close to the simple formula.
Annualised DSO vs period DSO
Annualised DSO divides receivables by a year of credit sales and multiplies by 365. Period DSO uses one month or quarter of credit sales and that period's days. Both are correct as long as the sales and the days cover the same span.
For Lattice API, with $4,800,000 of credit sales over the trailing 12 months:
- Period DSO for the quarter: ($680,000 ÷ $1,350,000) × 92 = 46.3 days.
- Annualised DSO on the trailing 12 months: ($680,000 ÷ $4,800,000) × 365 = 51.7 days.
- Quarterly sales over 365 days, which is wrong: ($680,000 ÷ $1,350,000) × 365 = 183.9 days.
The trailing figure is higher because a growing company's older months were smaller, which pulls average daily sales down. Use period DSO to track collections month to month, and annualised DSO for year-end reporting or for comparing with published accounts.
Watch out for: one quarter of sales over 365 days
A quarter's credit sales set against 365 days makes DSO about four times too large. If a business on 30-day terms gets a DSO near 180 days, check the period before anything else.
What is best possible DSO?
Best possible DSO is the DSO you'd have if every customer paid exactly on the due date. It counts only receivables that aren't due yet, so the gap between it and your actual DSO is the part caused by late payment.
Best possible DSO = (current receivables ÷ credit sales in the period) × days in the period. Current receivables are invoices not yet past their due date.
The Credit Research Foundation's survey definitions describe current trade receivables as the "portion of domestic open accounts and notes not yet due", and its best possible DSO uses the same three-month averaging as its DSO.
On 30 September, $430,000 of Lattice API's $680,000 isn't due yet:
- Best possible DSO = ($430,000 ÷ $1,350,000) × 92 = 29.3 days.
- Days added by late payment = 46.3 − 29.3 = 17.0 days, from the $250,000 that is overdue.
On net 30 terms, a best possible DSO of 29.3 days says the terms are working. The other 17 days are collections work, such as reminders that went out late or deposits nobody has matched.
What counts as credit sales in the DSO formula?
Credit sales are the invoices you raised on payment terms in the period, after credit notes. Cash sales stay out, because a sale paid at checkout never sits in receivables.
| Count in credit sales | Leave out |
|---|---|
| Subscription, usage and overage invoices on terms | Card payments taken at signup or checkout |
| One-time fees invoiced on terms | Prepaid credit bought by card |
| Tax charged on the invoice, if your receivables include it | Invoices still in draft |
| Less: [credit notes](/glossary/credit-note/) against the period's invoices | Revenue recognised this period from invoices billed earlier |
Two of these choices matter most for B2B SaaS teams.
Use billings, not recognised revenue. Say Lattice API invoices a customer $120,000 in July for a year upfront. The quarter's billings include $120,000, but its revenue includes only $30,000. Receivables come from invoices, so divide by invoices. Billed and recognised are rarely the same number, and the difference sits in deferred revenue.
Treat tax the same on both sides. Receivables include the tax you charged, but revenue in your accounts doesn't. The Credit Research Foundation's survey definitions tell members to report credit sales as actual billings including taxes, rather than the sales shown in the accounting records. In India, if your invoices carry 18% GST, receivables of ₹1,18,00,000 against quarterly revenue of ₹3,00,00,000 over 90 days give 35.4 days. Like for like, it's (₹1,00,00,000 ÷ ₹3,00,00,000) × 90 = 30 days. US sales tax, where your invoices carry it, has the same effect at a lower rate.
How is DSO different from AR days?
For most finance teams, DSO and AR days are two names for one number, and so are days sales in accounts receivable and debtor days. Where people do separate them, AR days is often worked out as 365 ÷ the receivables turnover ratio, or on total revenue instead of credit sales. The two only differ when their inputs do.
The AR days formula works one quarter both ways and splits the gap between the two results by cause.
Indian teams on Tally see the same measure under another label. TallyPrime's Ratio Analysis help describes Recv. Turnover in days as the balance outstanding in relation to the total sales made, multiplied by the number of days in the period. If some of your sales in Tally are cash sales, that figure will come out lower than a DSO on credit sales alone.
Which mistakes distort a DSO calculation?
Most wrong DSO figures come from the inputs. Starting from Lattice API's 46.3 days, here's what each common mistake does to the number.
| Mistake | What it does to Lattice API's DSO | Fix |
|---|---|---|
| $150,000 of card payments at checkout counted as credit sales | Falls to 41.7 days: ($680,000 ÷ $1,500,000) × 92 | Count only invoices on terms |
| One $300,000 annual invoice raised on 30 September, due in 30 days | Rises to 54.6 days: ($980,000 ÷ $1,650,000) × 92 | Check best possible DSO: it rises to 40.7 days, so the jump is timing |
| A $40,000 deposit received on 29 September but not matched | Shows 46.3 days when the true figure is 43.6: ($640,000 ÷ $1,350,000) × 92 | Match deposits before you run the number |
| A quarter full of annual renewals compared with one without | Swings with the billing calendar | Compare the same quarter year on year, or use a rolling average |
Seasonality: renewals that bunch into one quarter
When annual renewals bunch into one quarter, that quarter's DSO jumps and the next one falls. Allianz Research's 2026 global DSO report uses "a four-quarter rolling average rather than year-over-year to smooth accounting distortions such as window-dressing" across its sample of listed companies. A rolling average does the same job for one company.
Unapplied cash: deposits nobody has matched
A payment that has reached the bank but hasn't been tied to an invoice is an unmatched deposit, and the invoice it paid still counts as open until someone matches it. Sonic's Bank reconciliation agent matches bank deposits to invoices and queues unclear ones for a person, so a paid invoice stops counting in receivables. The bank reconciliation matching guide covers partial and combined payments.
What is a good DSO?
A good DSO is close to your payment terms and close to your best possible DSO. On net 30 terms, a DSO in the low 30s means customers pay about on time. Lattice API's 46.3 days means they pay about 17 days late on average.
To bring the number down stage by stage, see how to improve days sales outstanding.
DSO tells you little when most revenue is paid upfront by card, or when a few large invoices make up most of the balance. In those cases, read the ageing of open invoices and how long individual invoices took to pay.
Before you report DSO: a short check
- Credit sales and days cover the same period.
- Credit sales are invoices on terms, net of credit notes, with card payments at checkout left out.
- Tax is in both numbers or in neither.
- The period's deposits are matched, so paid invoices aren't counted as open.
- The method (ending, average or countback) is the one you used last month, and it's written on the report.
- Any unusually large invoice raised near period end is noted next to the number.
Then run it: DSO = (accounts receivable ÷ credit sales in the period) × days in the period.

Written by
Supreet Gupta
Co-founder, Sonic AI · LinkedIn
Supreet is a Cofounder at Sonic AI. Before starting Sonic, Supreet was a Product Manager at SaaS Labs (Sequoia funded Series B startup) where he worked with enterprises in US and Europe to deliver communication solutions. He completed his bachelors from IIT Bombay.


