Every second, the sun converts about 600 million tons of hydrogen into helium, and it has been doing this faithfully for 4.6 billion years. It feels eternal. But the sun is a star, and stars are not forever. One day the furnace will run low on fuel, and when it does, our calm yellow sun will go through a violent, beautiful transformation that reshapes the entire solar system.
The short answer
In roughly 5 billion years, the sun will exhaust the hydrogen in its core. It will then swell into an enormous red giant, large enough to swallow Mercury and Venus and scorch the Earth. After shrugging off its outer layers into a glowing cloud, it will collapse into a white dwarf, an Earth-sized ember that slowly cools for trillions of years. The sun won't explode; it will fade.
The real explanation
A star is a constant tug-of-war. Gravity is forever trying to crush it inward, while the nuclear fusion in its core pushes outward with equal force. As long as the sun is fusing hydrogen into helium, those forces stay balanced and the sun holds steady. This stable middle age is called the main sequence, and the sun is about halfway through it.
The trouble begins when the core runs out of hydrogen. With the outward push faltering, gravity wins and the core contracts and heats up. That extra heat ignites a shell of hydrogen around the core, and paradoxically, this makes the sun's outer layers balloon outward. The sun bloats into a red giant, hundreds of times its current diameter. Its surface cools to a deep red even as its core blazes hotter than ever.
A red giant is monstrous. The sun will likely expand past the orbit of Mercury, then Venus, swallowing both. Earth's fate is on a knife's edge: the sun may reach our orbit, or our planet may be spared by a hair. It hardly matters for life, though. Long before the sun becomes a red giant, in only about a billion years, it will have brightened enough to boil away Earth's oceans and end life as we know it. The sun's "death" sterilizes our world long before its final act.
The grand finale
Inside the red giant, the core keeps contracting and heating until it's hot enough to fuse helium into carbon and oxygen. This buys the sun a little more time, but it's the last gasp. The sun isn't heavy enough to fuse those heavier elements any further. (That takes a much more massive star, and those end in the spectacular explosions called supernovae, which is a different story.)
With fusion finally sputtering out, the sun becomes unstable. It pulses and heaves, casting off its bloated outer layers into space in gentle waves. Those expanding shells of gas, lit from within by the dying core, form one of the most beautiful objects in the cosmos: a planetary nebula, a luminous, ghostly bubble glowing in greens, blues, and reds. (Confusingly, planetary nebulae have nothing to do with planets; early astronomers just thought they looked like fuzzy planets through small telescopes.)
The nebula glows for only a few tens of thousands of years, an eyeblink in cosmic time, before drifting apart and seeding the galaxy with the carbon, oxygen, and other elements the sun manufactured. Some of that enriched gas will one day help build new stars and new planets. In a very real sense, the death of one sun is the raw material for the next.
What's left behind
At the center of that fading nebula sits the sun's exposed core: a white dwarf. It's roughly the size of Earth but holds nearly half the sun's original mass, crushed so tightly that a single teaspoon of it would weigh several tons. No fusion happens inside it anymore. It simply glows with leftover heat, like a coal pulled from a fire, slowly cooling over billions and then trillions of years. Eventually, far longer than the current age of the universe, it will fade to a cold, dark black dwarf. The cosmos is so young that not a single black dwarf has had time to form yet.
The part that'll stay with you
The atoms in your body, the carbon in your cells, the oxygen you breathe, the iron in your blood, were forged inside stars that lived and died before the sun was born. When the sun eventually scatters its own elements across space, it will be passing the torch exactly as earlier stars passed it to us. You are made of dead stars, and the sun's death will help make whatever comes next. Stardust, returning to stardust, building again.
The bottom line
The sun will die in about 5 billion years, not with an explosion but a slow, dramatic transformation: a swelling red giant that devours the inner planets, a glowing planetary nebula that returns its elements to the galaxy, and a fading white dwarf ember at the center. We're watching a middle-aged star, with a long life still ahead, and an ending that will be the beginning of something new.
Keep wondering: the sun is too small to leave behind a black hole, but the biggest stars do, so how do black holes die? And just how much cosmos is out there for all these stars to live in? See how big the universe is.

