Don't panic, but our planet is doomed. It's just going to take a while. Roughly 6 billion years from now, the Earth will probably be vaporized when the dying Sun expands into a red giant and engulfs our planet.

But the Earth is just one planet in the solar system, the Sun is just one of hundreds of billions of stars in the galaxy, and there are hundreds of billions of galaxies in the observable universe. What's in store for all of that? How does the universe end?

The science is much less settled on how that will happen. We're not even sure if the universe will come to a firm, defined end, or just slowly tail off. Our best understanding of physics suggests there are several options for the universal apocalypse. It also offers some hints on how we might, just maybe, survive it.

Our first clue to the end of the universe comes from thermodynamics, the study of heat. Thermodynamics is the wild-eyed street preacher of physics, bearing a cardboard placard with a simple warning: "THE HEAT DEATH IS COMING".

The heat death is far worse than being burnt to a crisp

Despite the name, the heat death of the universe isn't a fiery inferno. Instead, it's the death of all differences in heat.

This may not sound scary, but the heat death is far worse than being burnt to a crisp. That's because nearly everything in everyday life requires some kind of temperature difference, either directly or indirectly.

For instance, your car runs because it's hotter inside its engine than outside. Your computer runs on electricity from the local power plant, which probably works by heating water and using that to power a turbine. And you run on food, which exists thanks to the enormous temperature difference between the Sun and the rest of the universe.

However, once the universe reaches heat death, everything everywhere will be the same temperature. That means nothing interesting will ever happen again.

Heat death looked like the only possible way the universe could end

Every star will die, nearly all matter will decay, and eventually all that will be left is a sparse soup of particles and radiation. Even the energy of that soup will be sapped away over time by the expansion of the universe, leaving everything just a fraction of a degree above absolute zero.

In this "Big Freeze", the universe ends up uniformly cold, dead and empty.

After the development of thermodynamics in the early 1800s, heat death looked like the only possible way the universe could end. But 100 years ago, Albert Einstein's theory of general relativity suggested that the universe had a far more dramatic fate.

General relativity says that matter and energy warp space and time. This relationship between space-time and matter-energy (stuff) — between the stage and the actors on it — extends to the entire universe. The stuff in the universe, according to Einstein, determines the ultimate fate of the universe itself.

The universe began as something incredibly small, and then expanded incredibly quickly

The theory predicted that the universe as a whole must either be expanding or contracting. It could not stay the same size. Einstein realized this in 1917, and was so reluctant to believe it that he fudged his own theory.

Then in 1929, the American astronomer Edwin Hubble found hard evidence that the universe was expanding. Einstein changed his mind, calling his previous insistence on a static universe the "greatest blunder" of his career.

If the universe is expanding, it must once have been much smaller than it is now. This realization led to the Big Bang theory: the idea that the universe began as something incredibly small, and then expanded incredibly quickly. We can see the "afterglow" of the Big Bang even today, in the cosmic microwave background radiation – a constant stream of radio waves, coming from all directions in the sky.

The fate of the universe, then, hinges on a very simple question: will the universe continue to expand, and how quickly?

If there's too much stuff, the expansion of the universe will slow down and stop

For a universe containing normal "stuff", such as matter and light, the answer to this question depends on how much stuff there is. More stuff means more gravity, which pulls everything back together and slows the expansion.

As long as the amount of stuff doesn't go over a critical threshold, the universe will continue to expand forever, and eventually suffer heat death, freezing out.

But if there's too much stuff, the expansion of the universe will slow down and stop. Then the universe will begin to contract. A contracting universe will shrink smaller and smaller, getting hotter and denser, eventually ending in a fabulously compact inferno, a sort of reverse Big Bang known as the Big Crunch.

For most of the 20th century, astrophysicists weren't sure which of these scenarios would play out. Would it be the Big Freeze or the Big Crunch? Ice or fire?

Dark energy pulls the universe apart

They tried to perform a cosmic census, adding up how much stuff there is in our universe. It turned out that we're strangely close to the critical threshold, leaving our fate uncertain.

That all changed at the end of the 20th century. In 1998, two competing teams of astrophysicists made an astonishing announcement: the expansion of the universe is speeding up.

Normal matter and energy can't make the universe behave this way. This was the first evidence of a fundamentally new kind of energy, dubbed "dark energy", which didn't behave like anything else in the cosmos.

Dark energy pulls the universe apart. We still don't understand what it is, but roughly 70% of the energy in the universe is dark energy, and that number is growing every day.

