The moon's surface was formed by the collision of planetesimals up to approximately 100 km in radius. The time required for the addition of the last few kilometers was about 10 5 years. The earth's surface was formed at temperatures below the melting point of lavas. Iron-nickel objects a few kilometers in radius were embedded in the largest planetesimals that fell on the moon. It is shown that the earth may have accumulated much more rapidly than the moon and yet have not been molten. The densities of the planets calculated at zero pressure are not the same, and the chemical composition of Mars is nearly uniform throughout though it contains about 30% of iron-nickel alloy. The elements oxygen in water, nitrogen as ammonium salts or nitrides, and sulfur as iron sulfide were accumulated in condensed form at low temperatures, while carbon was retained at high temperatures as graphite or iron carbide. A two-stage process of accumulation into planetesimals is postulated, the first at low temperatures and the second at high temperatures, both followed by a period during which planetesimals accumulated to form the terrestrial planets. During the high temperature stage a chemical process for the volatilization of silicate while iron remains liquid is possible and it is proposed that these processes account for the varying densities of the planets. The primitive atmosphere of the earth contained water, ammonia, and methane as well as large quantities of hydrogen which escaped. The newly formed moon was much as it is now. The earth had nearly uniform chemical composition. At present the earth has an iron-nickel core and it is postulated that the mantle below the 20° discontinuity has about 25% by weight of iron-nickel alloy. The heat balance of the moon indicates that the interior was formed at low temperatures, < 300°C, if the equatorial bulge of JEFFREYS is real. The heat balance of the earth is attempted but the results are not decisive. The gravitational energy due to the formation of the core during geological time makes it difficult but not impossible to account for a solid earth, if it is added to the radioactive energy. The constants for calculation are uncertain. A changing moment of inertia for the earth due to the continuous formation of the core explains discrepancies between the observed secular accelerations and those required by tidal theory. The mass of the inner core relative to the outer core suggests that solid nickel accumulates at the inner core. Such an accumulation could supply sufficient energy for the maintenance of the earth's magnetic field. Convection currents have been postulated by others as the mechanism for the formation of mountains. It is proposed that an important and probably decisive contribution to the energy arises from the gravitational energy liberated as the core is formed. The moon has no folded mountains and no core has formed. Mars appears to have no mountains, in the opinion of some students at least, and it apparently has no high density core.