Inventory Turnover Ratio
Calculate the inventory turnover ratio, an efficiency ratio that measures how quickly a company sells its inventory.
The inventory turnover ratio is calculated by dividing the cost of goods sold (COGS) by the average inventory value. It indicates how many times a company’s inventory is sold and replaced over a period. A higher inventory turnover ratio suggests that a company is effectively managing its inventory by quickly converting it into sales.
The formula is as follows:
\[\text{Inventory Turnover Ratio} = \text{Cost of Goods Sold} / \text{Average Inventory}\]Also known as: stock turnover ratio.
Inventory Turnover Ratio in Python
get_inventory_turnover_ratio is part of the Ratios module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_inventory_turnover_ratio as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
inventory_turnover_ratios = toolkit.ratios.get_inventory_turnover_ratio()
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| AAPL | 40.0303 | 38.7899 | 37.9777 | 30.8955 | 33.9834 |
| TSLA | 8.1593 | 6.5185 | 5.9787 | 6.2582 | 6.3692 |
Parameters
get_inventory_turnover_ratio accepts the following parameters:
- 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.