The Sun is the star at the center of the Solar System. The Earth and other matter (including other planets, asteroids, meteoroids, comets, and dust) orbit the Sun, which by itself accounts for about 99.86% of the Solar System's mass. The mean distance of the Sun from the Earth is approximately 149.6 million kilometers (93.0 million miles), and its light travels this distance in 8 minutes and 19 seconds. This distance varies throughout the year from a minimum of 147.1 million kilometers (91.4 million miles) on the perihelion (around 3 January), to a maximum of 152.1 million kilometers (94.5 million miles) on the aphelion (around 4 July). Energy from the Sun, in the form of sunlight, supports almost all life on Earth via photosynthesis, and drives the Earth's climate and weather. The Sun consists of hydrogen (about 74% of its mass, or 92% of its volume), helium (about 24% of mass, 7% of volume), and trace quantities of other elements, including iron, nickel, oxygen, silicon, sulfur, magnesium, carbon, neon, calcium, and chromium.
The Sun has a spectral class of G2V. G2 means that it has a surface temperature of approximately 5,780 K (5,510 °C) giving it a white color, which often appears as yellow when seen from the surface of the Earth because of atmospheric scattering. It is this scattering of light at the blue end of the spectrum that gives the surrounding sky its color. The Sun's spectrum contains lines of ionized and neutral metals as well as very weak hydrogen lines. The V (Roman five) in the spectral class indicates that the Sun, like most stars, is a main sequence star. This means that it generates its energy by nuclear fusion of hydrogen nuclei into helium. There are more than 100 million G2 class stars in our galaxy. Once regarded as a small and relatively insignificant star, the Sun is now known to be brighter than 85% of the stars in the galaxy, most of which are red dwarfs.
The Sun's hot corona continuously expands in space creating the solar wind, a hypersonic stream of charged particles that extends to the heliopause at roughly 100 AU. The bubble in the interstellar medium formed by the solar wind, the heliosphere, is the largest continuous structure in the Solar System.
The Sun is currently traveling through the Local Interstellar Cloud in the low-density Local Bubble zone of diffuse high-temperature gas, in the inner rim of the Orion Arm of the Milky Way Galaxy, between the larger Perseus and Sagittarius arms of the galaxy. Of the 50 nearest stellar systems within 17 light-years (1.6×1014 km) from the Earth, the Sun ranks 4th in mass as a fourth magnitude star (M = +4.83)., although slightly different values for the magnitude have been published, for example 4.85 and 4.81. The Sun orbits the center of the Milky Way galaxy at a distance of approximately 24,000–26,000 light years from the galactic center, moving generally in the direction of Cygnus and completing one revolution in about 225–250 million years (one Galactic year). Its orbital speed was thought to be 220 ± 20, km/s but a new estimate gives 251 km/s. Since our galaxy is moving with respect to the cosmic microwave background radiation (CMB) in the direction of Hydra with a speed of 550 km/s, the sun's resultant velocity with respect to the CMB is about 370 km/s in the direction of Crater or Leo.