The relationship between the three-dimensional structures of oligosaccharides and polysaccharides and their biological properties has been the focus of many recent studies. The overall conformation of an oligosaccharide depends primarily on the orientation of the torsion angles (φ, ψ, and ω) between glycosyl residues. Numerous experimental studies have shown that in glucopyranosides the ω-torsion angle (O6-C6-C5-O5) displays a preference for gauche orientations, in disagreement with predictions based on gas-phase quantum mechanics calculations. In contrast, the ω-angle in galactopyranosides displays a high proportion of the anti-orientation. For oligosaccharides containing glycosidic linkages at the 6-position (1→6 linked), variations in rotamer population have a direct effect on the oligosaccharides' structure and function, and yet the physical origin of these conformational preferences remains unclear. Although it is generally recognized that the gauche effect in carbohydrates is a solvent-dependent phenomenon, the mechanism through which solvent induces the gauche preference is not understood. In the present work, quantum mechanics and solvated molecular dynamics calculations were performed on two representative carbohydrates, methyl α-d-glucopyranoside and methyl α-d-galactopyranoside. We show that correct reproduction of the experimental rotamer distributions about the ω-angles is obtained only after explicit water is included in the molecular dynamics simulations. The primary role of the water appears to be to disrupt the hydrogen bonding within the carbohydrate, thereby allowing the rotamer populations to be determined by internal electronic and steric repulsions between the oxygen atoms. The results reported here provide a quantitative explanation of the conformational behavior of (1→6)-linked carbohydrates.