Conformational properties and the gauche effect of the two functional groups, hydroxymethyl and methoxymethyl, in hexopyranosides have been studied with nb initio methods using the methyl 2,3,4-trideoxy-alpha-D-glycero-hexopyranoside (1), methyl 2,3,4-trideoxy-beta-D-glycero-hexopyranoside (2), methyl 6-O-methyl-2,3,4-trideoxy-alpha-D-glycero-hexopyranoside (3), and methyl 6-O-methyl-2,3,4-trideoxy-beta-D-glycero-hexopyranoside (4) as models. The geometry of the conformers around the C5-C6 bond for the methyl 2,3,4-trideoxy-D-glycero-hexopyranosides was determined by gradient optimization at the SCF level using the 6-31G*, 6-31+G*, and 6-311++G** basis sets. The optimized geometries were used to calculate the energy of the gauche-trans (gt), trans-gauche (tg), and gauche-gauche (gg) conformers with the 6-31G*:, 6-31+G* 6-31fG**, 6-31G**, 6-311G*, and 6-311++G** basis sets, Electron correlation effects were accounted for at the second-order Moller-Plesset perturbation (MP2) level using the 6-31G* basis set and using the adiabatic connection method (ACM) of density functional theory (DFT) using standard 6-31G*, dzvp, and cc-pvtz basis sets. Solvent effects on the stability of conformers were evaluated using a continuum model. At all levels of theory, 1 and 2 prefer the gauche over the trans conformers around the C5-C6 bond. This preference is due to internal hydrogen bonding which is possible in the gg(sc) and gt(-sc) conformers. Solvent effects decrease this preference by similar to 0.9 kcal/mol. Methylation of the oxygen of the C6 hydroxyl completely reversed the relative energy of conformers, such that in 3 and 4, the trans conformer is favored. The trans preference is decreased by solvent which stabilized the gauche conformers by 0.7-1.3 kcal/mol with respect to the trans. These results suggest that the gauche preference of the hydroxymethyl group in 1 and 2, is due to the presence of hydrogen bonding and not due to the gauche effect.