Calculate the Period