Terrestrial planets (Mercury, Venus, Earth, and Mars) are differentiated into three layers: a metallic core, a silicate shell (mantle and crust), and a volatile envelope of gases, ices, and, for the Earth, liquid water. Each layer has different dominant elements (e.g., increasing iron content with depth and increasing oxygen content to the surface). Chondrites, the building blocks of the terrestrial planets, have mass and atomic proportions of oxygen, iron, magnesium, and silicon totaling ≥ 90% and variable Mg/Si (∼ 25%), Fe/Si (factor of ≥2), and Fe/O (factor of ≥ 3). What remains an unknown is to what degree did physical processes during nebular disk accretion versus those during post-nebular disk accretion (e.g., impact erosion) influence these planets final bulk compositions. Here we predict terrestrial planet compositions and show that their core mass fractions and uncompressed densities correlate with their heliocentric distance, and follow a simple model of the magnetic field strength in the protoplanetary disk. Our model assesses the distribution of iron in terms of increasing oxidation state, aerodynamics, and a decreasing magnetic field strength outward from the Sun, leading to decreasing core size of the terrestrial planets with radial distance. This distribution enhances habitability in our solar system and may be equally applicable to exoplanetary systems.