While the partition function for QCD in a magnetic field $H$ has been calculated before within chiral perturbation theory up to two-loop order, our investigation relies on an alternative representation for the Bose functions which allows for a clear-cut expansion of thermodynamic quantities in the chiral limit. We first focus on the pion-pion interaction in the pressure and show that -- depending on magnetic field strength, temperature and pion mass -- it may be attractive or repulsive. We then analyze the thermodynamic properties in the chiral limit and provide explicit two-loop representations for the pressure in the weak magnetic field limit $|qH| ll T^2$.