During a routine shopping trip, Cole encounters an armed robber who demands that the cashier, Michael, hand over all the money in the shop. Michael empties the cash register and insists there is no safe in the shop. As the robber grows more agitated, [Cole] approaches him, calls him a coward, and dares him to shoot. Michael intervenes and tries to wrestle the gun away, only to be shot in the gut. After Cole calls an ambulance, a friend invites him out for drinks, and he agrees on the condition that it isn’t a house party.
Cole is frustrated to learn that it is a house party, and he goes downstairs to drink alone, where he meets Maya, the host. The two discuss an approaching asteroid. [Maya] says that modern stress would evaporate in the face of the meaninglessness of certain doom, and Cole replies that everything would matter in that circumstance. The two dance to Maya's favorite song and soon begin dating. A series of flashforwards depicts life in post-apocalyptic Scotland after the asteroid has arrived as [Cole] and [Maya] hide from alien spaceships, interwoven with scenes in the present that lead up to those events.
When they discuss children, Cole says he does not want any, and Maya reveals she is incapable. As the asteroid grows closer, Cole asks Maya to marry him. Maya jokingly accepts, but Cole insists that he is serious; now truly serious, Maya agrees again. Although initially dismissive of the danger, scientists grow increasingly worried about a collision. Various missions to divert the asteroid end in failure, leaving the world on edge. In the flashforwards, [Cole] and [Maya]'s relationship deteriorates under the strain of finding food and shelter.
When Maya becomes pregnant, Cole is taken aback and insists it is cruel to have children in the face of impending disaster. Maya says it is a miracle for her to become pregnant, and she keeps the baby despite Cole's insistence that they discuss abortion. In the flashforwards, the baby is in the care of Maya's parents, and their relationship becomes strained over the issue. Cole accuses Maya of blaming him for their hardships, while Maya counters that his own self-loathing is driving them apart. In desperation, they resort to eating the baby food they had planned to save.
In the present, Michael expresses discontent with Cole's refusal to accept responsibility for his wife's pregnancy. In a flashforward, a survivor named Keith Novac explains a theory that the aliens have come to purge Earth of overpopulation and leave it better for the survivors. Novac demonstrates his attempts to contact the aliens, and Cole tells Keith that their missing child is in the care of Maya's parents, whom they suspect have fled the country. Novac suddenly sneaks attacks them, and the film shifts back to the present time, where Cole and Maya have separated over his opposition to her pregnancy. Maya, who is about to give birth, invites Cole to the hospital.
When Cole arrives, Michael confronts him with a pistol and accuses him of betraying his own beliefs. In the face of certain death, Michael says that Cole has abdicated responsibility and treats his life as meaningless. Envious of the hope still possible in Cole's life, Michael shoots him. Novac, a doctor, rushes from the hospital, shoots Michael, and works to save Cole's life. As Cole begins to slip into delirium from his wound, he apparently imagines the various flashforwards based on the actions of Novac and Michael. Maya calls Cole on his mobile and tells him that the asteroid has missed Earth, and that she has given birth to a baby girl. The film ends with Cole lying on a hospital bed, Maya beside him.