We derive an algorithm for automatic calculation of
perturbative \beta-functions and anomalous dimensions in any local
quantum field theory with canonical kinetic terms. The infrared
rearrangement is performed by introducing a common mass parameter in
all the propagator denominators. We provide a set of explicit formulae
for all the necessary scalar integrals up to three loops.