Abstract. We study Cr and Ni isotopes by using Monte Carlo shell model (MCSM) calculations in a p f g 9 d 5 model space. In the MCSM, a wave function is represented as a linear combination of angular-momentum-and parity-projected deformed Slater determinants (MCSM bases) and we can obtain eigenstates in a large model space such as p f g 9 d 5 space. We study intrinsic shapes of nuclei by using deformations of MCSM bases before projection. We show results of MCSM calculations in Cr and Ni isotopes and a level scheme of 68 Ni and discuss the magicity of N = 40 in Cr and Ni isotopes and shape coexistence in 68 Ni.