Hazel Grace Lancaster is a teenager living in Indianapolis, who has terminal thyroid cancer that has spread to her lungs. Believing she is depressed, her mother Frannie urges her to attend a weekly cancer patient support group to help her make friends with individuals who are going through the same thing. There Hazel meets Augustus "Gus" Waters, a charming teenager who lost a leg to bone cancer but has since apparently been cancer-free. He invites Hazel to his house where they bond over their hobbies and agree to read each other's favorite books. Hazel recommends An Imperial Affliction, a novel about a cancer-stricken girl named Anna that parallels her experience, and Gus gives Hazel Counter Insurgence. They keep in touch via text over the weeks that follow and grow closer. After Gus finishes the book, he expresses frustration with its abrupt ending (it ends in the middle of a sentence). Hazel explains that the novel's mysterious author, Peter Van Houten (Willem Dafoe), retreated to Amsterdam following the novel's publication and has not been heard from since.
Weeks later, Gus tells Hazel he has traced Van Houten's assistant, Lidewij, and has corresponded with Van Houten by email. She writes to him to find out more about the novel's ambiguous ending. Van Houten replies that he is only willing to answer her questions in person. Hazel asks her mother if she can travel to Amsterdam to visit him, but Frannie kindly refuses because of financial and medical constraints. Gus suggests that she use the "cancer wish" she received from Make-A-Wish Foundation but Hazel explains that she has already used hers to visit Walt Disney World. Gus and Hazel go on a picnic date and begin to fall in love. Gus surprises Hazel with tickets to Amsterdam. After a medical setback, Hazel's doctors eventually agree to allow the trip, since they expect that she will soon become incapable of doing anything at all.
Hazel and Gus arrive in Amsterdam and are presented with reservations at an expensive restaurant, pre-paid by Van Houten. During the meal, Gus confesses his love for Hazel. The following afternoon, they go to Van Houten's house, but are shocked to find he is a mean-spirited alcoholic. Lidewij arranged the meeting and their dinner without Van Houten knowing anything about it, saying if he knew he would do anything to stop it. Angered by his assistant's actions, he taunts Hazel for seeking serious answers to a piece of fiction and belittles her medical condition. She leaves, utterly distraught. Lidewij invites them to go sightseeing to make up for their ruined experience. The three visit the Anne Frank House, where Hazel struggles to climb the house's many stairs. They spend that night together in their hotel and have sex for the first time. The next day Gus tells Hazel that his cancer has returned and spread throughout his body and is terminal. Hazel is heartbroken, expressing how unfair life can be.
After their return to Indianapolis, Gus's health worsens. He is taken to the ICU and realizes he is close to death. Gus invites his blind best friend Isaac and Hazel to his pre-funeral, where they deliver eulogies that they have both prepared. Hazel tells him she would not trade their short time together for anything, since he "gave me a forever within the numbered days." Gus dies eight days later and Hazel is astonished to find Van Houten at the funeral. He tells her that Augustus had demanded he attend his funeral to make up for the spoiled trip. Van Houten tells her that the novel is based on the experiences of his daughter Anna, who died from leukemia at a young age. He gives Hazel a piece of paper which she crumples up asking him to leave. Later, talking with Isaac, Hazel learns that Gus had asked Van Houten to help him write a eulogy for her. She retrieves the crumpled paper and reads his words accepting his death and about his love for her. She lies on her back on her lawn looking up at the stars, smiling as she remembers Gus and says: "Okay." ReadMore>