In clinical research, parameters required for sample size calculation are usually unknown. A typical approach is to use estimates from some pilot studies as the true parameters in the calculation. This approach, however, does not take into consideration sampling error. Thus, the resulting sample size could be misleading if the sampling error is substantial. As an alternative, we suggest a Bayesian approach with noninformative prior to reflect the uncertainty of the parameters induced by the sampling error. Based on the informative prior and data from pilot samples, the Bayesian estimators based on appropriate loss functions can be obtained. Then, the traditional sample size calculation procedure can be carried out using the Bayesian estimates instead of the frequentist estimates. The results indicate that the sample size obtained using the Bayesian approach differs from the traditional sample size obtained by a constant inflation factor, which is purely determined by the size of the pilot study. An example is given for illustration purposes.