The correlated-k-distribution (CKD) method is widely used in the radiative transfer schemes of atmospheric models; it involves dividing the spectrum into a number of bands and then reordering the gaseous absorption coefficients within each one. The fluxes and heating rates for each band may then be computed by discretizing the reordered spectrum into O(10) quadrature points per major gas and performing a pseudomonochromatic radiation calculation for each point. In this paper it is first argued that for clear-sky longwave calculations, sufficient accuracy for most applications can be achieved without the need for bands: reordering may be performed on the entire longwave spectrum. The resulting full-spectrum correlated-k (FSCK) method requires significantly fewer pseudomonochromatic calculations than standard CKD to achieve a given accuracy. The concept is first demonstrated by comparing with line-by-line calculations for an atmosphere containing only water vapor, in which it is shown that the accuracy of heating rate calculations improves approximately in proportion to the square of the number of quadrature points. For more than around 20 points, the root-mean-square error flattens out at around 0.015 K day 21 due to the imperfect rank correlation of absorption spectra at different pressures in the profile. The spectral overlap of m different gases is treated by considering an m-dimensional hypercube where each axis corresponds to the reordered spectrum of one of the gases. This hypercube is then divided up into a number of volumes, each approximated by a single quadrature point, such that the total number of quadrature points is slightly fewer than the sum of the number that would be required to treat each of the gases separately. The gaseous absorptions for each quadrature point are optimized such that they minimize a cost function expressing the deviation of the heating rates and fluxes calculated by the FSCK method from line-by-line calculations for a number of training profiles. This approach is validated for atmospheres containing water vapor, carbon dioxide, and ozone, in which it is found that in the troposphere and most of the stratosphere, heating rate errors of less than 0.2 K day 21 can be achieved using a total of 23 quadrature points, decreasing to less than 0.1 K day 21 for 32 quadrature points. It would be relatively straightforward to extend the method to include other gases.