What is safety stock?
Extra inventory kept beyond expected demand to protect against surprises in demand or in delivery times.
Safety stock diagram example
Safety stock is the extra inventory a business holds on top of what it expects to sell, so that uncertainty in demand or supply does not cause a stockout. It is a deliberate buffer, and it has a price: money tied up in goods, storage and the risk that goods go out of date. Setting its size is a balance between the cost of holding stock and the cost of running out.
How it works
The buffer must cover the variation in demand during the lead time, not the average. A common formula is safety stock = z x sigma x the square root of the lead time, where sigma is the standard deviation of demand per period and z is a number chosen from the service level wanted, about 1.65 for 95%. More variable demand, a longer lead time or a higher service level all raise the buffer.
The trade-off is that each extra step in service level costs more than the last. Going from 95% to 99% needs a z of about 2.33 instead of 1.65, so the buffer grows by about 40% for a gain of four points in availability.
Example
Say a pharmacy sells 20 boxes of a medicine a day with a standard deviation of 5, and replenishment takes 4 days. The standard deviation over the lead time is 5 x the square root of 4 = 10 boxes. For a 95% service level, safety stock is 1.65 x 10 = about 17 boxes. For 99% it is 2.33 x 10 = about 23 boxes. The extra 6 boxes buy 4 more points of availability. The numbers are an illustration.
How to model it in Machinations
Model the stock as a Pool filled by a Source through a Delay for the lead time and emptied by a Drain whose rate varies randomly around average demand. Add a Register that holds the safety stock and feeds the reorder rule through a state connection. Make the buffer size a Lever. Play many times at once and chart the share of Plays in which the Pool reaches zero.
See safety stock in a system you can Play
Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.