Inventory
analyses/inventory.md

Inventory

How Kleio estimates days left of stock and inventory status.

Overview

The Inventory page helps you answer the questions that matter for stock management: Do we need to reorder anything? When should we reorder? Are we sitting on too much stock that we should liquidate? Which products should we push harder in marketing?

The key metrics are Days Left of Stock — a forecast that combines historical sales patterns, recent trends, and year-over-year growth to estimate how long each product will last — and Inventory Status, which translates that forecast into actionable categories like Restock Now, Healthy, or Overstocked.

Days Left of Stock

This number answers: “At the rate we expect to sell this product, how many days until we run out?”

Kleio uses up to two signals and blends them together when both are available.

Seasonal signal

The best predictor of future demand is what happened during the same period last year. Kleio looks at how many units sold in the upcoming 90-day window last year and adjusts by the product’s growth factor to account for how the business has changed since then. If there isn’t enough last-year data for a product, Kleio falls back to momentum only.

Momentum signal

The momentum signal captures recent performance. Kleio blends sales velocity across multiple time windows — from the last 7 days up to a full year — weighting recent days more heavily. This means it reacts quickly when a product starts selling faster or slower, while still being anchored by longer-term demand. A product in a brief seasonal lull won’t be written off if it sold well over the year.

Blending

When both signals are available, Kleio blends them: 70% seasonal, 30% momentum. The seasonal component provides the big-picture demand pattern (e.g. swimwear picks up in spring) while momentum acts as a reality check against what’s actually happening right now.

When neither signal is available (no recent sales and no last-year data), the column shows , meaning there’s no evidence the product will sell out.

Growth Factor

The growth factor adjusts last year’s seasonal data to reflect how the business has changed. Kleio calculates this per product by comparing units sold over the past year to the same period the year before. A product that sold twice as many units as the year before gets a 2.0x growth factor, meaning its seasonal forecast doubles. Using a full year for this comparison ensures seasonal products aren’t penalized during their off-season.

If a product has no data from two years ago to compare against (e.g. a newer product), Kleio falls back to a store-wide growth factor.

Growth factors are clamped between 0.25x and 3.0x to prevent extreme outliers from distorting forecasts.

Inventory Status

Each product gets a colored status badge based on its days left of stock relative to its lead time:

  • Sold Out — zero inventory and the product sold in the last 90 days.
  • Restock Now — fewer days of stock left than it takes to get new stock (lead time + 7-day safety buffer). Order immediately to avoid selling out.
  • Restock Soon — stock will last beyond the current lead time window but not much longer (lead time + 21 days). Start planning your reorder.
  • Healthy — stock levels are in a comfortable range.
  • Overstocked — more than lead time + 90 days of stock. Consider running promotions or reducing future orders.
  • Severely Overstocked — more than lead time + 180 days of stock. Capital is tied up in excess inventory.

Lead Time

Lead time is the number of days it takes to receive new stock after placing an order with your supplier. You can set lead time per variant in the inventory table. Kleio uses lead time to determine when stock levels become critical — a product with a 30-day lead time needs to trigger a reorder much earlier than one with a 3-day lead time.

When data is grouped by e.g. product, the longest lead time among the product’s variants is used for status calculations.