The temperature in space depends on various factors such as distance from a star or other cosmic event, whether a point in space is in direct light or shade, and if it is subject to a solar flare or solar wind. The baseline temperature of outer space, as set by the background radiation from the Big Bang, is 2.7 kelvins (-270°C; -455°F) . However, this temperature is not constant throughout the universe. The temperature of outer space is measured in terms of the kinetic activity of the gas, as it is on Earth. The gas temperatures in outer space can vary widely. For example, the temperature in the Boomerang Nebula is 1 K, while the solar corona reaches temperatures over 1.2–2.6 million K.
In a truly empty region of space, there would be no particles and radiation, meaning there’s also no temperature. However, space is full of particles and radiation to produce heat and a temperature. Far away from stars, particles are so spread out that heat transfer via anything but radiation is impossible, meaning temperatures radically drop. This region is called the interstellar medium. The coldest and densest molecular gas clouds in the interstellar medium can have temperatures of 10 K (-505 ⁰F/-263 ⁰C) while less dense clouds can have temperatures as high as 100 K (-279 ⁰F/-173 ⁰C) .
Therefore, the temperature in space is not a fixed value, but rather depends on various factors and can vary widely.