The a -function is a proposed quantity defined for quantum field theories which has a monotonic behaviour along renormalisation group flows, being related to the β -functions via a gradient flow equation involving a positive definite metric. We construct the a -function at four-loop order for a general gauge theory with fermions and scalars, using only one and two loop β -functions; we are then able to provide a stringent consistency check on the general three-loop gauge β -function. In the case of an N = 1 $$ \mathcal{N}=1 $$ supersymmetric gauge theory, we present a general condition on the chiral field anomalous dimension which guarantees an exact all-orders expression for the a -function; and we verify this up to fifth order (correspond...