The existence of dark energy means that the amount of stuff in the universe doesn't get to determine its ultimate fate.

Instead, dark energy controls the cosmos, accelerating the expansion of the universe for all time. This makes the Big Crunch much less likely.

But that doesn't mean that the Big Freeze is inevitable. There are other possibilities.

One of them originated, not in the study of the cosmos, but in the world of subatomic particles. This is perhaps the strangest fate for the universe. It sounds like something out of science fiction, and in a way, it is.

In Kurt Vonnegut's classic sci-fi novel Cat's Cradle, ice-nine is a new form of water ice with a remarkable property: it freezes at 46 °C, not at 0 °C. When a crystal of ice-nine is dropped into a glass of water, all the water around it immediately patterns itself after the crystal, since it has lower energy than liquid water.

There's nowhere for the ice to start forming

The new crystals of ice-nine do the same thing to the water around them, and in the blink of an eye, the chain reaction turns all the water in the glass — or (spoiler alert!) all of Earth's oceans — into solid ice-nine.

The same thing can happen in real life with normal ice and normal water. If you put very pure water into a very clean glass, and cool it just below 0°C, the water will become supercooled: it stays liquid below its natural freezing point. There are no impurities in the water and no rough patches on the glass, so there's nowhere for the ice to start forming. But if you drop a crystal of ice into the glass, the water will freeze rapidly, just like ice-nine.

Ice-nine and supercooled water may not seem relevant to the fate of the universe. But something similar could happen to space itself.

Quantum physics dictates that even in a totally empty vacuum, there is a small amount of energy. But there might also be some other kind of vacuum, which holds less energy.

The new vacuum will "convert" the old vacuum around it

If that's true, then the entire universe is like a glass of supercooled water. It will only last until a "bubble" of lower-energy vacuum shows up.

Fortunately, there are no such bubbles that we're aware of. Unfortunately, quantum physics also dictates that if a lower-energy vacuum is possible, then a bubble of that vacuum will inevitably dart into existence somewhere in the universe.

When that happens, just like ice-nine, the new vacuum will "convert" the old vacuum around it. The bubble would expand at nearly the speed of light, so we'd never see it coming.

Inside the bubble, things would be radically different, and not terribly hospitable.

Humans, planets and even the stars themselves would be destroyed

The properties of fundamental particles like electrons and quarks could be entirely different, radically rewriting the rules of chemistry and perhaps preventing atoms from forming.

Humans, planets and even the stars themselves would be destroyed in this Big Change. In a 1980 paper, Physicists Sidney Coleman and Frank de Luccia called it "the ultimate ecological catastrophe".

Adding insult to injury, dark energy would probably behave differently after the Big Change. Rather than driving the universe to expand faster, dark energy might instead pull the universe in on itself, collapsing into a Big Crunch.

There is a fourth possibility, and once again dark energy is at centre stage. This idea is very speculative and unlikely, but it can't yet be ruled out. Dark energy might be even more powerful than we thought, and might be enough to end the universe on its own, without any intervening Big Change, Freeze, or Crunch.

Dark energy has a peculiar property. As the universe expands, its density remains constant. That means more of it pops into existence over time, to keep pace with the increasing volume of the universe. This is unusual, but doesn't break any laws of physics.

However, it could get weirder. What if the density of dark energy increases as the universe expands? In other words, what if the amount of dark energy in the universe increases more quickly than the expansion of the universe itself?

This idea was put forward by Robert Caldwell of Dartmouth College in Hanover, New Hampshire. He calls it "phantom dark energy". It leads to a remarkably strange fate for the universe.

If phantom dark energy exists, then the dark side is our ultimate downfall, just like Star Wars warned us it would be.

Atoms themselves would shatter, a fraction of a second before the universe itself ripped apart

Right now, the density of dark energy is very low, far less than the density of matter here on Earth, or even the density of the Milky Way galaxy, which is much less dense than Earth. But as time goes on, the density of phantom dark energy would build up, and tear the universe apart.

In a 2003 paper, Caldwell and his colleagues outlined a scenario they called "cosmic doomsday". Once the phantom dark energy becomes more dense than a particular object, that object gets torn to shreds.

First, phantom dark energy would pull the Milky Way apart, sending its constituent stars flying. Then the solar system would be unbound, because the pull of dark energy would be stronger than the pull of the Sun on the Earth.

Finally, in a few frantic minutes the Earth would explode. Then atoms themselves would shatter, a fraction of a second before the universe itself ripped apart. Caldwell calls this the Big Rip.

