Man, the fun stuff you learn writing a book about wiping out all life on Earth. I was trying to put some sort of statistical likelihood on how often the Sun plows into a dense cloud of dust called a molecular cloud. These clouds orbit the Milky Way like the Sun does, and were we to smash into one, it could, in theory, deposit enough dust in the Earth's atmosphere to darken our skies somewhat. This would lower the Earth's albedo (reflectivity), preventing prevent sunlight from reaching the surface, which in turn would cause a global drop in temperature and trigger an Ice Age.
Clouds like this are pretty rare, and tend to hang out in the spiral arms of galaxies. So how close are we to a spiral arm? I did some searching and found out that the Sun is about 6400 light years from the nearest arm, called the Perseus Arm. I didn't know that! Interesting. The Sun orbits the center of the Milky Way at about 200 km/sec. Assuming the arm is just sitting out there like a cosmic traffic jam, we'll enter it in about 10 million years or so. In reality, the arms move around the center as well, so it'll actually take us a bit longer. That sounds like a safe enough buffer for me! Also, entering an arm doesn't guarantee smacking into a cloud, which are actually small as astronomical objects go. We probably don't do this except once every billion years or so. So the odds of being killed by entering a molecular cloud are essentially zero for the next few megayears, but then sharply increase (but are still very low) after that. I find this is true a lot in astronomical doomsday scenarios; the odds of dying because the Sun turns into a red giant are zero for the next 6 billion years, but then go to 100% as soon as it expands. However, the Sun is slowly getting hotter with time (as helium builds up in its core due to nuclear fusion), and by my rough calculations the Earth will be too hot for life in a mere 200 million years or so (in 100 million the Earth's temperature will increase by 10 degrees Fahrenheit, causing a giant global warming, and in one billion years our temperature will be the boiling point of water). So again, we're safe... for now. <evil laugh: mwuh hahahahahahaha>