if you want to work at 50-60 Hz you should sample the signal at the 100-120 Hz. but these restricts are theorical. I realized this projects at speaking frequency with Cypress PSoc.(
www.cypressmicro.com) and in my opinion you should sample the signal at least 200 Hz. (for 50 Hz.) and sample count should be 128 at least.
the RMS calculation C sample code is below
total = 0;
for (i=0; i<SMP_CNT; i++)
{
total += (sample
*sample);
}//for
RMS = sqrt(total / SMP_CNT);