In 1959 at William Dawes Elementary School in Lexington, Massachusetts, a time capsule containing 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 soon realizes some of the digits represent the dates and death tolls of every major disaster over the past fifty years, and suggests three disasters still to come. Meanwhile Caleb begins receiving visits from mysterious figures in overcoats, "The Strangers". During these 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 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 a medication overdose. He then meets Lucinda's daughter, Diana Wayland, but is rebuffed once he mentions Lucinda's paper. But 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 worldwide and apocalyptic. 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 decides it is somehow a refuge from the impending disaster. Diana insists they seek shelter in some little-known 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 announced 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 but 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 and reveal themselves as 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 estranged father, a Christian minister. John and his family embrace as the solar flare strikes and incinerates everything 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 large, white, solitary tree in the distance.