Why don't you calculate the integral: T / 2 1/2 ( 1/(2T) * / x (t) dt ) / -T You can approximate this integral with a sum. The T is a multiple of one period.There may be some problems with the root but you could solve this with a lookup table. If you want, you can store a couple of squared x:s and "recycle" them to create a moving rms process (You might need a lot of RAM to store one period of data.) --------------------------- Conny Andersson / LiTH