Your ecommerce stockout rate measures how often demand encounters unavailable inventory. Lost sales estimate the units or revenue you would have earned if that inventory had been available.
Calculate both by SKU, using consistent demand definitions and available-to-sell inventory, rather than warehouse stock alone. The hardest part is capturing demand that never becomes an order, so start by defining exactly what your denominator includes.
Calculate Ecommerce Stockout Frequency by SKU
Use demand occurrences as your denominator
Racklify defines the metric as:
Stockout frequency (%) = (Demand occurrences where the item was unavailable / Total demand occurrences) x 100
A demand occurrence needs a consistent definition, such as a purchase attempt for a specific SKU. Product-page views aren’t automatically demand occurrences because browsing doesn’t establish purchase intent.
Stockout frequency uses the total demand occurrences under your chosen definition as its denominator. Count successful and unsuccessful occurrences within the same period. Deduplicate repeated attempts by the same shopper under your reporting rule.
Apply the order-based formula consistently
Fulfyld uses:
Order-based rate (%) = (Affected orders or attempts / Total orders or attempts) x 100
For SKU reporting, “stockouts” must mean affected orders or order attempts, not warehouse shortage incidents.
Racklify’s example gives SKU A 25 unfulfilled orders out of 1,000 orders:
25 / 1,000 x 100 = 2.5%
If your checkout blocks unavailable products, completed orders exclude many blocked demand attempts. An order-based rate can then understate stockouts unless you capture blocked attempts separately.
For an overall rate, sum affected occurrences and total occurrences across SKUs. Don’t average SKU percentages without weighting their denominators.
Gather the Data and Choose the Reporting Window
Build a SKU-level availability history
Join order lines and inventory events using stable SKU or variant identifiers. Include location, channel, market, timestamps, quantities requested, fulfillment status, cancellations, and actual selling prices.
You also need availability changes, inbound receipts, allocations, active reservations, and stock-related purchase failures. Define sellable inventory consistently, without subtracting the same allocation twice. Historical inventory and availability records support inventory management and can inform a reorder point.
In Shopify, use variant-level order exports and inventory records as starting inputs. In WooCommerce, combine order-line records with inventory-change logs. A current stock snapshot can’t reconstruct historical availability.
Our guidance on inventory reservation rules helps explain how holds affect the quantity shoppers can buy.
Compare equivalent periods and exposure
Use weekly reporting to track stockout frequency for operational action and a rolling 28-day view for trend comparisons. For low-volume SKUs, extend the window and always display occurrence counts beside percentages.
Keep time zones consistent. Also segment by channel and fulfillment location, since inventory in one warehouse may be unavailable to another market.
Track a separate time-based measure:
Unavailable-time rate (%) = Unavailable selling hours / Total eligible selling hours x 100
Exclude prelaunch and discontinued periods. The measure captures how long a SKU is out of stock, but it isn’t interchangeable with demand-based stockouts.
Estimate Lost Units and Revenue During Stockouts
Establish expected demand while unavailable
Start with this SKU-level estimate:
Expected stockout-period units = Comparable in-stock units per hour x Unavailable selling hours
Then calculate:
Estimated unmet units = Expected stockout-period units – Units sold or accepted backorder units during those hours
For example, SKU A is out of stock for 3 comparable days. Its baseline is 15 units per day, and its price is $50. That equals 45 potentially missed units and $2,250 in gross revenue at risk before subtracting units sold or accepted backorder units.
Use comparable in-stock weekdays, campaign conditions, and prices. Calculate the baseline during hours when the product was purchasable, rather than dividing sales by every calendar day.
Otherwise, historical stockouts depress your demand estimate. Hidden products and paused advertising can also reduce traffic during shortages.
Treat the result as an estimate. Where demand varies sharply, report low, central, and high estimates using plausible demand baselines.
Convert unmet demand into lost sales
ShipBob’s simplified formula for stockout cost is:
Unavailable days x Average units sold per day x Price per unit
For SKU A, the calculation is:
3 days x 15 units x $50 = $2,250
This stockout cost is estimated gross revenue at risk, not automatically permanently lost revenue or lost profit. The estimate depends on the in-stock demand baseline, product availability, price, and reporting period.
For net lost sales, subtract attributable revenue recovered through later purchases or substitute products. A substitute can recover store revenue while leaving the original SKU’s sale lost.
SKU lost sales ratio (%) = Estimated net lost revenue / (Actual revenue + Estimated net lost revenue) x 100
The lost sales ratio expresses estimated net lost revenue as a share of actual plus estimated net lost revenue. Compare the lost sales ratio across periods only when SKU scope and reporting windows match.
Sum non-overlapping SKU estimates for annual losses instead of multiplying one unusually bad month by twelve.
For profit impact, calculate contribution margin by SKU using avoided variable costs.
A stockout’s full-price revenue estimate overstates permanent store losses when shoppers buy substitutes or return after replenishment.
Set Benchmarks Without Mixing Different KPIs
Fulfyld suggests keeping demand-occurrence results below roughly 2% to 3%. Treat that as an operating guideline, not a verified universal ecommerce average.
A repeat-purchase essential may need tighter availability than limited-run fashion. Perishables may need looser availability targets because excess inventory can spoil.
These related metrics answer different questions.
| Metric | Practical definition |
|---|---|
| Demand-occurrence frequency | Share of demand occurrences encountering unavailable stock |
| Fill rate | Share of requested units fulfilled immediately |
| Cycle service level | Share of replenishment cycles without a stockout |
| Backorder rate | Share of requested units accepted for delayed fulfillment |
Choose one backorder denominator and retain it consistently. These percentages aren’t automatic complements.
Racklify discusses service level targets between 95% and 99.9%. However, a 95% cycle service level doesn’t imply a 5% demand-based frequency of stockouts.
For normal-distribution inventory models, Fulfyld lists z-scores of 1.28 for 90%, 1.65 for 95%, and 2.33 for 99%. Those values require a compatible uncertainty model, and aren’t availability benchmarks.
Shopify’s safety stock guidance distinguishes extra buffer inventory from the reorder trigger. Higher protection also ties up more cash, so set targets by SKU economics.
Diagnose Physical Shortages and Availability Errors
Weak demand forecasting, supplier or production delays, and poor cash flow can interrupt replenishment and cause stockouts. Lead-time variability and single sourcing increase exposure, while SKU proliferation spreads purchasing budgets across more variants.
Human error and manual counts can make system stock differ from sellable stock. Fulfyld cites a target of 95% to 99%+ for inventory accuracy and this quantity comparison:
Inventory quantity ratio (%) = Counted items / System items x 100
The ratio alone doesn’t measure record accuracy because equal overages and shortages can cancel each other out. Also track the percentage of counted SKU-location records that match the system within a declared tolerance. Use ABC analysis to prioritize records for investigation, and validate inventory records before adjusting a reorder point.
Storefront errors deserve separate investigation. A correct backend quantity can still show an unavailable variant because of location settings, scripts, or regional rules.
Test availability on the product page, in the cart, and at checkout. Reconcile feed status with the selected variant. Missing fit, compatibility, or price information can suppress demand without any physical shortage.
Reduce Stockouts With SKU-Specific Controls
Prioritize inventory management changes by recoverable contribution, not shortage counts alone.
- Rank SKUs by stockout occurrences and estimated lost contribution. Use ABC analysis to test whether roughly 20% of SKUs cause 80% of shortages, then review ABC analysis results before setting priorities. Dependable hero products may need more protection than unreplenishable experiments.
- Set safety stock using demand and supply variability. The basic formula is (Maximum daily usage x Maximum lead time) – (Average daily usage x Average lead time). The Company A example yields 250 units, but that buffer isn’t a default. Set it by SKU economics and review safety stock as conditions change.
- Establish replenishment triggers. Reorder point = Average daily demand x Lead time + safety stock, as explained in this reorder point formula guide. Use the reorder point to trigger orders, and monitor inventory position, supplier reliability, and inbound arrival dates. Address single-supplier exposure and review the safety stock buffer as supply conditions change.
- Reconcile inventory and promotion plans. Cycle-count priority SKUs, resolve synchronization failures, and reduce campaign exposure when inbound stock can’t support demand. Our seasonal assortment planning guide connects SKU depth with replenishment windows and merchandising decisions.
- Keep temporary pages live while products are out of stock, show comparable alternatives, and offer back-in-stock notifications or waitlist CTAs. Harvard Business Review discusses how availability-aware delivery windows can help online retailers manage demand. Measure recovered purchases without counting them twice.
Key Takeaways
- Keep demand-based stockout frequency separate from unavailable time, fill rate, and lost sales.
- Use SKU, channel, and location data with one consistent denominator and reporting window.
- Estimate unavailable-period demand from comparable in-stock periods, then distinguish revenue at risk from recovered sales and lost contribution.
Frequently Asked Questions
What percentage of shoppers switch stores after a stockout?
Harvard Business Review’s Stock-Outs Cause Walkouts discusses consumer responses to shortages. The older retail findings include up to 25% buying nothing and up to 43% visiting another store.
Those figures describe particular retail contexts. They aren’t current, universal ecommerce switching probabilities and shouldn’t become automatic multipliers in your SKU loss model.
Should acquisition and retention costs enter the calculation?
Keep them separate from immediate lost sales. Amasty cites acquisition costs at roughly three times retention costs, but that ratio isn’t a store-specific measurement.
Add longer-term customer effects only when your own cohorts support them. Otherwise, report immediate lost contribution separately from uncertain future customer losses.
Turn Stockout Reporting Into Replenishment Decisions
A useful ecommerce stockout rate starts with a consistent demand denominator. A useful estimate of missed revenue also accounts for comparable demand and recovered purchases.
Keep measured events separate from estimated losses. Then use SKU-level lost contribution from stockouts to prioritize inventory fixes, replenishment changes, and customer recovery paths.


