A general algorithm for calculating jet cross sections in next-to-leading order (NLO) QCD is presented. The algorithm is based on the subtraction method and uses new factorization formulae, called dipole formulae, which implement both soft and collinear approximations in a Lorentz covariant way. These dipole formulae allow for exact factorization of the phase space, enabling analytic integration of dipole contributions to the cross section. The algorithm provides explicit analytic results for any jet observable in various scattering processes and is straightforwardly implementable in Monte Carlo programs. The method is applicable to processes with no initial-state hadrons, one initial-state hadron, one final-state identified hadron, and two initial-state hadrons. It also handles multi-particle correlations and includes heavy quarks in a general and process-independent manner. The algorithm is based on the factorization properties of soft and collinear emissions, leading to a general subtraction method that can be used for arbitrary NLO QCD calculations. The method is implemented using dipole factorization formulae, which allow for the construction of universal counterterms. The algorithm is applicable to both inclusive and less inclusive cross sections, and it provides a general framework for calculating jet cross sections in various scattering processes. The method is based on the factorization of divergences and the use of dimensional regularization to handle singularities. The algorithm is implemented in a general-purpose Monte Carlo program, allowing for the calculation of jet cross sections in various scattering processes. The method is applicable to both inclusive and exclusive cross sections and provides a general framework for calculating jet cross sections in various scattering processes. The algorithm is based on the factorization of divergences and the use of dimensional regularization to handle singularities. The method is implemented in a general-purpose Monte Carlo program, allowing for the calculation of jet cross sections in various scattering processes.A general algorithm for calculating jet cross sections in next-to-leading order (NLO) QCD is presented. The algorithm is based on the subtraction method and uses new factorization formulae, called dipole formulae, which implement both soft and collinear approximations in a Lorentz covariant way. These dipole formulae allow for exact factorization of the phase space, enabling analytic integration of dipole contributions to the cross section. The algorithm provides explicit analytic results for any jet observable in various scattering processes and is straightforwardly implementable in Monte Carlo programs. The method is applicable to processes with no initial-state hadrons, one initial-state hadron, one final-state identified hadron, and two initial-state hadrons. It also handles multi-particle correlations and includes heavy quarks in a general and process-independent manner. The algorithm is based on the factorization properties of soft and collinear emissions, leading to a general subtraction method that can be used for arbitrary NLO QCD calculations. The method is implemented using dipole factorization formulae, which allow for the construction of universal counterterms. The algorithm is applicable to both inclusive and less inclusive cross sections, and it provides a general framework for calculating jet cross sections in various scattering processes. The method is based on the factorization of divergences and the use of dimensional regularization to handle singularities. The algorithm is implemented in a general-purpose Monte Carlo program, allowing for the calculation of jet cross sections in various scattering processes. The method is applicable to both inclusive and exclusive cross sections and provides a general framework for calculating jet cross sections in various scattering processes. The algorithm is based on the factorization of divergences and the use of dimensional regularization to handle singularities. The method is implemented in a general-purpose Monte Carlo program, allowing for the calculation of jet cross sections in various scattering processes.