Calculate Period