To calculate the exact timing of purchasing