What Is Stockout Cost?
Stockout cost is the financial impact of a product being unavailable when customers want to buy it. It includes lost gross profit during the shortage and may also include wasted advertising, customer churn, and slower organic-search recovery after the item is back in stock.
For an e-commerce store, a stockout can cost more than the sales missed on the day inventory runs out. A customer may switch to a competitor, and paid ads may continue sending shoppers to an unavailable product. Treat the result as an estimate: churn and SEO effects depend on customer behavior, traffic, and how long recovery takes.
Stockout Cost Formulas
Lost profit during a stockout
Lost Profit = Average Daily Units × Selling Price × Gross Margin × Stockout Days
Wasted advertising spend
Wasted Ad Spend = Daily Ad Spend × Stockout Days
Estimated customer churn exposure
Estimated Churn Cost = Affected Customers × Customer Churn Rate × Customer Lifetime Value
If you do not know how many customers are affected, a rough proxy is daily units sold multiplied by stockout days. This assumes one unit per customer; adjust for repeat orders or multi-unit purchases.
SEO recovery exposure
Estimated SEO Loss = Daily Units × Organic Traffic Percentage × Selling Price
× Gross Margin × Rank Recovery Days
This estimates lost gross profit while organic traffic recovers after restocking; it is not a direct measurement of ranking changes.
Prevention ROI
Prevention ROI = ((Avoided Stockout Cost − Prevention Cost) ÷ Prevention Cost) × 100
Use gross profit—not revenue—when comparing the prevention cost with direct lost sales. Churn estimates based on revenue lifetime value and lost sales may overlap, so do not add every component as though each were a separate, certain loss.
How to Use This Calculator
- Average Daily Units — Enter the product’s average units sold per day when it is in stock. Use a representative period rather than a short promotion.
- Selling Price and Gross Margin — Enter the per-unit selling price and gross margin percentage. Gross margin is the share of sales revenue left after the product’s cost of goods.
- Stockout Days and Stockouts Per Year — Estimate the duration of one shortage and how many separate events occur in a typical year.
- Customer Churn Rate, CLV, and Substitute Rate — Enter the estimated share who will not return, customer lifetime value, and share likely to buy from a competitor. Use your own retention data if available; industry estimates are only starting points.
- Ad Spend Daily — Enter daily advertising spend that continues to drive traffic to this product during a stockout.
- Organic Traffic Pct and Rank Recovery Days — Estimate the product’s organic-search traffic share and the days you expect traffic to take to recover after restocking.
The calculator uses these assumptions to estimate per-event and annual exposure. For prevention decisions, compare the estimate with the cost of safety stock, expedited freight, or another inventory measure.
Step-by-Step Example
Suppose a Shopify store stocks a candle that sells 18 units per day at $45, with a 60% gross margin. The product is unavailable for 10 days; the estimates below use the calculator’s default assumptions.
| Cost component | Calculation | Estimate |
|---|---|---|
| Lost gross profit | 18 × $45 × 0.60 × 10 | $4,860 |
| Wasted ad spend | $50 × 10 | $500 |
| Estimated churn exposure | 18 × 10 × 0.25 × $180 | $8,100 |
| SEO recovery exposure | 18 × 0.40 × 14 × $45 × 0.60 | $2,721.60 |
The first two figures estimate direct stockout-period costs. Churn exposure uses units as a proxy for affected customers and CLV as revenue, so it can overstate lost profit; SEO recovery is a separate estimate after restocking. Do not treat the sum as a guaranteed loss if the customer and traffic groups overlap.
Interpreting the Estimate
Stockout risk is most urgent when a product sells quickly, has a strong contribution margin, or depends heavily on paid and organic traffic. The U.S. Census Bureau publishes retail sales and inventory data that can help merchants compare broader inventory trends by sector, but sector-level figures cannot predict an individual product’s stockout cost.
Use the Reorder Point Calculator to estimate when to reorder, then use the Safety Stock Calculator to test how much buffer inventory could reduce the risk. The U.S. Small Business Administration’s guidance on managing business finances also covers the role of tracking cash flow and expenses when planning inventory purchases.
| Product type | Stockout exposure to examine | Useful comparison |
|---|---|---|
| Everyday consumables | Repeat purchases and customer switching | Reorder frequency and supplier lead time |
| Seasonal products | Short selling window and delayed replenishment | Remaining season demand versus available stock |
| Trend-driven apparel | Rapid demand changes and missed campaign sales | Sell-through and aging inventory |
| Replacement parts | Urgency and limited substitutes | Backorder options and service commitments |
These are planning categories, not universal industry loss rates. Compare your own product’s sales velocity, lead-time variability, and inventory carrying cost; the Inventory Turnover Calculator can help assess whether additional stock would tie up too much cash.
6 Tips to Reduce Stockout Costs
- Test a higher reorder buffer: change lead-time demand from 80 units to 100 in your inventory plan and check whether the extra holding cost is smaller than the expected stockout exposure.
- Pause ads when inventory is nearly gone: set a Shopify Flow alert for low inventory, then pause or reduce campaigns in Google Ads and Meta Ads before they keep sending shoppers to unavailable items.
- Offer a back-in-stock option: use Shopify’s back-in-stock notification feature or an app such as Back in Stock to capture demand instead of leaving shoppers without a next step.
- Show alternatives on the product page: if a color or size is unavailable, direct shoppers to an in-stock variant or related item; track whether the substitute converts rather than assuming every shopper leaves.
- Compare suppliers by lead-time reliability: change your planning assumption from the quoted lead time to the actual average and range from recent purchase orders. A longer but reliable lead time may be easier to buffer than a shorter, volatile one.
- Review slow-moving inventory before adding safety stock: test a smaller purchase quantity for low-velocity products and compare the cash tied up with the stockout risk. The Economic Order Quantity Calculator can help compare ordering and holding costs.
Frequently Asked Questions
How do you calculate the cost of a stockout?
Stockout cost estimates combine lost gross profit, advertising spend during the shortage, customer churn, and possible SEO recovery losses. Calculate direct lost profit as daily units × selling price × gross margin × stockout days; estimate churn using affected customers × churn rate × CLV. The estimates can overlap, and CLV stated as revenue is not the same as lost profit.
How much revenue do stockouts cost e-commerce businesses?
Retail estimates often put stockout-related losses around 4–8% of annual revenue, but the figure varies by category, measurement method, and how losses are defined. For a $500,000 store, that range equals $20,000–$40,000; use it only as a broad comparison, not a forecast for your store.
Do stockouts affect SEO rankings?
An out-of-stock product can lose visibility or clicks, especially if its listing or product page becomes unavailable, but ranking changes are not automatic or guaranteed. Google’s product structured data guidance explains how to communicate product availability; keeping a useful page live and showing accurate availability can preserve a better customer experience than deleting it.
What percentage of customers leave after a stockout?
Estimates commonly put the share of affected customers who do not return at 15–40%, while 30–50% may buy from a competitor, but rates vary with product uniqueness, loyalty, and available alternatives. Track returning-customer behavior in your own store and offer a back-in-stock date or notification signup to retain shoppers.
Is safety stock worth the holding cost?
It is worth considering when the expected cost of shortages exceeds the annual cost of holding the extra units. Compare safety-stock carrying cost with avoided lost gross profit and other defensible costs, then test different buffer levels with the Safety Stock Calculator.
About This Calculator
The Stockout Cost Calculator was built by Luis Dev Studio for Shopify merchants estimating the direct and indirect effects of inventory shortages. For help applying the results to your store, explore our services or contact us.
Updated by Luis Gonzalez · Oct 19, 2026