The chemical influence in the phase separation phenomenon that occurs in perovskite manganites is discussed by means of ab initio calculations. Supercells have been used to simulate a phase separated state, that occurs at Ca concentrations close to the localized to itinerant crossover. We have first considered a model with two types of magnetic ordering coexisting within the same compound. This is not stable. However, a non-isotropic distribution of chemical dopants is found to be the ground state. This leads to regions in the system with different effective concentrations, that would always accompany the magnetic phase separation at the same nanometric scale, with hole-rich regions being more ferromagnetic in character and hole-poor regions being in the antiferromagnetic region of the phase diagram, as long as the system is close to a phase crossover.