Context : Aims : We calculate Keplerian ( mass shedding ) configurations of rigidly rotating neutron stars and quark stars with crusts . We check the validity of empirical formula for Keplerian frequency , f _ { K } , proposed by Lattimer & Prakash , f _ { K } ( M ) = C ( M / M _ { \odot } ) ^ { 1 / 2 } ( R / 10 ~ { } { km } ) ^ { -3 / 2 } , where M is the ( gravitational ) mass of Keplerian configuration , R is the ( circumferential ) radius of the non-rotating configuration of the same gravitational mass , and C = 1.04 ~ { } kHz . Methods : Numerical calculations are performed using precise 2-D codes based on the multi-domain spectral methods . We use a representative set of equations of state ( EOSs ) of neutron stars and quark stars . Results : We show that the empirical formula for f _ { K } ( M ) holds within a few percent for neutron stars with realistic EOSs , provided 0.5 M _ { \odot } < M < 0.9 M _ { max } ^ { stat } , where M _ { max } ^ { stat } is the maximum allowable mass of non-rotating neutron stars for an EOS , and C = C _ { NS } = 1.08 ~ { } kHz . Similar precision is obtained for quark stars with 0.5 M _ { \odot } < M < 0.9 M _ { max } ^ { stat } . For maximal crust masses we obtain C _ { QS } = 1.15 ~ { } kHz , and the value of C _ { QS } is not very sensitive to the crust mass . All our C ’ s are significantly larger than the analytic value from the relativistic Roche model , C _ { Roche } = 1.00 ~ { } kHz . For 0.5 M _ { \odot } < M < 0.9 M _ { max } ^ { stat } , the equatorial radius of Keplerian configuration of mass M , R _ { K } ( M ) , is , to a very good approximation , proportional to the radius of the non-rotating star of the same mass , R _ { K } ( M ) = a R ( M ) , with a _ { NS } \approx a _ { QS } \approx 1.44 . The value of a _ { QS } is very weakly dependent on the mass of the crust of the quark star . Both a ’ s are smaller than the analytic value a _ { Roche } = 1.5 from the relativistic Roche model . Conclusions :