The potential energy surfaces for the different configurations of the d-erythrose and d-threose (open-chain, ?- and ?-furanoses) have been studied in order to find the most stable structures in the gas phase. For that purpose, a large number of initial structures were explored at B3LYP/6-31G(d) level. All the minima obtained at this level were compared and duplicates removed. A further reoptimization of the remaining structures was carried out at B3LYP/6-311++G(d,p) level. We characterized 174 and 170 minima for the open-chain structures of d-erythrose and d-threose, respectively, with relative energies that range over an interval of just over 50 kJ/mol. In the case of the furanose configurations, the number of minima is smaller by approximately one to two dozen. G3B3 calculations on the most stable minima indicate that the ?-furanose configuration is the most stable for both d-erythrose and d-threose. The intramolecular interactions of the minima have been analyzed with the Atoms in Molecules (AIM) and Natural Bond Orbital (NBO) methodologies. Hydrogen bonds were classified as 1-2, 1-3 or 1-4, based on the number of C-C bonds (1, 2 and 3, respectively) that separate the two moieties participating in the hydrogen bond. In general, the AIM and NBO methodologies agree in the designation of the moieties involved in hydrogen bond interactions, except in a few cases associated to 1-2 contact which have small OH?O angles.