Fry is unable to sleep when Bender brings a female robot to their apartment and they spend all night loudly having sex (as well as intentionally keeping Fry awake). As a result, Fry oversleeps and shows up late for work at Planet Express the next morning. The Professor chides Fry for his chronic lateness, saying that he expects Fry to show up for work on time, just like all the other employees; when Fry points out that Leela hasn't arrived yet, he is told that Leela came in on time, but left because a man was taking her out to dinner for her birthday. Fry realizes that he was supposed to take Leela to lunch, and is now late for that as well. Fry arrives at Elzar's restaurant to meet Leela, but Leela has already finished her meal (and Fry's); she, like the Professor, is fed up with Fry's inability to be on time for anything.
Upon returning to Planet Express headquarters, Fry offers to make his earlier blunder up to Leela by taking her out to the ritzy, subterranean Cavern on the Green restaurant that night. Leela is skeptical, particularly when Bender announces that Hedonism Bot is getting married to a house in the suburbs and will be throwing a huge bachelor party that same evening, but Fry says that he "can throw up on a stripper any time", and promises that he will not stand Leela up again. Fry purchases a record-your-own-message birthday card for Leela and prepares to leave so he can meet her precisely on time, but is stopped by the Professor, who tells Fry that since he was late for work that morning, he must help the Professor test his latest invention: a time machine. The Professor says that the machine was designed to only travel forward in time so as to avoid altering history or doing "something disgusting", like sleeping with one's own grandmother.
Fry, Bender, and the Professor enter the machine. Fry begins recording an apology for being late again on Leela's birthday card, while the Professor intends to test the machine by sending it one minute forward in time. However, the Professor trips and falls down while clutching the activation lever, sending the machine hurtling out of control; in the process, Fry loses Leela's birthday card out the window. The Professor gets back to his feet and shuts down the machine, but the occupants find that the interior of the Professor's laboratory has been replaced by a ruined city. The date on the machine's display reads: 3 December, 10,000 AD.
Fry is stunned at being thrown so far forward in time, saying that he can't be late for his date with Leela; however, the Professor reminds Fry that Leela, as well as everyone else they have ever known, has been dead for thousands of years. The trio explore their ruined world, but are unimpressed with the post-apocalyptic setting. After talking to a group of cavemen, the Professor realizes that while they cannot travel backward in time, they can travel forward to a point where someone else has invented a backward-traveling time machine, and use that to return home. They make a series of progressively larger jumps through time while attempting to find a sufficiently advanced civilization, and while they encounter a number of strange sights, they have no luck in finding a way home.
Back in 3010, Leela endures another lonely birthday dinner. When she returns to Planet Express, she inquires as to Fry's whereabouts, and is told by Cubert that he, Bender, and the Professor are probably attending Hedonism Bot's bachelor party. Just then, a breaking news bulletin states that a nuclear-powered stripper robot underwent meltdown at the party, killing everyone except Hedonism Bot. Leela is overwhelmed with both anger and grief, believing that Fry died after standing her up again.
Bender, Fry, and the Professor arrive in the year Five Million AD; a race of enlightened, purple-skinned humanoids live on Earth's surface, while Dumblocks - savage, primitive creatures - live below ground. The Professor asks whether these advanced people have invented a backwards-traveling time machine, and is told that they have not, although if they focus their mental efforts toward the problem, they should be able to perfect a solution within five years. The three promptly jump forward another five years, only to discover that in that time, the Dumblocks have risen up and slaughtered the entire surface population.
In 3030, Planet Express has become a larger, more successful company following the death of the Professor and Leela's subsequent takeover of the business. Leela is proud of her success, but admits to Hermes that she still misses "the old days" while looking at a photograph of herself and Fry. Leela notices that Cubert has grown up to possess a strong physical resemblance to Fry, and begins to flirt with him, much to his surprise.
The year Ten Million AD is a nightmare where machines are engaged in a violent, genocidal war against the remnants of mankind. Bender cheerfully observes that this "seems like a nice future", and suggests that they remain there, but the Professor and Fry quickly engage the next jump. They next arrive in Fifty Million AD, a paradise inhabited by beautiful and brilliant women who immediately recognize the group as time travelers and actually have a method of traveling back in time. Fry and the Professor are invited to a sensual "fertility banquet", but Bender, unhappy about being unable to stay in the future he liked, spitefully activates the time machine. This triggers a fight among the three, and they travel a large distance forward in time, finally arriving in One Billion AD.
Here, in the far future, Earth has been reduced to a scorched, barren wasteland, and all life is extinct. Fry wants to keep traveling forward, but the Professor says this would be futile, as Earth is now a dead world. Distraught, Fry wanders back to the remains of the Cavern on the Green, where he apologizes to Leela for being a billion years late for her birthday dinner. Glancing down at the ground, he is shocked to find a message written there, one that is apparently addressed to him.
In 3050, Planet Express has become a massive corporation. An aged Leela and Cubert are divorced, and Cubert is now dating Amy, who has become a head in a jar on a robotic body. While discussing her regrets over marrying Cubert with Hermes (who is a head in a jar on a pogo stick), Leela is struck by her birthday card from 3010, which has finally emerged from the time stream. Leela opens the card to hear Fry's message, in which he explains he will be delayed by the Professor's time travel experiment, and tells her that he loves her, before the experiment visibly goes awry. Leela is crushed; she has spent the last 40 years being bitter and angry with Fry for something that wasn't even his fault. Dejected, she returns to the abandoned Cavern on the Green, and - drawing upon a lesson about stalagmite formation she learned from a waiter the last time she was in the restaurant - fires her laser pistol at the ceiling several times, causing droplets of water to fall to the floor. Satisfied, Leela nods her head and leaves.
By One Billion AD, these droplets of water have accumulated into a series of small stalagmites which spell out a brief message from Leela to the time-lost Fry, stating that while their time together was short, it was also the happiest of her life. Touched by the message, Fry returns to Bender and the Professor, saying that he has lived a good life, and proposes that they watch the end of the universe together. Turning the time machine to its maximum setting, they watch as the sun grows into a red giant, consuming the earth, and then fades into a white dwarf, followed by all of the other stars, eventually leaving nothing but darkness. This, to their astonishment, is followed by a tremendous explosion that the Professor recognizes as a second Big Bang; he realizes that time must be cyclical, resulting in the creation of a new universe that should be identical to the previous one.
The time machine rapidly accelerates through the formation of the Earth, the extinction of the dinosaurs, and subsequent events in world history (with the Professor pausing only briefly to assassinate Adolf Hitler with a laser cannon). As they near their own time, they throttle the machine back, but accidentally skip forward to 10,000 AD a second time after the Professor falls down once more, forcing them to "go around again". The third trip happens without incident (although this time the Professor fails to kill Hitler and mistakenly shoots Eleanor Roosevelt), and the time machine materializes in the Professor's lab a short time before it originally left. However, this universe appears to be displaced a few feet from the last one, as the machine appears in mid-air and crashes to the floor, killing this new universe's versions of Fry, Bender, and the Professor (and avoiding a time paradox). Fry is able to make his date with Leela on time; she admits that she thought he would be late, but he replies that was "the old Fry... he's dead now". Fry and Leela share a romantic moment atop a bridge, while beneath it, Bender buries the bodies of the deceased duplicates.