We compare the observational and theoretical spectra of the Delta v = 2 CO bands in a range of M dwarfs. We investigate the dependence of theoretical spectra on effective temperatures as well as carbon abundance. In general we find that the synthetic CO bands fit the observed data extremely well and are excellent diagnostics. In particular the synthetic spectra reasonably match observations and the best fit temperatures are similar to those found by empirical methods. We also examine the 12C/13C isotopic ratio. We find that fundamental 13CO bands around 2.345 and 2.375 mu m are good discriminators for the 12C/13C ratio in M dwarfs. The 2.375 mu m band is more useful because it doesn't suffer such serious contamination by water vapour transitions. Our current dataset does not quite have the wavelength coverage to perform a reliable determination of the 12C/13C ratio in M dwarfs. For this we recommend observing the region 2.31-2.40 mu m at a resolution of better than 1000. Alternatively the observational problems of contamination by water vapour at 2.345 mu m maybe solved by observing at resolutions of around 50 000. We also investigated the possibility of using the Delta v = 1 CO bands around 4.5 mu m. We find that the contamination due to water vapour is even more of a problem at these wavelengths.