The relative formula mass (RFM) is simply just a sum of the atomic masses that make up the compound in question.
Ca = 40
C = 12
O = 16
RFM of CaCO3 = 40 + 12 + (16 x 3) = 100
Note we have three oxygens so we need to multiply the atomic mass by three before adding the mass of calcium and carbon.