Biogenic minerals often contain inorganic and organic impurities that are believed to harden and toughen the material. However, because of the complexity of these systems, it is difficult to deconvolute the effect of each of these impurities on the hardness of the material. We have created single-crystal samples with a range of magnesium concentrations and measured their hardness while controlling for orientation. We find that hardness increases linearly with magnesium content and that magnesium impurities could account for ~20% of the increased hardness in biogenic calcite from the mollusk Atrina rigida when compared with pure geologic calcite.