The Big Rip is, by Caldwell's own admission, "very outlandish" – and not just because it sounds like something out of an over-the-top superhero comic.

This is a remarkably grim portrait of the future

Phantom dark energy flies in the face of some fairly basic ideas about the universe, like the assumption that matter and energy can't go faster than the speed of light. There are good reasons not to believe in it.

Based on our observations of the expansion of the universe, and particle physics experiments, it seems much more likely that the ultimate fate of our universe is a Big Freeze, possibly followed by a Big Change and a final Big Crunch.

But this is a remarkably grim portrait of the future — aeons of cold emptiness, finally terminated by a vacuum decay and a final implosion into nothingness. Is there any escape? Or are we doomed to book a table at the Restaurant at the End of the Universe?

There's certainly no reason for us, individually, to worry about the end of the universe. All of these events are trillions of years into the future, with the possible exception of the Big Change, so they're not exactly an imminent problem.

Also, there's no reason to worry about humanity. If nothing else, genetic drift will have rendered our descendants unrecognizable long before then. But could intelligent feeling creatures of any kind, human or not, survive?

If the universe is accelerating, that's really bad news

Physicist Freeman Dyson of the Institute for Advanced Studies in Princeton, New Jersey considered this question in a classic paper published in 1979. At the time, he concluded that life could modify itself to survive the Big Freeze, which he thought was less challenging than the inferno of the Big Crunch.

But these days, he's much less optimistic, thanks to the discovery of dark energy.

"If the universe is accelerating, that's really bad news," says Dyson. Accelerating expansion means we'll eventually lose contact with all but a handful of galaxies, dramatically limiting the amount of energy available to us. "It's a rather dismal situation in the long run."

The situation could still change. "We really don't know whether the expansion is going to continue since we don't understand why it's accelerating," says Dyson. "The optimistic view is that the acceleration will slow down as the universe gets bigger." If that happens, "the future is much more promising."

But what if the expansion doesn't slow down, or if it becomes clear that the Big Change is coming? Some physicists have proposed a solution that is solidly in mad-scientist territory. To escape the end of the universe, we should build our own universe in a laboratory, and jump in.

One physicist who has worked on this idea is Alan Guth of MIT in Cambridge, Massachusetts, who is known for his work on the very early universe.

You would jump-start the creation of an entirely new universe

"I can't say that the laws of physics absolutely imply that it's possible," says Guth. "If it is possible, it would require technology vastly beyond anything that we can foresee. It would require huge amounts of energy that one would need to be able to obtain and control."

The first step, according to Guth, would be creating an incredibly dense form of matter — so dense that it was on the verge of collapsing into a black hole. By doing that in the right way, and then quickly clearing the matter out of the area, you might be able to force that region of space to start expanding rapidly.

In effect, you would jump-start the creation of an entirely new universe. As the space in the region expanded, the boundary would shrink, creating a bubble of warped space where the inside was bigger than the outside.

That may sound familiar to Doctor Who fans, and according to Guth, the TARDIS is "probably a very accurate analogy" for the kind of warping of space he's talking about.

We don't really know if it's possible or not

Eventually, the outside would shrink to nothingness, and the new baby universe would pinch off from our own, spared from whatever fate our universe may meet.

It's far from certain that this scheme would actually work. "I would have to say that it's unclear," says Guth. "We don't really know if it's possible or not."

However, Guth also points out that there is another source of hope beyond the end of the universe – well, hope of a sort.

Guth was the first to propose that the very early universe expanded astonishingly fast for a tiny fraction of a second, an idea known as "inflation". Many cosmologists now believe inflation is the most promising approach for explaining the early universe, and Guth's plan for creating a new universe relies on recreating this rapid expansion.

The multiverse as a whole is genuinely eternal

Inflation has an intriguing consequence for the ultimate fate of the universe. The theory dictates that the universe we inhabit is just one small part of a multiverse, with an eternally inflating background continually spawning "pocket universes" like our own.

"If that's the case, even if we're convinced that an individual pocket universe will ultimately die through refrigeration, the multiverse as a whole will go on living forever, with new life being created in each pocket universe as it's created," says Guth. "In this picture, the multiverse as a whole is genuinely eternal, at least eternal into the future, even as individual pocket universes live and die."

In other words, Franz Kafka may have been right on the money when he said that there is "plenty of hope, an infinite amount of hope—but not for us."

This is a bit of a bleak thought. If it upsets you, here is a picture of a cute kitten.