We explore the similarity and difference of the quasi-periodic pulsations (QPPs) observed in the decay phase of solar and stellar flares at X-rays. We identified 42 solar flares with pronounced QPPs, observed with the Reuven Ramaty High-Energy Solar Spectroscopic Imager (RHESSI) and 36 stellar flares with QPPs, observed with X-ray Multi Mirror Newton observatory (XMM-Newton). The Empirical Mode Decomposition (EMD) method and least-square fit by a damped sine function were applied to obtain the periods (P ) and damping times (τ ) of the QPPs. We found that (1) the periods and damping times of the stellar QPPs are 16.21±15.86 min and 27.21±28.73 min, while those of the solar QPPs are 0.90±0.56 and 1.53±1.10 min, respectively. (2) The ratio of the damping times to the periods (τ /P ) observed in the stellar QPPs (1.69±0.56) are statistically identical to those of solar QPPs (1.74±0.77). (3) The scalings of the QPP damping time with the period are well described by the power law in both solar and stellar cases. The power indices of the solar and stellar QPPs are 0.96±0.10 and 0.98±0.05, respectively. This scaling is consistent with the scalings found for standing slow magnetoacoustic and kink modes in solar coronal loops. Thus, we propose that the underlying mechanism responsible for the stellar QPPs is the natural magnetohydrodynamic oscillations in the flaring or adjacent coronal loops, as in the case of solar flares.