Factors calculator