The Sun is a G-type main-sequence star (G2V) based on spectral class and it is informally referred to as a yellow dwarf. It formed approximately 4.567 billion years ago from the gravitational collapse of matter within a region of a large molecular cloud. Most of this matter gathered in the center, whereas the rest flattened into an orbiting disk that became the Solar System. The central mass became increasingly hot and dense, eventually initiating nuclear fusion in its core. It is thought that almost all stars form by this process.
The Sun is roughly middle aged and has not changed dramatically for four billion years, and will remain fairly stable for another four billion years. However, after hydrogen fusion in its core has stopped, the Sun will undergo severe changes and become a red giant. It is calculated that the Sun will become sufficiently large to engulf the current orbits of Mercury, Venus, and possibly Earth.
The enormous effect of the Sun on the Earth has been recognized since prehistoric times, and the Sun has been regarded by some cultures as a deity. Earth's movement around the Sun is the basis of the solar calendar, which is the predominant calendar in use today.