Calculate the days payables outstanding, an efficiency ratio that measures the number of days it takes a company to pay its suppliers.

The days payables outstanding (DPO) ratio is used to assess how efficiently a company manages its accounts payable. It calculates the average number of days it takes for a company to pay its suppliers after receiving an invoice. A higher DPO ratio indicates that the company is taking longer to pay its suppliers, which may have implications for its relationships with suppliers.

The formula is as follows:

\[\text{Days Payables Outstanding} = (\text{Average Accounts Payable} / \text{Cost of Goods Sold}) \cdot \text{Days}\]

Also known as: DPO, days payable outstanding.

Days of Accounts Payable Outstanding in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_days_of_accounts_payable_outstanding as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["GM", "F", "TSLA"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.ratios.get_days_of_accounts_payable_outstanding()

Or, after setting up the Finance Toolkit MCP, ask:

How many days did General Motors, Ford and Tesla take to pay their suppliers from 2021 to 2025?

Which returns:

  2021 2022 2023 2024 2025
F 72.7319 65.8213 61.9989 56.6067 55.4167
GM 72.691 69.371 71.0554 63.4048 54.8851
TSLA 72.951 76.1207 68.4805 61.1935 60.6784

Parameters

get_days_of_accounts_payable_outstanding accepts the following parameters.

ParameterTypeDescriptionExample
daysint | floatThe 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
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the ratios. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
compoundboolWhether 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
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
trailingintThe 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
Share