According to current cosmological thinking, there are three possible destinies for the Universe. It may continue to expand forever; in this case it is open
. It may eventually stop expanding and then contract back to an infinitely dense, infinitesimally small point, as it was before the big bang
; in this case it is closed
. The third possibility is that its expansion will never stop, but will continually slow down and approach zero. In this case the Universe is said to be flat
Which of these endings awaits the Universe ultimately depends on its density. Every point in the Universe is moving away from every other point, but since all masses both exert and experience gravity, every point is also attracted to every other point. Stars and galaxies have a kinetic energy pulling them apart, and a potential energy drawing them together.
The denser the Universe, the stronger the gravitational pull which encourages it to collapse back to a point. If the density of the Universe is below a certain level, there will not be enough gravity for this collapse to happen - the galaxies have more kinetic energy than potential energy, and the universe is open. If it is above this level, the galaxies have more potential energy than kinetic and the Universe will eventually contract back to a point - it is closed. If it has exactly this value - the critical density, abbreviated to ρc or Ω - it is flat.
An approximation of ρc is given by the formula
is the Hubble constant
is the gravitational constant
This will not give a precise value because the Universe is not, strictly speaking, Newtonian; general relativity must be used for a precise derivation, and even then the issue is problematic because the Hubble constant is not known exactly.
Once we know a precise critical density (which we don't yet), it can be compared to the actual density of the Universe, and there's our answer. Unfortunately we don't know the actual density either, owing largely to the great amount of dark matter lurking out there. Thus the ultimate fate of the Universe is not currently known.