Operating Cycle
Calculate the operating cycle ratio, an efficiency ratio that measures the average number of days it takes a company to turn its inventory into cash.
The operating cycle represents the total time required to purchase inventory, convert it into finished goods, sell the goods to customers, and collect the accounts receivable. It is calculated by adding the days sales in inventory (DSI) and the days of sales outstanding (DSO).
The formula is as follows:
\[\text{Operating Cycle Ratio} = \text{Days of Sales in Inventory} + \text{Days of Sales Outstanding}\]Also known as: business cycle, cash-to-cash cycle.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Operating Cycle for you. Just ask in plain English.
Calculate the Operating Cycle in Python
The Operating Cycle is available in the Ratios module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_operating_cycle as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
operating_cycle_ratios = toolkit.ratios.get_operating_cycle()
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| AAPL | 30.2698 | 34.6154 | 37.0808 | 41.1785 | 42.8354 |
| TSLA | 57.6159 | 66.8936 | 73.2328 | 73.1301 | 74.6164 |
Parameters
get_operating_cycle accepts the following parameters:
- days (int, optional): The number of days to use for the calculation. Defaults to 365.
- rounding (int, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the ratios. Defaults to False.
- lag (int | str, optional): The lag to use for the growth calculation. Defaults to 1.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
- trailing (int): Defines whether to select a trailing period. E.g. when selecting 4 with quarterly data, the TTM is calculated.
Related Efficiency Ratios
The Ratios module page introduces the module, and the sidebar lists all of its functions.