Around midnight one September night in New York City, eighteen-year-old Mateo Torrez gets a phone call from the mysterious organization Death-Cast. Death-Cast’s employees notify people known as Deckers that they will die within twenty-four hours, but no one knows exactly when or how their deaths will occur. Mateo is alone when he gets the news. Mateo is often home alone because he struggles with anxiety. His mother died in childbirth, and his father has been in a coma for two weeks. Not long after, seventeen-year-old Rufus Emeterio also gets a phone call from Death-Cast notifying him of his impending death. Rufus is in the middle of beating up his ex-girlfriend’s new boyfriend, Peck, while his foster brothers, Malcom and Tagoe, look on. Rufus, Malcolm, and Tagoe are best friends who call themselves the Plutos. Rufus’s parents and older sister died four months earlier when their car crashed into the Hudson River. 

After struggling to leave his apartment for a couple of hours, Mateo signs up on the Last Friend app. Last Friend connects Deckers with someone to spend their last day alive, called an End Day. Meanwhile, Rufus coordinates his own funeral with The Plutos, his foster parents, and his ex-girlfriend, Aimee. Aimee used to be a part of the Plutos until she was adopted by her aunt. Aimee brings Peck to the funeral. While Aimee and Rufus argue, Peck gets a friend to call the police on Rufus for beating him up. When the police show up, the Plutos help Rufus escape, but Tagoe and Malcolm are arrested. Now alone on his End Day, Rufus signs up on the Last Friend app where he connects with Mateo. After chatting for a little while, Rufus goes to Mateo’s apartment. They decide to spend their End Day together. First, they visit the hospital so Mateo can say goodbye to his father. Then, they spend time at Rufus’s favorite diner before Mateo visits his best friend, a single mother named Lidia. Mateo spends some time alone with Lidia and her daughter, Penny, but does not tell her it’s his End Day. After, Rufus shows Mateo his Instagram account. All his photos since his parents and sister died are in black and white. Mateo convinces Rufus to document his End Day using color photos instead. 

Rufus takes a phone call from Aimee and finds out that Malcolm and Tagoe were arrested for helping him beat up Peck. Mateo overhears part of the conversation and takes off, scared that Rufus is dangerous. Rufus catches up to Mateo and explains why the police are after him. He opens up about his complicated relationship with Aimee and the tragic day he witnessed the deaths of his parents and sister. Mateo realizes Rufus is not dangerous and promises not to leave again. The boys decide to visit Make-a-Moment, a virtual reality company meant to provide Deckers with bucket list experiences before they die. Rufus and Mateo choose to try skydiving but find it disappointing. While wandering the city after, they discover some old payphones in a ditch and Rufus takes pictures to post to his Instagram account. After, they take the subway to the cemetery where Mateo’s mother is buried. The boys stumble upon cemetery workers already digging Mateo’s grave. Despite the upsetting scene, Mateo finds a sense of closure and resolves to live his life to the fullest on his End Day. Mateo convinces Rufus to visit a pier over the Hudson River to mourn his family so that Rufus may find the same sense of peace with his own grief. Afterward, they narrowly survive a bombing at a bookstore, and the experience makes Rufus realize how scared he is of dying.  

Mateo realizes it’s important to spend your End Day with loved ones. He calls Lidia, and he and Rufus meet her at the World Travel Arena, an interactive experience where Deckers can visit places they’ll never get to see in real life. Rufus holds Mateo’s hand, and Mateo realizes that he has feelings for Rufus. After, Rufus, Mateo, and Lidia decide to go to a Decker club. At the club, Mateo lets loose and sings in public for the first time, then kisses Rufus. The Plutos show up, and they’re all having a great time until Peck and his gang arrive. Peck has been stalking Rufus’s Instagram account to discover his location. He wants to kill Rufus as payback for the beating Rufus gave him. Peck threatens Rufus with a gun, but Mateo punches Peck, saving Rufus. All the boys begin to fight, and Rufus wrestles the gun away, shooting all the bullets into a wall. Everyone scatters, Peck and his gang are arrested, and Mateo and Rufus decide to go to Mateo’s apartment. 

At Mateo’s home, Rufus and Mateo talk about all the things they would have liked to have done together if they had more time. Mateo sings for Rufus and tells him he loves him. Rufus says he loves Mateo too, and they decide not to leave Mateo’s room and curl up together in the bed to nap. When Mateo wakes up, he decides to make them both tea, but when he turns on the stove, it explodes and kills him. Rufus wakes up to the smoke and searches for Mateo. Rufus drags Mateo’s body out of the apartment, but it is too late. Rufus is taken to the hospital, but he leaves after visiting Mateo’s father and leaving him a note. On his way to the park where he and Mateo spent time earlier, Rufus plays a video of Mateo singing. Distracted, he steps into the street. He doesn’t see the car speeding toward him.