We analysed archival molecular line data of pre-main sequence (PMS) stars in the Lupus and Taurus star-forming regions obtained with ALMA surveys with an integration time of a few minutes per source. We stacked the data of $^{13}$CO and C$^{18}$O (J = 2-1 & 3-2) and CN (N = 3-2, J = 7/2-5/2) lines to enhance the signal-to-noise ratios, and measured the stellar masses of 45 out of 67 PMS stars from the Keplerian rotation in their circumstellar disks. The measured dynamical stellar masses were compared to the stellar masses estimated from the spectroscopic measurements with seven different stellar evolutionary models. We found that the magnetic model of Feiden (2016) provides the best estimate of the stellar masses in the mass range of $0.6~M_{odot}leq M_{star} leq 1.3~M_{odot}$ with a deviation of $<$0.7$sigma$ from the dynamical masses, while all the other models underestimate the stellar masses in this mass range by 20% to 40%. In the mass range of $<0.6~M_{odot}$, the stellar masses estimated with the magnetic model of Feiden (2016) have a larger deviation ($>2sigma$) from the dynamical masses, and other, non-magnetic stellar evolutionary models of Siess et al. (2000), Baraffe et al. (2015) and Feiden (2016) show better agreements with the dynamical masses with the deviations of 1.4$sigma$ to 1.6$sigma$. Our results show the mass dependence of the accuracy of these stellar evolutionary models.