We study the effect of the second virial coefficient on the adiabatic lapse rate of a dry atmosphere. To this end, we compute the corresponding adiabatic curves, the internal energy, and the heat capacity, among other thermodynamic parameters. We apply these results to Earth, Mars, Venus, Titan, and the exoplanet G1 851d, considering three physically relevant virial coefficients in each case: the hard-sphere, van der Waals, and the square-well potential. These examples illustrate under which atmospheric conditions the effect of the second virial coefficient is relevant. Taking the latter into account yields corrections towards the experimental values of the lapse rates of Venus and Titan in some instances.