Ca = 40.08 amu
C = 12.01 amu
O = 16 * 3 = 48 amu
40.08 + 12.01 + 48 = 100.09 total amu
12.01 / 100.09 = 0.1199 * 100 = about 12% C
To find percent composition carbon you do
12.01 amu divided by the total amu of compound times 100..
amu is just the atomic mass number of the element/compound