Context : Aims : We characterize individual and ensemble properties of X-ray flares from stars in the Cygnus OB2 and ONC star-forming regions . Methods : We analyzed X-ray lightcurves of 1003 Cygnus OB2 sources observed with Chandra for 100 ksec and of 1616 ONC sources detected in the “ Chandra Orion Ultra-deep Project ” 850 ksec observation . We employed a binning-free maximum likelihood method to segment the light-curves into intervals of constants signal and identified flares on the basis of both the amplitude and the time-derivative of the source luminosity . We then derived and compared the flare frequency and energy distribution of Cygnus OB2 and ONC sources . The effect of the length of the observation on these results was investigated by repeating the statistical analysis on five 100 ksec-long segments extracted from the ONC data . Results : We detected 147 and 954 flares from the Cygnus OB2 and ONC sources , respectively . The flares in Cygnus OB2 have decay times ranging from \lesssim 0.5 to about 10 hours . The flare energy distributions of all considered flare samples are described at high energies well by a power law with index \alpha =- ( 2.1 \pm 0.1 ) . At low energies , the distributions flatten , probably because of detection incompleteness . We derived average flare frequencies as a function of flare energy . The flare frequency is seen to depend on the source ’ s intrinsic X-ray luminosity , but its determination is affected by the length of the observation . The slope of the high-energy tail of the energy distribution is , however , affected little . A comparison of Cygnus OB2 and ONC sources , accounting for observational biases , shows that the two populations , known to have similar X-ray emission levels , have very similar flare activity . Conclusions : Studies of flare activity are only comparable if performed consistently and taking the observation length into account . Flaring activity does not vary appreciably between the age of the ONC ( \sim 1 Myr ) and that of Cygnus OB2 ( \sim 2 Myr ) . The slope of the distribution of flare energies is consistent with the micro-flare explanation of the coronal heating .