We propose a method to determine the total magnetic susceptibility of strongly interacting matter by lattice QCD simulations and present numerical results for the theory with two light flavors, which suggest a weak magnetic activity in the confined phase and the emergence of strong paramagnetism in the deconfined, quark-gluon plasma phase.