Based upon the idea of effective number of electrons, we develop simple but accurate correlation energy functionals to be used for density functional theory calculations. We derive both a spin-independent and a spin-dependent functional. The spin-dependent one, used in conjunction with Becke’s exchange functional [A. D. Becke, Phys. Rev. A 38, 3098 (1988)], yields excellent results for thermochemistry calculations, giving an average absolute error of 2.9 kcal/mol for a test set comprised of the enthalpies of formation of the 148 molecules in the extended G2 set [L. A. Curtiss, K. Raghavachari, P. C. Redfern, and J. A. Pople, J. Chem. Phys. 106, 1063 (1997); L. A. Curtiss, P. C. Redfern, K. Raghavachari, and J. A. Pople, ibid. 109, 42 (1998)] plus the total energies of the atoms H through Ar. We also discuss the problem of fractional occupation number, and we show that the corresponding principle of integer preference can be fulfilled by the procedure that we propose to build correlation energy functionals.