Development of the accurate models for hourly energy use in commercial buildings has important ramifications for (I) retrofit savings analysis, (ii) diagnostics, (iii) on-line control and (iv) acquiring physical insights into the operating patterns of the buildings. Electric and thermal energy uses in commercial buildings, being strongly periodic, are eminently suitable for Fourier series analysis. Earlier studies assumed trigonometric polynomials with the hour of the day as the primary variable and one week as the period. This model, though suitable on the whole, was poor during certain weekday periods and during weekends. This paper presents a generalized Fourier series approach which, while ensuring a wider range of applicability, also yields superior regression fits partly because of the care taken to separate days of the year during which commercial buildings are operated differently and partly because of the rational functional form of regression model proposed. The validity of the approach is verified with year-long data of twenty-two monitored buildings.