In 1959, at William Dawes Elementary School in Lexington, Massachusetts, a time capsule containing the students' drawings of their ideas of the future is buried and set to be ceremoniously opened 50 years later. A girl named Lucinda Embry contributes a page full of seemingly random digits. That night, Lucinda is found in a school closet, where her fingers are bloodied and she complains about hearing voices.
In 2009, the time capsule is opened and the drawings are given to the current students. A boy named Caleb receives Lucinda's envelope. His father John Koestler, a widower and professor of astrophysics at MIT takes interest in the paper, and he soon realizes that part of these digits form dates and death tolls of every major disaster over the past fifty years, and suggests three disasters yet to come. Meanwhile, Caleb begins receiving visits from mysterious figures in overcoats (listed in the credits as "The Strangers"), and during his encounters he hears their overlapping telepathic whispers.
John witnesses a commercial plane crash on the date the paper next predicted a disaster would occur, and he discovers that the unexplained digits on the paper are in fact the geographic coordinates of the events. Speaking with Lucinda's former teacher, John learns of Lucinda's closet episode, and also that she had since died after an overdose. He then meets Lucinda's daughter, Diana Wayland, but is rebuffed once he mentions Lucinda's paper. However, after John uses the numbers to correctly predict another disaster—a Manhattan subway train derailment which John tries and fails to prevent—Diana seeks out John, and together they go to investigate Lucinda's old remote mobile home. Having noticed that the last date on the paper is not accompanied by coordinates, further clues in Lucinda's home lead John and Diana to realize that the '33' listed as the death toll for the final disaster is actually 'EE' reversed, which Lucinda meant to represent 'Everyone Else'. In the woods outside the home, John confronts one of The Strangers, who disappears in a flash of light. It is revealed that Diana's daughter Abby can hear The Strangers' eerie whispers as well.
John and a fellow professor forecast that a massive solar flare will soon reach Earth, and the final disaster on Lucinda's paper will indeed be global in scale. John then examines the door of the closet in which Lucinda was found, and discovers it is where she had scratched another set of coordinates. They represent the location of Lucinda's old mobile home, and John figures that it is somehow a refuge from the impending disaster. Diana insists they seek shelter in a system of underground caves instead, and she takes Abby and Caleb, without John's knowledge, to go there. As panic erupts at a gas station after news of the flare is made public through an Emergency Alert System broadcast, The Strangers drive off in Diana's car with Caleb and Abby still inside. Diana gives chase in another vehicle, and is killed when she is broadsided by a truck.
At Lucinda's mobile home, John finds the children with the four Strangers as a glowing vessel descends from the sky. The Strangers dispossess themselves of their human appearance, revealing themselves to be glowing, translucent figures surrounded by wisps of light. The Strangers invite only those who can hear their whispers to escape the destruction with them. John convinces an initially reluctant Caleb to go with The Strangers, and the vessel departs with the two children. From the vantage point of space, other ships are seen taking off from all around Earth. John travels to Boston to be with his sister and parents. While he had distanced himself from religion following his wife's death, John reconciles with his previously estranged father, a Christian minister. John and his family embrace as the solar flare strikes Earth. The radiation vaporizes the atmosphere and destroys all life on Earth. Elsewhere, Caleb and Abby are dropped off in an otherworldly field, as other ships are visible along the horizon, dropping off others. The film ends as the two make their way towards a prominent solitary tree in the distance.