Four hydrogen-bonded formamide-water complexes have been studied by ab initio calculations, two where the amino group acts as a donor and two where the carbonyl oxygen is an acceptor. The results indicate that the effect on the conjugated NCO fragment depends on both the type and the energy of the hydrogen bond formed. Although, in all cases the formation of a hydrogen bond leads to increased conjugation, expressed as a shortening of the CN bond and a corresponding lengthening of the CO bond, there is a significant difference in the effect of the two types of hydrogen bonds. This difference may be explained by changes in the electron populations. In two of the complexes the effect of varying the hydrogen bond length has been studied in some detail. It is found that the effect on the conjugated system depends on the length of the hydrogen bond, and analytical expressions have been found for the variations of the CO and CN bond lengths with changes in the hydrogen bond length. Potential functions for the N-H β O and O-H β O hydrogen bonds have also been derived.