To calculate the energy performance of buildings, one must know the heat-transfer characteristics of the windows as functions of environmental variables, such as temperature and wind speed. Window designs are becoming more complex in response to the need for energy conservation. In this paper, we develop a general procedure for calculating the net energy flux through the glazed area of a window composed of an arbitrary number of solid layers. These layers, which may have thin-film coatings, can have any specified solar and thermal radiation properties and enclosed spaces between solid layers can contain either air or other gases. We verified our results by comparing them with experimental measurements of heat flow using a calibrated hot-box.