Numerical experiments are performed to examine the effects of line shape and band structure on the radiative equilibrium temperature profile in planetary atmospheres. In order to accurately determine these effects, a method for calculating radiative terms is developed which avoids the usual approximations. It differs from the more commonly used methods in that it allows arbitrary dependence of the absorption coefficient on wave number, without requiring tedious line by line integration and without the constraints of band models. The present formulation is restricted to homogeneous atmospheres but the concept can be extended to the more general case. The numerical experiments reveal that the line shape and band structure of the absorbing gases have a large effect on temperatures in the higher layers of the atmosphere (corresponding to the stratosphere and mesosphere). The more nongrey the spectrum (that is, the higher the peaks and the deeper the troughs in the spectrum), the lower the temperature.