Number Of Days Cost Of Goods Sold In Inventory (Historical) Formula in Excel

Understanding Number Of Days Cost Of Goods Sold In Inventory (Historical)

The Number Of Days Cost Of Goods Sold In Inventory (Historical) formula in Excel (with MarketXLS) calculates the average number of days a company’s inventory remains in stock based on its cost of goods sold (COGS). This historical fundamental metric helps analysts and investors:

  • Identify how efficiently a company manages its inventory
  • Understand liquidity and operational performance
  • Compare inventory turnover across different periods or companies

? Pro Tip: Use this formula to track changes in inventory management over time (year-over-year, quarter-over-quarter, or on a trailing twelve-month basis) for better insights into trends.

Syntax and Parameters

=hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory(Symbol, Year, [Quarter], [TTM])
Parameter Description Required Example
Symbol The stock or asset ticker symbol. Can be regular stocks (e.g. "MSFT"), indices (e.g. "^SPX"), options (e.g. "@MSFT 110122C00020000"), or crypto pairs (e.g. "BTCUSD:DEFAULT"). The function returns "NA" if the symbol is invalid. Yes "MSFT"
Year The reporting year for which you want data. You can also use special keywords like "ly" (last year) or "lq" (last quarter), optionally with offsets (e.g. "ly-1", "lq-1"). Yes 2022
Quarter The calendar quarter [1, 2, 3, 4], unused if retrieving annual data. Default is "1" if not provided. No 2
TTM If set to "TTM", fetches trailing twelve-month data. Ignored if retrieving annual or specific quarter without TTM. No "TTM"

?? Note: This function returns a numeric value when data is available. Otherwise, it returns "NA."

Return Value

• A numeric value representing the number of days inventory remains based on the cost of goods sold.
• "NA" if the symbol is invalid, the data is unavailable, or in case of connection/subscription issues.

Examples and Usage

Below are common ways to use the function in Excel. Adjust the parameters to suit your specific needs:

  1. Retrieving specific historical data:

    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("MSFT", 2022)

    Returns the value for the year 2022.

  2. Specifying a quarter:

    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("MSFT", 2022, 2)

    Retrieves the value for the year 2022 and calendar quarter 2.

  3. Using trailing twelve months (TTM):

    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("MSFT", 2022, 3, "TTM")

    Returns TTM data from the third quarter of 2022.

  4. Fetching last quarter or last year data:

    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("MSFT", "lq")
    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("MSFT", "ly")

    • "lq" retrieves data for the last reported quarter.
    • "ly" retrieves data for the last reported year.

  5. Offsetting last quarter or last year:

    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("MSFT", "lq-1")
    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("MSFT", "ly-1")

    Provides data for the previous period (one quarter or one year back from the last period).

  6. Using direct date references:

    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory(A1)
    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory("2024-03-15")
    =hf_Number_of_Days_Cost_of_Goods_Sold_in_Inventory(TEXT(A1,"yyyy-mm-dd"))

    You can supply date values via cell references, direct strings, or Excel date functions.

Real-World Applications

  • Compare how different companies manage their inventory over multiple years or quarters.
  • Combine with revenue or cash flow metrics to get a comprehensive view of operational efficiency.

Common Questions

  1. Why does the function return "NA"?

    • Make sure the symbol is valid and your MarketXLS subscription is active. Also check for typos in your parameters.
  2. Does this function work for international or crypto symbols?

    • Yes. Use the appropriate symbol format, such as "BTCUSD:DEFAULT" for crypto or a valid foreign ticker.
  3. How often are the historical fundamentals updated?

    • Historical fundamental data is typically updated quarterly or whenever new filings become available.
  4. What about performance considerations?

    • Each call fetches data from MarketXLS servers, so using many calls in a single worksheet may impact spreadsheet performance. Consider limiting calls or using caching strategies.
  5. Are there related metrics I should check?

    • Yes, MarketXLS provides additional historical metrics like:
      • Revenue (Historical)
      • Cost Of Revenue (Historical)
      • Gross Profit (Historical)
      • R & D Expenses (Historical)
      • Selling General and Administrative Expense (Historical)

? Pro Tip: Combine this formula with other historical fundamental metrics to get a detailed breakdown of the company’s operational efficiency over time.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Number Of Days Cost Of Goods Sold In Inventory (Historical) and Other Financial Formulas
How does MarketXLS work?