The algorithms for mapping carbonates from Compact Reconnaissance Imaging Spectrometer for Mars (CRISM) data use the depths of the diagnostic carbonate absorption features at ∼2.3 μm and ∼2.5 μm. However, because the band depths are estimated using fixed shoulder wavelengths, subtle shifts in band centres caused by different cations in the carbonates could result in false negatives for carbonates or false positives for other minerals that have absorption features in a similar wavelength range (eg. phyllosilicates, zeolites). This paper proposes a new algorithm that is based on the following attributes of carbonate spectra in the 2.0 to 3.0 μm range: (1) presence of two diagnostic overtones features around ∼2.3 μm and ∼2.5 μm; however, these features may show red shift or blue shift depending on the nature of cation(s); (2) the inter band gap between ∼2.3 μm and ∼2.5 μm carbonate absorption features, which remains relatively constant at ∼0.2 μm, even if there is a shift in the absorption features; (3) the contiguity of these two features, that is, carbonate spectra do not show any absorption features in between the above two features. The algorithm also includes a novel geometric continuum removal technique for locating the absorption features. The effectiveness of the algorithm is demonstrated using laboratory spectra, CRISM machine learning toolkit's mineral dataset, as well as CRISM images. The true positive rate (TPR), true negative rate (TNR) and overall accuracy for the method over the CRISM machine learning toolkit's mineral dataset are 29%, 87% and 83%, respectively.