40 atomic% of what? Oxygen load? That would mean your stoichiometry is C1.5O, that sounds like quite a lot for still calling it "graphite".
Anyway, in that case you need to multiply by the atomic masses, so the mass ratio is C:O=12*1.5:16*1=9:8. So it would be 53 mass% carbon and 47 mass% oxygen.