The temperature at the Earth’s core and the temperature at the surface of the Sun are very similar. We can estimate the Sun’s surface temperature by studying the colour of the surface, together with the continuous spectrum emitted by the Sun. When a piece of metal is heated it starts glowing red, then changes progressively to bluish white as it gets hotter. Similarly, the colour of the Sun’s surface is an indicator of the temperature. Using this information, we can get a reasonable estimate for the surface temperature of around 5,778 Kelvin, or 5,505°C.
The core of the Earth is mainly composed of an alloy of the metals iron and nickel under very high pressure. Scientists can examine the properties of materials such as ion under pressure in the laboratory. Using such methods we can calculate that the temperature at the core is about 5,700K, or, 5,430°C, slightly less than the temperature on the surface of the Sun.
Peter Davidson, Curator of Mineralogy, National Museums Scotland