The electronic configuration of calcium is 2, 8, 8, 2. Being metal calcium loses 2 electrons to complete its octet. These two electrons are then gained by oxygen (2, 6) to complete its octet. Since transfer of electrons is taking place between calcium and oxygen, therefore, the bond formed is ionic.