A negative ion or anion is an electrically charged atom or group of atoms that are formed by gaining one or more electrons. Whereas a positive ion or cation is an electrically charged atom or group of atoms that are formed by losing one or more electrons.
The losing and gaining all occurs on the outermost shell.
Atomic mass Calcium = 40.078 a.m.u
40.078 g ---------------- 6.02x10²³ atoms
165 g -------------------- ??
165 x ( 6.02x10²³) / 40.078 => 2.47x10²⁴ atoms
hope this helps!