Days of Sales Outstanding
Calculate the days of sales outstanding ratio, an efficiency ratio that measures the average number of days it takes a company to collect payment on its credit sales.
The days of sales outstanding (DSO) ratio is calculated by dividing the average accounts receivable by revenue and then multiplying by the number of days in the period. It represents the average number of days it takes for a company to collect payment on its sales. A lower DSO indicates that the company is collecting payments more quickly. Revenue stands in for credit sales, which companies rarely disclose, so for a business that also sells for cash the DSO understates how long its credit customers take to pay.
The formula is as follows:
\[\text{Days of Sales Outstanding Ratio} = (\text{Average Accounts Receivable} / \text{Revenue}) \cdot \text{Days}\]DSO is read against the payment terms a company offers and against its own history: a rising DSO, with receivables growing faster than revenue, often points to looser credit terms, slower-paying customers or revenue booked ahead of collection. Compare it within an industry, since terms differ widely between retailers, who collect within days, and industrial or software suppliers.
Also known as: DSO, days sales outstanding, receivable days.
Days of Sales Outstanding in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_days_of_sales_outstanding as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["HON", "EMR", "ETN"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.ratios.get_days_of_sales_outstanding()
Or, after setting up the Finance Toolkit MCP, ask:
How many days did Honeywell, Emerson Electric and Eaton take to collect payment from their customers from 2021 to 2025?
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| EMR | 81.4702 | 69.1713 | 57.5119 | 56.8095 | 61.0629 |
| ETN | 57.6565 | 64.8406 | 67.277 | 66.7118 | 66.5293 |
| HON | 72.4704 | 73.4302 | 82.7661 | 80.6865 | 75.2577 |
Parameters
get_days_of_sales_outstanding accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
days | int | float | The number of days in the window the flows cover. Defaults to None, which uses 365 for annual data and 365 / 4 for quarterly data, multiplied by trailing when set (e.g. 365 for quarterly data with trailing=4). | 360 |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the ratios. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
compound | bool | Whether the growth is the compound annual growth rate over the lag (e.g. lag=5 for the five-year CAGR) instead of the total change. Defaults to False. | False |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
trailing | int | The number of periods to sum flows (income and cash flow statement items) over, with balance sheet items averaged over the same number of period ends. E.g. 4 with quarterly data gives the trailing twelve months (TTM) and 3 with annual data a three-year cumulative figure. Defaults to None, which uses single-period flows (per quarter and not annualized with quarterly data). | 4 |