  We find a general formula for the two-loop renormalization counterterms of a
scalar quantum field theory with interactions containing up to two derivatives,
extending 't~Hooft's one-loop result. The method can also be used for theories
with higher derivative interactions, as long as the terms in the Lagrangian
have at most one derivative acting on each field. We show that diagrams with
factorizable topologies do not contribute to the renormalization group
equations. The results in this paper will be combined with the geometric method
in a subsequent paper to obtain the counterterms and renormalization group
equations for the scalar sector of effective field theories (EFT) to two-loop
order.
