Heparan sulphate, a highly negatively charged glycosaminoglycan, participates in a number of biological processes. The molecular basis of heparin sulphate-protein interactions in solution has been analysed by biophysical methods, mainly by NMR spectroscopy and molecular modelling. Theoretical analysis is thus an important part of our understanding of biological properties of heparan sulphate and heparan sulphate oligosaccharides. In the present contribution, results of calculations using density functional theory (DFT) methods are discussed. Geometry optimizations, evaluating explicit solvent molecules, were performed by B3LYP/6-311++G** and M05-2X/6-311++G** methods. Optimized molecular geometries showed considerable influences of counterions (Na+ and Ca2+) upon pyranose rings and the glycosidic linkage conformations in heparin suphate disaccharides, tetrasaccharides and pentsaccharide. Theoretical DFT results were found in a good agreement with experimental NMR data.