Factorizing calculation