Residual flow in shallow water plays a key role in determining the net exchange of salt, water, and other biologically and chemically important materials in the water including nutrients and pollutants. Due to the coupled interaction among possible driving factors, there is not any well-accepted method to quantify the contribution of each factor to the residual flow. Therefore, the dynamics of residual flow in many coastal seas remain unclear. In this study, we propose a new method to quantify the contribution of each driving force to the total residual flow. Several numerical experiments are designed to estimate the effect of this method.