Frequency Calculation Formula