The sun lies at the heart of the solar system, where it is by far the largest object. It holds 99.8 percent of the solar system's mass and is roughly 109 times the diameter of the Earth — about one million Earths could fit inside the sun. The visible part of the sun is about 10,000 degrees Fahrenheit (5,500 degrees Celsius), while temperatures in the core reach more than 27 million F (15 million C), driven by nuclear reactions. One would need to explode 100 billion tons of dynamite every second to match the energy produced by the sun, according to NASA. The sun has enough nuclear fuel to stay much as it is now for another 5 billion years. After that, it will swell to become a red giant . Eventually, it will shed its outer layers, and the remaining core will collapse to become a white dwarf . Slowly, this will fade, to enter its final phase as a dim, cool theoretical object sometimes known as a black dwarf .