Calculation of moles and atoms