When calculating the temperature in space, it is important to understand that most estimates must take into account the varied makeup of space. Outer space is usually considered to be the portion of the universe that is almost entirely empty and, from the point of view of Earth, officially begins at an altitude of about 62 miles (100 kilometers) above sea level. In the void between planets, star systems and galaxies, the temperature in space is generally considered to be 2.725 Kelvin which is -454.72°F (-270.4°C). This is only a very small amount above absolute zero, the lowest temperature at which the movement of matter is believed to cease, at -459.67°F (-273.15°C).
When scientists talk about 2.725 Kelvin as the temperature in space, they’re talking about an average temperature — actually, what is called the cosmic background radiation, which is the energy still left over from the Big Bang. Closer to Earth, such as just outside of Pluto’s orbit, the temperature is estimated to be closer to 35 or 40 Kelvin due to the effects of the distant Sun. This is still very cold, but nowhere near as cold as somewhere in deep space, far from any sunlight.
Measuring the temperature in space is more complicated than just using a thermometer, since temperature is only a meaningful figure when heat can be efficiently transferred from one body to another. In space, while the temperature of particles can be very high, their density is very low so the ability to transfer heat is minimal. They could be at millions of degrees in the Kelvin range, but since they so rarely collide with one another, the actual phenomenon of temperature or heat exchange doesn't take place. The temperature in space therefore has to do with the movement and concentration of the molecules, which in turn determines how often they collide with one another to gain or lose energy.
Due to this, the temperature must be determined using Planck's law, which says that every object in the universe emits radiation according to its temperature. By looking at the radiation emitted from space and using this formula, scientists have found that the temperature is about 2.725 K. Different parts of space actually have different temperatures, and the Milky Way galaxy — where the Earth is located — is slightly warmer than many other areas.
It is important to remember that space is actually everywhere and that even human bodies are mostly composed of empty space. So when someone discusses temperatures in any particular region of space, he or she also has to include any objects that appear solid to the naked eye. Other factors that could eventually change experts' view on what the temperature in space is include the effects of dark matter and dark energy, which combined make up 96% of all the known universe.