Drilling mud should be properly designed to build an effective filter cake on the formation face during the drilling process. This filter cake should be removable to allow the oil and gas production. The need for removal increases when the liftoff pressure is high or when the formation drawdown is extremely low. An effective filter cake removal design includes the knowledge of the filter cake composition along the horizontal section. This paper, for the first time, introduces material balance model to predict the composition of the filter cake along the length of the lateral of an actual horizontal well drilled in a sandstone formation. The model is based on the material balance of two sources of solids: the first one is the drilling fluid solids and the second one is the drilled-formation solids. The mud used to drill the rock was contaminated by the drilled-formation solids. The parameters used to construct the model were composition of the mud and formation, efficiency of each separation stage, rate of penetration (ROP), and mud circulation rate. The model was validated with actual mud samples collected from different locations along the horizontal section of a sandstone formation. The model showed that the sand content in the filter cake is affected by ROP, rock composition, mud composition and volume, and efficiency of sand separation equipment. We came up with several correlations that can be used to design the drilling fluid operations in horizontal well to avoid the formation of irremovable filter cake.