The elastic tensors of chitin and chitosan allomorphs were calculated using density functional theory (DFT) with and without dispersion correction, and compared with experimental values. The longitudinal Young's moduli were 114.9 GPa or 126.9 GPa for α-chitin depending on hydrogen bond pattern, 129.0 GPa for β-chitin, and 191.5 GPa for chitosan. Furthermore, the moduli were found to vary between 17.0 to 52.8 GPa in the 1 transverse directions, and between 2.2 to 15.2 GPa in shear. Switching off the dispersion correction lead to a decrease in modulus by up to 63%, depending on the direction. The transverse Young's moduli of α-chitin strongly depended on the hydroxylmethyl group conformation coupled with the dispersion correction, suggesting a synergy between hydrogen bonding and dispersion interactions. The calculated longitudinal Young's moduli were in general higher than experimental values obtained in static conditions and Poisson's ratios were lower than experimental values obtained in static conditions.