Uncertainty analysis is considered to be a necessary step in the process of vessel traffic risk assessment. The purpose of this study is to propose the uncertainty analysis algorithm which can be used to investigate the reliability of the risk assessment result. Probability and possibility distributions are used to quantify the two types of uncertainty identified in the risk assessment process. In addition, the algorithm for appropriate time window selection is chosen by considering the uncertainty of vessel traffic accident occurrence and the variation trend of the vessel traffic risk caused by maritime rules becoming operative. Vessel traffic accident data from the United Kingdom's marine accident investigation branch are used for the case study. Based on a comparison with the common method of estimating the vessel traffic risk and the algorithm for uncertainty quantification without considering the time window selection, the availability of the proposed algorithms is verified, which can provide guidance for vessel traffic risk management.