Introduction Longitudinal study designs are common in a lot of scientific researches, especially in medical, social and economic sciences. The reason is that longitudinal studies allow researchers to measure changes of each individual over time and often have higher statistical power than cross-sectional studies. Choosing an appropriate sample size is a crucial step in a successful study. A study with insufficient sample size may have a small statistical power to detect significant effects and may lead to incorrect answers to many important research questions. On the other hand, a study with more than what a sample size should be wastes the resources and budget. In longitudinal studies, because of the complexity of the design of experiment, including the selection of the number of individuals and the number of repeated measurements, the sample size determination is less studied. This paper uses a simulation-based method to determine the sample size from a Bayesian perspective. For this purpose several Bayesian criteria of sample size determination for a longitudinal study using marginal model are used. Most of the methods of determining the sample size are based on creation of one hypothesis. In this paper, in addition to using this method, we also present a method to determine the sample size for multiple hypothesis testing. Using several examples the proposed Bayesian methods are discussed. ...