The atomic number of calcium is 20, which means it has 20 protons in its nucleus. Since atoms are electrically neutral, the number of electrons is also 20.
The number of neutrons can be calculated by subtracting the number of protons from the mass number (40). This results in 40 - 20 = 20 neutrons.