In 1959, a Lexington, Massachusetts, elementary school celebrates its opening with a competition in which students draw what they believe will happen in the future. All of the children create visual works except for Lucinda Embry, who is guided by whispering voices to fill her paper with a series of numbers. Before she can write the final numbers, the allotted time for the task expires and the teacher collects the students’ drawings. The following day, Lucinda engraves the remaining numbers into a closet door with her fingernails. The works are stored in a time capsule and opened fifty years later, when the current class distributes the drawings inside among the students. Lucinda’s sheet is given to Caleb Koestler, the nine-year-old son of widowed MIT astrophysics professor John Koestler.
John notices that Lucinda’s numbers are dates, death tolls, and geographical coordinates of major catastrophes over the past fifty years, and three have yet to happen. In the following days, John encounters two of the three final events in person: a plane crash and a subway train collision. John becomes convinced that his family has a significant role in these incidents: his wife died in one of the earlier events, while Caleb was the one to receive Lucinda’s message. Meanwhile, Caleb begins hearing the same whispering voices as Lucinda.
To prevent the last event, John tracks down Lucinda’s daughter Diana and her granddaughter Abby. After some initial disbelief, Diana goes with John to Lucinda’s childhood home, where they find a copy of Matthäus Merian‘s engraving of Ezekiel’s “chariot vision”, in which a great sun is represented. They also discover that the final two digits of Lucinda’s message are not numbers, but two reversed letter E’s, matching the message left by Lucinda under her bed: “Everyone Else”. During this search, Caleb and Abby, who were left asleep in the car, have an encounter with the beings who are the source of the whispers. Diana tells John that her mother had always told her the date she (Diana) would die. He also visits Lucinda’s teacher who tells him of the scratching on the door left by Lucinda.
The next day, Abby colors in the sun on the engraving, which gives John a revelation. He rushes to the MIT observatory and learns that a massive solar flare with the potential to destroy all life will hit the Earth on the last date indicated by the message. As Diana and Abby prepare to take refuge underground, John goes to the school and finds the door on which Lucinda engraved the final numbers, and identifies them as coordinates of a place where he believes that salvation from the solar flare can be found. The disbelieving and hysterical Diana loads both Caleb and Abby into her car and flees for the caves.
At a gas station, the whispering beings steal her car with Caleb and Abby inside. Diana pursues them at speed (in a stolen SUV) but is killed in a traffic accident involving a semi-truck, on the date her mother predicted. The beings take Caleb and Abby to Lucinda’s mobile home, where John encounters them shortly thereafter. The beings, who act as extraterrestrial angels, are leading children to safety on interstellar arks. John is told he cannot go with them because he never heard the whispering, so he convinces Caleb to leave with Abby, and two pet rabbits they found, and both are transported away by the beings. The following morning, John decides to visit his family before the flare strikes, and drives through a chaotic Boston to his parents’ house, where he reconciles with his estranged father. The solar flare then strikes, destroying the Earth’s atmosphere and all life on the planet. Meanwhile, the ark, along with others, deposits Caleb and Abby on another world resembling an earthly paradise, and departs. The two run through a field towards a large white mysterious tree (implied to be the tree of life).